qimpy.math.quintic_spline.Interpolator
- class Interpolator(x, dx, deriv=0)
Bases:
object
Interpolate by evaluating quintic blip functions. Create Interpolator object for a set of points to calculate for, and then use it with any blip coefficients generated with same spacing. Typical usage:
y_coeff = get_coeff(y_samples) # convert samples to blip coefficients interp = Interpolator(x, dx) # create interpolator for points x y = interp(y_coeff) # interpolate y_samples at locations x
- Parameters:
x (Tensor) –
dx (float) –
deriv (int) –
- __init__(x, dx, deriv=0)
Initialize interpolator for evaluating at points x. Here dx is the spacing between coefficients that this will be used with later. Optionally, initialize to calculate derivative of order deriv (must be <= 4, since quintic splines are \(C^4\) continuous).
- Parameters:
x (Tensor) –
dx (float) –
deriv (int) –
Methods
Initialize interpolator for evaluating at points x.