pylag.interpolation module
Interpolators and interpolation helpers
Note
interpolation is implemented in Cython. Only a small portion of the API is exposed in Python with accompanying documentation.
- class pylag.interpolation.CubicSpline1DInterpolator
Bases:
Interpolator
Cubic spline 1D Interpolator
This class contains methods that perform cubic spline 1D interpolation.
- Parameters
n_elems (int) – The number of points at which data are defined. This is used to create data arrays of the correct size, which are later used for the interpolation.
- class pylag.interpolation.Interpolator
Bases:
object
An abstract base class for interpolation schemes
The following method(s) should be implemented in the derived class:
- meth
set_points
- meth
get_value
- meth
get_first_derivative
- class pylag.interpolation.Linear1DInterpolator
Bases:
Interpolator
Linear 1D Interpolator
This class contains methods that perform linear 1D interpolation.
- Parameters
n_elems (int) – The number of points at which data are defined. This is used to create data arrays of the correct size, which are later used for the interpolation.
- pylag.interpolation.get_euclidian_distance(DTYPE_FLOAT_t x1, DTYPE_FLOAT_t y1, DTYPE_FLOAT_t x2, DTYPE_FLOAT_t y2) DTYPE_FLOAT_t
- pylag.interpolation.get_interpolator(config, n_elems)
Interpolator factory method
- Parameters
config (ConfigParser) – Configuration object.
n_elems (int) – The number of points at which data is defined. Used when allocating memory to the interpolating object.
- pylag.interpolation.get_linear_fraction(DTYPE_FLOAT_t var, DTYPE_FLOAT_t var1, DTYPE_FLOAT_t var2) DTYPE_FLOAT_t
- pylag.interpolation.interpolate_within_element_wrapper(vector[DTYPE_FLOAT_t] val, vector[DTYPE_FLOAT_t] phi)
- pylag.interpolation.linear_interp(DTYPE_FLOAT_t fraction, DTYPE_FLOAT_t val_last, DTYPE_FLOAT_t val_next) DTYPE_FLOAT_t