mescla.prep.qaqc.charge_balance_report

mescla.prep.qaqc.charge_balance_report(table, tolerance=5.0, convention='sum')[source]

Per-sample charge balance with a pass/fail flag.

Parameters:
  • tolerance (float, default 5.0) – Acceptance threshold on |CBE| in percent. It is only meaningful together with convention – see charge_balance_error().

  • convention ({"sum", "mean"}, default "sum") – Denominator convention for the CBE.

  • table (Any)

Returns:

DataFrame – Columns cations_meq, anions_meq, cbe_percent, pass. The species that contributed to each sum are recorded in .attrs["species_used"], and the convention used in .attrs["convention"].

Return type:

pd.DataFrame