pwtools.num.Fit1D¶
- class pwtools.num.Fit1D(x, y)[source]¶
Bases:
object
Base class for 1D data fit/interpolation classes (
Spline
,PolyFit1D
). It providesget_min()
,get_max()
,get_root()
,is_mono()
.The assumed API is that the
__call__
method has a kwd der which causes it to calculate derivatives, i.e.__call__(x, der=1)
is the first deriv.Methods
get_max
([x0, xab])Convenience method.
get_min
([x0, xab])Return x where y(x) = min(y) by calculating the root of the fit's 1st derivative (by calling
self(x, der=1)
).get_root
([x0, xab])Return x where y(x) = 0 by calculating the root of the fit function.
is_mono
()Return True if the curve described by the fit function f(x) is monotonic.