Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-ea7c608
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
SnglInspiralUtils.c File Reference

Provides a set of utilities for manipulating snglInspiralTables. More...

Prototypes

static INT8 end_time (const SnglInspiralTable *x)
 
SnglInspiralTableXLALSortSnglInspiral (SnglInspiralTable *eventHead, int(*comparfunc)(const void *, const void *))
 
int LALCompareSnglInspiralByTime (const void *a, const void *b)
 
SnglInspiralTableXLALTimeCutSingleInspiral (SnglInspiralTable *eventHead, LIGOTimeGPS *startTime, LIGOTimeGPS *endTime)
 
SnglInspiralTableXLALIfoCutSingleInspiral (SnglInspiralTable **eventHead, char *ifo)
 
INT4 XLALCountSnglInspiral (SnglInspiralTable *head)
 
SnglInspiralTableXLALMassCut (SnglInspiralTable *eventHead, const char *massCut, REAL4 massRangeLow, REAL4 massRangeHigh, REAL4 mass2RangeLow, REAL4 mass2RangeHigh)
 

Detailed Description

Provides a set of utilities for manipulating snglInspiralTables.

Author
Brown, D. A., Fairhurst, S. and Messaritaki, E.

Description

The function LALFreeSnglInspiral() and XLALFreeSnglInspiral() free the memory associated to a single inspiral table. The single inspiral table may point to a linked list of EventIDColumns. Thus, it is necessary to free all event ids associated with the single inspiral.

The function LALSortSnglInspiral() and XLALSortSnglInspiral() sorts a list of single inspiral tables. The function simply calls qsort with the appropriate comparison function, comparfunc. It then ensures that the head of the sorted list is returned. There then follow several comparison functions for single inspiral tables. LALCompareSnglInspiralByTime() compares the end times of two single inspiral tables, returnng 1 if the first time is larger, 0 if equal and -1 if the second time is larger.

XLALTimeCutSingleInspiral()takes in a linked list of single inspiral tables and returns only those which occur after the given startTime and before the endTime.

XLALIfoCutSingleInspiral() scans through a linked list of single inspiral table rows and separates the elements into two lists. the return value is the head of the list containing rows from the requested instrument; the original list (the address of whose head might have changed) contains rows not from the requested instrument.

Algorithm

None.

Uses

LALCalloc(), LALFree(), LALINT8NanoSecIsPlayground().

Definition in file SnglInspiralUtils.c.

Go to the source code of this file.

Function Documentation

◆ end_time()

static INT8 end_time ( const SnglInspiralTable x)
static

Definition at line 91 of file SnglInspiralUtils.c.

◆ XLALSortSnglInspiral()

SnglInspiralTable * XLALSortSnglInspiral ( SnglInspiralTable eventHead,
int(*)(const void *, const void *)  comparfunc 
)

Definition at line 98 of file SnglInspiralUtils.c.

◆ LALCompareSnglInspiralByTime()

int LALCompareSnglInspiralByTime ( const void *  a,
const void *  b 
)

Definition at line 149 of file SnglInspiralUtils.c.

◆ XLALTimeCutSingleInspiral()

SnglInspiralTable * XLALTimeCutSingleInspiral ( SnglInspiralTable eventHead,
LIGOTimeGPS startTime,
LIGOTimeGPS endTime 
)

Definition at line 181 of file SnglInspiralUtils.c.

◆ XLALIfoCutSingleInspiral()

SnglInspiralTable * XLALIfoCutSingleInspiral ( SnglInspiralTable **  eventHead,
char ifo 
)

Definition at line 234 of file SnglInspiralUtils.c.

◆ XLALCountSnglInspiral()

INT4 XLALCountSnglInspiral ( SnglInspiralTable head)

Definition at line 300 of file SnglInspiralUtils.c.

◆ XLALMassCut()

SnglInspiralTable * XLALMassCut ( SnglInspiralTable eventHead,
const char massCut,
REAL4  massRangeLow,
REAL4  massRangeHigh,
REAL4  mass2RangeLow,
REAL4  mass2RangeHigh 
)

Definition at line 320 of file SnglInspiralUtils.c.