Quadratic fit.
Fit a quadratic function to the absolute value of the data. Report the sample index of the vertex if the vertex is a maximum. Note that this is not actually an interpolant because it is not guaranteed to agree with the input data points, and that it always sets *ymax = data[0].
Prototypes | |
QuadraticFitTriggerInterpolant * | XLALCreateQuadraticFitTriggerInterpolant (unsigned int window) |
Constructor. More... | |
void | XLALDestroyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *) |
Destructor. More... | |
int | XLALCOMPLEX16ApplyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp, double *tmax, COMPLEX16 *ymax, const COMPLEX16 *y) |
Perform interpolation using the allocated workspace. More... | |
int | XLALCOMPLEX8ApplyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp, double *tmax, COMPLEX8 *ymax, const COMPLEX8 *y) |
int | XLALREAL8ApplyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp, double *tmax, REAL8 *ymax, const REAL8 *y) |
int | XLALREAL4ApplyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp, double *tmax, REAL4 *ymax, const REAL4 *y) |
QuadraticFitTriggerInterpolant* XLALCreateQuadraticFitTriggerInterpolant | ( | unsigned int | window | ) |
Constructor.
Allocate a new interpolation workspace and return a pointer to it, or NULL if an error occurs.
Definition at line 652 of file TriggerInterpolation.c.
void XLALDestroyQuadraticFitTriggerInterpolant | ( | QuadraticFitTriggerInterpolant * | interp | ) |
Destructor.
If the workspace is non-NULL, deallocate it.
Definition at line 702 of file TriggerInterpolation.c.
int XLALCOMPLEX16ApplyQuadraticFitTriggerInterpolant | ( | QuadraticFitTriggerInterpolant * | interp, |
double * | tmax, | ||
COMPLEX16 * | ymax, | ||
const COMPLEX16 * | y | ||
) |
Perform interpolation using the allocated workspace.
Perform interpolation around the matched-filter output data pointed to by y
. There should exist window
samples before and window
samples after this pointer.
On success, set *tmax
to the interpolated time, *ymax
to the complex interpolated signal, and return 0. On failure, return a non-zero GSL error code.
Definition at line 721 of file TriggerInterpolation.c.
int XLALCOMPLEX8ApplyQuadraticFitTriggerInterpolant | ( | QuadraticFitTriggerInterpolant * | interp, |
double * | tmax, | ||
COMPLEX8 * | ymax, | ||
const COMPLEX8 * | y | ||
) |
Definition at line 754 of file TriggerInterpolation.c.
int XLALREAL8ApplyQuadraticFitTriggerInterpolant | ( | QuadraticFitTriggerInterpolant * | interp, |
double * | tmax, | ||
REAL8 * | ymax, | ||
const REAL8 * | y | ||
) |
Definition at line 766 of file TriggerInterpolation.c.
int XLALREAL4ApplyQuadraticFitTriggerInterpolant | ( | QuadraticFitTriggerInterpolant * | interp, |
double * | tmax, | ||
REAL4 * | ymax, | ||
const REAL4 * | y | ||
) |
Definition at line 778 of file TriggerInterpolation.c.