elphick.mass_composition.utils.pd_utils.calculate_partition
- elphick.mass_composition.utils.pd_utils.calculate_partition(df_feed, df_ref, col_mass_dry='mass_dry')[source]
Calculate the partition curve from two streams
Applicable to the one dimensional case only. The PN is bounded [0, 1]. The interval mean for size is the geometric mean, otherwise the arithmetic mean. The interval mean is named da, which can be interpreted as diameter-average or density-average. TODO: consider a generalised name, fraction-average -> fa?
- Parameters:
df_feed (
DataFrame
) – The pd.DataFrame containing mass-composition representing the fractionated feed.df_ref (
DataFrame
) – The pd.DataFrame containing mass-composition representing the fractionated reference stream.col_mass_dry (
str
) – The dry mass column, not optional.
- Return type:
DataFrame
- Returns:
A pd.DataFrame containing the partition data.