LAL  7.5.0.1-08ee4f4
TriggerInterpolation.c File Reference

Prototypes

static int XLALCOMPLEX8ApplyTriggerInterpolant (void *interp, XLALCOMPLEX16ApplyFunc applyfunc, int window, double *tmax, COMPLEX8 *ymax, const COMPLEX8 *y)
 
static int XLALREAL8ApplyTriggerInterpolant (void *interp, XLALCOMPLEX16ApplyFunc applyfunc, int window, double *tmax, REAL8 *ymax, const REAL8 *y)
 
static int XLALREAL4ApplyTriggerInterpolant (void *interp, XLALCOMPLEX16ApplyFunc applyfunc, int window, double *tmax, REAL4 *ymax, const REAL4 *y)
 
static double cabs2 (COMPLEX16 z)
 
static size_t poly_strip (const double *a, size_t n)
 
static void poly_mac (double *y, const double *a, size_t na, const double *b, size_t nb)
 
static void poly_der (double *a, size_t n)
 
static void poly_interp (double *a, const double y_0, const double y_1, const double y_2, const double y_3)
 
static int interp_find_roots (size_t *nroots, COMPLEX16 *roots, const double *are, const double *aim, size_t n, gsl_poly_complex_workspace *workspace)
 Treat are and aim as the real and imaginary parts of a polynomial with
complex coefficients. More...
 
static int cubic_interp_1 (gsl_poly_complex_workspace *workspace, double *t, COMPLEX16 *val, const COMPLEX16 *y)
 Perform cubic spline interpolation of a trigger. More...
 
CubicSplineTriggerInterpolant * XLALCreateCubicSplineTriggerInterpolant (unsigned int window)
 Constructor. More...
 
void XLALDestroyCubicSplineTriggerInterpolant (CubicSplineTriggerInterpolant *interp)
 Destructor. More...
 
int XLALCOMPLEX16ApplyCubicSplineTriggerInterpolant (CubicSplineTriggerInterpolant *interp, double *t, COMPLEX16 *y, const COMPLEX16 *data)
 Perform interpolation using the allocated workspace. More...
 
int XLALCOMPLEX8ApplyCubicSplineTriggerInterpolant (CubicSplineTriggerInterpolant *interp, double *tmax, COMPLEX8 *ymax, const COMPLEX8 *y)
 
int XLALREAL8ApplyCubicSplineTriggerInterpolant (CubicSplineTriggerInterpolant *interp, double *tmax, REAL8 *ymax, const REAL8 *y)
 
int XLALREAL4ApplyCubicSplineTriggerInterpolant (CubicSplineTriggerInterpolant *interp, double *tmax, REAL4 *ymax, const REAL4 *y)
 
static double lanczos (double t, double a)
 
static COMPLEX16 lanczos_interpolant (double t, const LanczosTriggerInterpolantParams *params)
 
static double lanczos_cost (double t, void *params)
 
LanczosTriggerInterpolant * XLALCreateLanczosTriggerInterpolant (unsigned int window)
 Constructor. More...
 
void XLALDestroyLanczosTriggerInterpolant (LanczosTriggerInterpolant *interp)
 Destructor. More...
 
int XLALCOMPLEX16ApplyLanczosTriggerInterpolant (LanczosTriggerInterpolant *interp, double *t, COMPLEX16 *y, const COMPLEX16 *data)
 Perform interpolation using the allocated workspace. More...
 
int XLALCOMPLEX8ApplyLanczosTriggerInterpolant (LanczosTriggerInterpolant *interp, double *tmax, COMPLEX8 *ymax, const COMPLEX8 *y)
 
int XLALREAL8ApplyLanczosTriggerInterpolant (LanczosTriggerInterpolant *interp, double *tmax, REAL8 *ymax, const REAL8 *y)
 
int XLALREAL4ApplyLanczosTriggerInterpolant (LanczosTriggerInterpolant *interp, double *tmax, REAL4 *ymax, const REAL4 *y)
 
NearestNeighborTriggerInterpolant * XLALCreateNearestNeighborTriggerInterpolant (unsigned int window)
 Constructor. More...
 
void XLALDestroyNearestNeighborTriggerInterpolant (NearestNeighborTriggerInterpolant *interp)
 Destructor. More...
 
int XLALCOMPLEX16ApplyNearestNeighborTriggerInterpolant (__attribute__((unused)) NearestNeighborTriggerInterpolant *interp, double *t, COMPLEX16 *y, const COMPLEX16 *data)
 
int XLALCOMPLEX8ApplyNearestNeighborTriggerInterpolant (NearestNeighborTriggerInterpolant *interp, double *tmax, COMPLEX8 *ymax, const COMPLEX8 *y)
 
int XLALREAL8ApplyNearestNeighborTriggerInterpolant (NearestNeighborTriggerInterpolant *interp, double *tmax, REAL8 *ymax, const REAL8 *y)
 
int XLALREAL4ApplyNearestNeighborTriggerInterpolant (NearestNeighborTriggerInterpolant *interp, double *tmax, REAL4 *ymax, const REAL4 *y)
 
