elphick.geomet.utils.pandas.calculate_partition

elphick.geomet.utils.pandas.calculate_partition(df_feed, df_preferred, col_mass_dry='mass_dry')[source]

Calculate the partition curve from two streams

\[K = \frac{{m_{preferred}}}{{m_{feed}}}\]

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_preferred (DataFrame) – The pd.DataFrame containing mass-composition representing the fractionated preferred stream.

  • col_mass_dry (str) – The dry mass column, not optional.

Return type:

DataFrame

Returns:

A pd.DataFrame containing the partition data with a range [0, 1].