Interpolators

A “Interpolator” in spexxy is similar to a Grid, but works on a continuous parameter space instead of a discrete one. In fact, many interpolators build on an existing grid and allows for interpolation between grid points.

As with a Grid, the usual way of getting data from an interpolator is by calling it with the requested parameters:

ip = Interpolator()
data = ip((3.14, 42.))

A class inheriting from Interpolator must overwrite all necessary methods, in particular __call__() and axes().

spexxy comes with three pre-defined interpolators:

  • LinearInterpolator performs linear interpolation on a given grid.
  • SplineInterpolator performs a cubic spline interpolation on a given grid.
  • UlyssInterpolator extracts spectra from interpolator files created for the spectrum fitting package ULySS.

Interpolator

LinearInterpolator

SplineInterpolator

UlyssInterpolator