gcfit.util.QuantitySpline#

class gcfit.util.QuantitySpline(x, y, w=None, bbox=[None, None], k=3, s=0, ext=1, check_finite=False)#

Subclass of SciPy’s UnivariateSpline, supporting AstroPy Quantity

1-D smoothing spline fit to a given set of data points, with support for units through using astropy.Quantity arrays as input.

All functions will call their corresponding scipy native functions, and simply add the relevant units to their outputs.

See also

scipy.interpolate.UnivariateSpline

Methods

__init__(x, y[, w, bbox, k, s, ext, ...])

antiderivative([n])

Construct a new spline representing the antiderivative of this spline.

derivative([n])

derivatives(x)

Return all derivatives of the spline at the point x.

get_coeffs()

Return spline coefficients.

get_knots()

Return positions of interior knots of the spline.

get_residual()

Return weighted sum of squared residuals of the spline approximation.

integral(a, b)

roots()

set_smoothing_factor(s)

Continue spline computation with the given smoothing factor s and with the knots found at the last call.

validate_input(x, y, w, bbox, k, s, ext, ...)