convert_set_to_family_of_curves

arithmeticmeancurve.convert_set_to_family_of_curves(set_of_curves: List[pandas.core.frame.DataFrame])pandas.core.frame.DataFrame

Merges and interpolates a set into a family (of curves).

Notes

The family of curves is the basis for a mean curve calculation.

Parameters

set_of_curves (SetOfCurves) – A set of unique curves, which doesn’t share common x-values.

Returns

DataFrame

>>> import examplecurves
>>> from arithmeticmeancurve import convert_set_to_family_of_curves
>>> from doctestprinter import doctest_print
>>> example_curves = examplecurves.Static.create(
...     family_name="nonlinear0",
...     cut_curves_at=3,
...     predefined_offset=1
... )
>>> sample_family = convert_set_to_family_of_curves(example_curves)
>>> doctest_print(sample_family)
            y_0       y_1       y_2       y_3       y_4
x
0.010       NaN       NaN       NaN  0.080000       NaN
0.020       NaN       NaN       NaN  0.267174  0.000000
0.050       NaN       NaN  0.100000  0.828698  0.598958
0.080  0.010000       NaN  0.534501  1.390221  1.197917
0.100  0.254565  0.050000  0.824168  1.764570  1.597222
0.106  0.327935  0.143750  0.911069  1.876875  1.717014
0.110  0.376848  0.206250  0.969002  1.945755  1.796875
0.161  1.000489  1.003125  1.707654  2.823978  2.733646
0.195  1.416250  1.534375  2.160321  3.409460  3.358160
0.200  1.472500  1.612500  2.226890  3.495560  3.450000
0.202  1.495000  1.641250  2.253517  3.530000       NaN
0.272  2.282500  2.647500  3.185479       NaN       NaN
0.300  2.597500  3.050000       NaN       NaN       NaN
0.310  2.710000       NaN       NaN       NaN       NaN