mescla.mixing.geometric.two_component

mescla.mixing.geometric.two_component(c_sample, c_1, c_2)[source]

Fraction of end-member 1 in a two-component mixture, from one tracer.

\[f_1 = \frac{C_s - C_2}{C_1 - C_2}\]

Returned unclipped: a value outside [0, 1] means the sample does not lie between the two end-members, and that is information you want, not an error to suppress.

Parameters:
  • c_sample (float or ndarray) – Tracer concentration in the mixed sample(s).

  • c_1 (float) – Tracer concentration in each end-member.

  • c_2 (float) – Tracer concentration in each end-member.

Return type:

ndarray

Examples

>>> two_component(50.0, 100.0, 0.0)
0.5