chromatic_interpolator

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 (str or int, optional) – Extrapolation mode ('extrapolate', 'zeros', 'raise', 'const'), see scipy.interpolate.UnivariateSpline. Default is 'raise'.

  • inverse (bool, optional) – If True, interpolate wavelength as a function of quantity (e.g. wavelength solution); otherwise quantity as a function of wavelength. In the inverse case, quantity must be increasing. Default is False.

Returns:

scipy.interpolate.UnivariateSpline – Chromatic interpolator.