Module Scientific.Functions.Interpolation


Class InterpolatingFunction: Function defined by values on a grid using interpolation

An interpolating function of n variables with m-dimensional values is defined by an (n+m)-dimensional array of values and n one-dimensional arrays that define the variables values corresponding to the grid points. The grid does not have to be equidistant.

Constructor: InterpolatingFunction(axes, values, default=None)

axes

a sequence of one-dimensional arrays, one for each variable, specifying the values of the variables at the grid points

values

an array containing the function values on the grid

default

the value of the function outside the grid. A value of None means that the function is undefined outside the grid and that any attempt to evaluate it there yields an exception.

Evaluation: function(x1, x2, ...) yields the function value obtained by linear interpolation.

Indexing: all array indexing operations except for the NexAxis operator are supported.

Methods:

Class NetCDFInterpolatingFunction: Function defined by values on a grid in a netCDF file

A subclass of InterpolatingFunction.

Constructor: NetCDFInterpolatingFunction(filename, axesnames, variablename, default=None)

filename

the name of the netCDF file

axesnames

the names of the netCDF variables that contain the axes information

variablename

the name of the netCDF variable that contains the data values

default

the value of the function outside the grid. A value of None means that the function is undefined outside the grid and that any attempt to evaluate it there yields an exception.

Evaluation: function(x1, x2, ...) yields the function value obtained by linear interpolation.