SplineExactKnotsFitter#
- class astropy.modeling.spline.SplineExactKnotsFitter[source]#
Bases:
_SplineFitterFit a spline using least-squares regression.
Methods Summary
__call__(model, x, y, **kwargs)Fit a spline to data using least-squares with exact knots.
Methods Documentation
- __call__(model, x, y, **kwargs)[source]#
Fit a spline to data using least-squares with exact knots.
- Parameters:
- model
Spline1D The spline model to fit.
- xnumpy:array_like
The x data values.
- ynumpy:array_like
The y data values.
- **kwargs
python:dict, optional Additional keyword arguments:
tarray-like, optionalInterior knots for the spline. If not provided, the model’s existing interior knots (
t_interior) are used if available. Seescipy.interpolate.LSQUnivariateSplinefor details.
weightsarray-like, optionalWeights for the data points.
bboxarray-like, optionalThe bounding box limits as
[xmin, xmax]. Default is[None, None].
- model
- Returns:
- fitted_model
Spline1D A copy of the input model with fitted parameters.
- fitted_model