chromatic_interpolator#
- chromatic_interpolator(wavelength, quantity, k=3, ext='raise', inverse=False)[source]#
Build a chromatic interpolator.
The interpolator is an interpolating spline (no smoothing,
s=0).- Parameters:
wavelength (array_like) – Wavelengths, in the unit expected by the interpolator.
quantity (array_like) – Quantity to be interpolated.
k (
int, optional) – Degree of the spline. Default is 3.ext (
strorint, optional) – Extrapolation mode ('extrapolate','zeros','raise','const'), seescipy.interpolate.UnivariateSpline. Default is'raise'.inverse (
bool, optional) – If True, interpolate wavelength as a function ofquantity(e.g. wavelength solution); otherwisequantityas a function of wavelength. In the inverse case,quantitymust be increasing. Default is False.
- Returns:
scipy.interpolate.UnivariateSpline– Chromatic interpolator.