QuadraticFitTriggerInterpolant * XLALCreateQuadraticFitTriggerInterpolant (unsigned int window)
 Constructor. More...
 
void XLALDestroyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp)
 Destructor. More...
 
int XLALCOMPLEX16ApplyQuadraticFitTriggerInterpolant (QuadraticFitTriggerInterpolant *interp, double *t, COMPLEX16 *y, const COMPLEX16 *data)
 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)
 

Go to the source code of this file.

Data Structures

struct  CubicSplineTriggerInterpolant
 
struct  CubicSplineTriggerInterpolantParams
 
struct  LanczosTriggerInterpolant
 
struct  LanczosTriggerInterpolantParams
 
struct  NearestNeighborTriggerInterpolant
 
struct  QuadraticFitTriggerInterpolant
 

Typedefs

typedef int(* XLALCOMPLEX16ApplyFunc) (void *, double *, COMPLEX16 *, const COMPLEX16 *)
 

Typedef Documentation

◆ XLALCOMPLEX16ApplyFunc

typedef int(* XLALCOMPLEX16ApplyFunc) (void *, double *, COMPLEX16 *, const COMPLEX16 *)

Definition at line 38 of file TriggerInterpolation.c.

Function Documentation

◆ XLALCOMPLEX8ApplyTriggerInterpolant()

static int XLALCOMPLEX8ApplyTriggerInterpolant ( void *  interp,
XLALCOMPLEX16ApplyFunc  applyfunc,
int  window,
double *  tmax,
COMPLEX8 ymax,
const COMPLEX8 y 
)
static

Definition at line 41 of file TriggerInterpolation.c.

◆ XLALREAL8ApplyTriggerInterpolant()

static int XLALREAL8ApplyTriggerInterpolant ( void *  interp,
XLALCOMPLEX16ApplyFunc  applyfunc,
int  window,
double *  tmax,
REAL8 ymax,
const REAL8 y 
)
static

Definition at line 69 of file TriggerInterpolation.c.

◆ XLALREAL4ApplyTriggerInterpolant()

static int XLALREAL4ApplyTriggerInterpolant ( void *  interp,
XLALCOMPLEX16ApplyFunc  applyfunc,
int  window,
double *  tmax,
REAL4 ymax,
const REAL4 y 
)
static

Definition at line 97 of file TriggerInterpolation.c.

◆ cabs2()

static double cabs2 ( COMPLEX16  z)
static

Definition at line 131 of file TriggerInterpolation.c.

◆ poly_strip()

static size_t poly_strip ( const double *  a,
size_t  n 
)
static

Definition at line 157 of file TriggerInterpolation.c.

◆ poly_mac()

static void poly_mac ( double *  y,
const double *  a,
size_t  na,
const double *  b,
size_t  nb 
)
static

Definition at line 166 of file TriggerInterpolation.c.

◆ poly_der()

static void poly_der ( double *  a,
size_t  n 
)
static

Definition at line 178 of file TriggerInterpolation.c.

◆ poly_interp()

static void poly_interp ( double *  a,
const double  y_0,
const double  y_1,
const double  y_2,
const double  y_3 
)
static

Definition at line 187 of file TriggerInterpolation.c.

◆ interp_find_roots()

static int interp_find_roots ( size_t *  nroots,
COMPLEX16 roots,
const double *  are,
const double *  aim,
size_t  n,
gsl_poly_complex_workspace *  workspace 
)
static

Treat are and aim as the real and imaginary parts of a polynomial with
complex coefficients.

Find all local extrema of the absolute value of the polynomial.

Definition at line 201 of file TriggerInterpolation.c.

◆ cubic_interp_1()

static int cubic_interp_1 ( gsl_poly_complex_workspace *  workspace,
double *  t,
COMPLEX16 val,
const COMPLEX16 y 
)
static

Perform cubic spline interpolation of a trigger.

Since cubic splines inherently take into account an even number of samples, we are going to have to call this function twice: once for the first four of the five samples surrounding the trigger and once for the last four of the five samples surrounding the trigger.

Definition at line 243 of file TriggerInterpolation.c.

◆ lanczos()

static double lanczos ( double  t,
double  a 
)
static

Definition at line 427 of file TriggerInterpolation.c.

◆ lanczos_interpolant()

static COMPLEX16 lanczos_interpolant ( double  t,
const LanczosTriggerInterpolantParams params 
)
static

Definition at line 434 of file TriggerInterpolation.c.

◆ lanczos_cost()

static double lanczos_cost ( double  t,
void *  params 
)
static

Definition at line 447 of file TriggerInterpolation.c.

◆ XLALCOMPLEX16ApplyNearestNeighborTriggerInterpolant()

int XLALCOMPLEX16ApplyNearestNeighborTriggerInterpolant ( __attribute__((unused)) NearestNeighborTriggerInterpolant *  interp,
double *  t,
COMPLEX16 y,
const COMPLEX16 data 
)

Definition at line 589 of file TriggerInterpolation.c.