mescla.isotopes.linearize

mescla.isotopes.linearize(table, pairs=None)[source]

Replace solute isotope ratios by \(\delta \times C\), which mixes linearly.

Parameters:
  • table (array_like, DataFrame or ChemTable) – Must contain both the isotope column and its carrier.

  • pairs (dict of {isotope: carrier}, optional) – Explicit pairing. When omitted, pairs are inferred from SOLUTE_ISOTOPE_CARRIERS using whichever carrier is present.

Returns:

ChemTable – With each isotope column replaced by its product with the carrier, and units prefixed "linearised". The carrier column is kept – it is needed to convert predictions back, and it is usually a good tracer itself.

Return type:

ChemTable

Notes

Apply the same transform to end-members and samples, exactly as with standardisation. Delta values may be negative, which is fine: the product is still linear in the mixing ratios.

Examples

>>> linear = linearize(samples, {"d13C": "DIC"})
>>> em = linearize(endmembers, {"d13C": "DIC"})
>>> result = mixing_ratios(em, linear)