nrv_interp

class nrv.utils.nrv_interp(X_values, Y_values, kind='linear', dx=0.01, interpolator=None, dxdy=None, scale=None, columns=[])[source]

Interpolator based on scipy.interpolate

Parameters:
  • X_values ((N,) array_like) – A 1-D array of real values

  • Y_values ((,N,) array_like) – A N-D array of real values. The length of y along the interpolation axis must be equal to the length of x.

  • kind (str) –

    kind of interpolation which should be used, by default “linear” possible values:
    • scipy interp1d kinds (see nrv.spy_interp1D_kind)

    • {‘hermite’, ‘cardinal’, ‘catmull-rom’} for respective cubic spline interpollation

  • dx – if minimal distance between 2 consecutive points, by default 0.01 interpolator custumize intepolation function if None kind is use to set the interpolator, by default None

  • dxdy – if kind is ‘hermite’, derivative vector (see scipy.interpolate.CubicHermiteSpline), by default None

  • scale – if kind is ‘cardinal’, scale to use for derivative vector, by default None

  • columns (int or array_like) – columns on which apply the interpolation when class called if [] iterpolation done on the whole vector,by default []

Returns:

output – (domain, cell_tag, facet_tag)

Return type:

tuple(3)

Methods

nrv_interp.__init__(X_values, Y_values[, ...])

Init method for NRV_class

nrv_interp.call_method(self, X)

nrv_interp.get_parameters()

Generic method returning all the atributes of an NRV_class instance

nrv_interp.load(data[, blacklist])

Generic loading method for NRV_class instance

nrv_interp.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

nrv_interp.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

nrv_interp.update_interpolator([kind, ...])