LAL  7.5.0.1-08ee4f4
Trigger Interpolation

Detailed Description

This module implements several algorithms for performing sub-sample interpolation of peaks in the output of a matched filter.

The interface for each algorithm is the same. To illustrate, here is a description of the interface for the 'Lanczos' algorithm.

There is an opaque data type called LanczosTriggerInterpolant that holds workspaces for performing the interpolation. To create one, call the function XLALCreateLanczosTriggerInterpolant as follows:

LanczosTriggerInterpolant *interp = XLALCreateLanczosTriggerInterpolant(5);
LanczosTriggerInterpolant * XLALCreateLanczosTriggerInterpolant(unsigned int window)
Constructor.

The '5' is the interpolation window. In this example, the interpolation will take into account a given sample, the 5 samples before, and the 5 samples after, for a total of 11 samples.

To apply the interpolant to a time series, call XLALApplyLanczosTriggerInterpolant. It is requried that |y[0]| >= |y[i]| for all i from -window to +window. Suppose that you have a complex array y:

COMPLEX16 y[] = {...};
double complex COMPLEX16
Double-precision floating-point complex number (16 bytes total)

and suppose that the maximum of |y[i]| occurs at i = 8. To interpolate the time and complex value at which the maximum occurs, do the following:

double tmax;
COMPLEX16 ymax;
int result = XLALApplyLanczosTriggerInterpolant(interp, &tmax, &ymax, &y[8]);

Upon success, the return value of XLALApplyLanczosTriggerInterpolant is zero, the interpolated index of the maximum sample is 8 + *tmax, and the interpolated value is in ymax. Upon failure, the return value is nonzero and neither *tmax nor *ymax are modified.

When you are done, release all of the workspace resources associated with the interpolant with:

void XLALDestroyLanczosTriggerInterpolant(LanczosTriggerInterpolant *interp)
Destructor.

Modules

 Cubic Spline Trigger Interpolant
 Catmull-Rom cubic spline interpolation.
 
 Lanczos Trigger Interpolant
 Lanczos interpolation.
 
 Nearest Neighbor Trigger Interpolant
 Nearest-neighbor interpolation.
 
 Quadratic Fit Trigger Interpolant
 Quadratic fit.