elphick.geomet.utils.interp.mass_preserving_interp_2d
- elphick.geomet.utils.interp.mass_preserving_interp_2d(intervals, interval_edges, include_original_edges=True, precision=None, mass_dry='mass_dry')[source]
Interpolate 2D interval data with zero mass loss using pchip
This function applies mass-preserving up-sampling to 2D interval data. The function will: - resample the first dimension using the mass_preserving_interp function - resample the second dimension using the mass_preserving_interp function at each of the new first
dimension intervals
apply the upsampled mass proportions of the second dimension to the first dimension to create the final result
- Parameters:
intervals (
DataFrame
) – Dataframe with two pd.IntervalIndexes, in mass-composition space.interval_edges (
dict
[str
,Iterable
]) – Dict of the values of the new grid (interval edges) for each dimension, keyed by index name (dimension).include_original_edges (
bool
) – If True include the original index edges in the resultprecision (
Optional
[int
]) – Number of decimal places to round the index (edge) values.mass_dry (
str
) – The dry mass column, not optional. Consider solve_mass_moisture prior to this call if needed.
- Return type:
DataFrame
Returns: