elphick.mass_composition.utils.pd_utils.calculate_recovery

elphick.mass_composition.utils.pd_utils.calculate_recovery(df, df_ref, mass_wet='mass_wet', mass_dry='mass_dry')[source]

Calculate recovery of mass-composition for two DataFrames

Parameters:
  • df (DataFrame) – The pd.DataFrame containing mass-composition. H2O if provided will be ignored. All columns other than the mass_wet and mass_dry are assumed to be additive, that is, dry mass weighting is valid. Assumes composition is in %w/w units.

  • mass_wet (str) – The wet mass column, not optional. Consider solve_mass_moisture prior to this call if needed.

  • mass_dry (str) – The dry mass column, not optional. Consider solve_mass_moisture prior to this call if needed.

Return type:

DataFrame

Returns:

A pd.Series containing the total mass and weight averaged composition.