Data.spline¶
- Data.spline(xcol=None, ycol=None, sigma=None, **kargs)¶
Construct a spline through x and y data and replace, add new data or return spline function.
- Keyword Arguments:
xcol (column index) – Column with x data or if None, use setas attribute.
ycol (column index) – Column with y data or if None, use the setas attribute
sigma (column index, or array of data) – Column with weights, or if None use the 1/yerr column.
replace (Boolean or column index or None) – If True then the y-column data is repalced, if a column index then the new data is added after the specified index, if False then the new y-data is returned and if None, then spline object is returned.
header (string) – If replace is True or a column index then use this string as the new column header.
order (int) – The order of spline to use (1-5)
smoothing (float or None) – The smoothing factor to use when fitting the spline. A value of zero will create an interpolating spline.
bbox (tuple of length 2) – Bounding box for the spline - defaults to range of x values
ext (int or str) – How to extrapolate, default is “extrapolate”, but can also be “raise”,”zeros” or “const”.
- Returns:
(various) – Depending on the value of replace, returns a copy of the AnalysisMixin, a 1D numpy array of data or an :[y:class:scipy.interpolate.UniverateSpline object.
This is really just a pass through to the scipy.interpolate.UnivariateSpline function. Also used in the extrapolate function.