make_linear_interpolator

hcipy.interpolation.make_linear_interpolator(field, grid=None, fill_value=None)

Make a linear interpolator for any type of grid.

Parameters
fieldField or array_like

The field to interpolate.

gridGrid or None

The grid of the field. If it is given, the grid of field is replaced by this grid.

fill_valuescalar or None

The value to use for points outside of the domain of the input field. Extrapolation is not supported. If it is None, a numpy.nan value will be used for points outside of the domain.

Returns
Field generator

The interpolator as a Field generator. The grid on which this field generator will be evaluated does not need to have any structure.