LALPulsar  6.1.0.1-b72065a
BinarySSBTimesTest.c File Reference

Tests for XLALAdd[Multi]BinaryTimes() More...

Prototypes

static void LALGetBinarytimes (LALStatus *status, SSBtimes *tBinary, const SSBtimes *tSSB, const DetectorStateSeries *DetectorStates, const BinaryOrbitParams *binaryparams, LIGOTimeGPS refTime)
 For a given OrbitalParams, calculate the time-differences \( \Delta T_\alpha\equiv T(t_\alpha) - T_0 \) , and their derivatives \( Tdot_\alpha \equiv d T / d t (t_\alpha) \) . More...
 
static void LALGetMultiBinarytimes (LALStatus *status, MultiSSBtimes **multiBinary, const MultiSSBtimes *multiSSB, const MultiDetectorStateSeries *multiDetStates, const BinaryOrbitParams *binaryparams, LIGOTimeGPS refTime)
 Multi-IFO version of LALGetBinarytimes(). More...
 
static void EccentricAnomoly (LALStatus *status, REAL8 *tr, REAL8 lE, void *x0)
 For a given set of binary parameters we solve the following function for the eccentric anomoly E. More...
 
int XLALCompareSSBtimes (REAL8 *err_DeltaT, REAL8 *err_Tdot, const SSBtimes *t1, const SSBtimes *t2)
 Compare 2 SSBtimes vectors and return the maximal difference in DeltaT in s, and in Tdot (dimensionless) More...
 
int XLALCompareMultiSSBtimes (REAL8 *err_DeltaT, REAL8 *err_Tdot, const MultiSSBtimes *m1, const MultiSSBtimes *m2)
 Compare 2 MultiSSBtimes vectors and return the maximal difference in DeltaT in s, and in Tdot (dimensionless) More...
 
int main (int argc, char *argv[])
 

Detailed Description

Tests for XLALAdd[Multi]BinaryTimes()

Author
Reinhard Prix

We simply compare the results to the old+obsolete LAL functions LALGet[Multi]Binarytimes(), which have been moved here, and only serve for this comparison.

Sky-location is picked at random each time, which allows a minimal Monte-Carlo validation by simply running this script repeatedly.

Definition in file BinarySSBTimesTest.c.

Go to the source code of this file.

Data Structures

struct  UserInput_t
 User-variables: can be set from config-file or command-line.
 
struct  BinaryOrbitParams
 

Macros

#define EA_ACC   1E-9 /* the timing accuracy of LALGetBinaryTimes in seconds */
 
#define GPS2REAL8(gps)   (1.0 * (gps).gpsSeconds + 1.e-9 * (gps).gpsNanoSeconds )
 
#define COMPUTEFSTATC_ENULL   1
 
#define COMPUTEFSTATC_ENONULL   2
 
#define COMPUTEFSTATC_EINPUT   3
 
#define COMPUTEFSTATC_EMEM   4
 
#define COMPUTEFSTATC_EXLAL   5
 
#define COMPUTEFSTATC_EIEEE   6
 
#define COMPUTEFSTATC_MSGENULL   "Arguments contained an unexpected null pointer"
 
#define COMPUTEFSTATC_MSGENONULL   "Output pointer is non-NULL"
 
#define COMPUTEFSTATC_MSGEINPUT   "Invalid input"
 
#define COMPUTEFSTATC_MSGEMEM   "Out of memory. Bad."
 
#define COMPUTEFSTATC_MSGEXLAL   "XLAL function call failed"
 
#define COMPUTEFSTATC_MSGEIEEE   "Floating point failure"
 

Variables

static REAL8 A
 
static REAL8 B
 

Macro Definition Documentation

◆ EA_ACC

#define EA_ACC   1E-9 /* the timing accuracy of LALGetBinaryTimes in seconds */

Definition at line 46 of file BinarySSBTimesTest.c.

◆ GPS2REAL8

#define GPS2REAL8 (   gps)    (1.0 * (gps).gpsSeconds + 1.e-9 * (gps).gpsNanoSeconds )

Definition at line 49 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_ENULL

#define COMPUTEFSTATC_ENULL   1

Definition at line 285 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_ENONULL

#define COMPUTEFSTATC_ENONULL   2

Definition at line 286 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_EINPUT

#define COMPUTEFSTATC_EINPUT   3

Definition at line 287 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_EMEM

#define COMPUTEFSTATC_EMEM   4

Definition at line 288 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_EXLAL

#define COMPUTEFSTATC_EXLAL   5

Definition at line 289 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_EIEEE

#define COMPUTEFSTATC_EIEEE   6

Definition at line 290 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGENULL

#define COMPUTEFSTATC_MSGENULL   "Arguments contained an unexpected null pointer"

Definition at line 292 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGENONULL

#define COMPUTEFSTATC_MSGENONULL   "Output pointer is non-NULL"

Definition at line 293 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGEINPUT

#define COMPUTEFSTATC_MSGEINPUT   "Invalid input"

Definition at line 294 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGEMEM

#define COMPUTEFSTATC_MSGEMEM   "Out of memory. Bad."

Definition at line 295 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGEXLAL

#define COMPUTEFSTATC_MSGEXLAL   "XLAL function call failed"

Definition at line 296 of file BinarySSBTimesTest.c.

◆ COMPUTEFSTATC_MSGEIEEE

#define COMPUTEFSTATC_MSGEIEEE   "Floating point failure"

Definition at line 297 of file BinarySSBTimesTest.c.

Function Documentation

◆ LALGetBinarytimes()

void LALGetBinarytimes ( LALStatus status,
SSBtimes tBinary,
const SSBtimes tSSB,
const DetectorStateSeries DetectorStates,
const BinaryOrbitParams binaryparams,
LIGOTimeGPS  refTime 
)
static

For a given OrbitalParams, calculate the time-differences \( \Delta T_\alpha\equiv T(t_\alpha) - T_0 \) , and their derivatives \( Tdot_\alpha \equiv d T / d t (t_\alpha) \) .

Note
The return-vectors DeltaT and Tdot must be allocated already and have the same length as the input time-series DetStates.
Parameters
statuspointer to LALStatus structure
[out]tBinaryDeltaT_alpha = T(t_alpha) - T_0; and Tdot(t_alpha)
[in]tSSBDeltaT_alpha = T(t_alpha) - T_0; and Tdot(t_alpha)
[in]DetectorStatesdetector-states at timestamps t_i
[in]binaryparamssource binary orbit parameters
refTimeSSB reference-time T_0 of pulsar-parameters

Definition at line 309 of file BinarySSBTimesTest.c.

◆ LALGetMultiBinarytimes()

void LALGetMultiBinarytimes ( LALStatus status,
MultiSSBtimes **  multiBinary,
const MultiSSBtimes multiSSB,
const MultiDetectorStateSeries multiDetStates,
const BinaryOrbitParams binaryparams,
LIGOTimeGPS  refTime 
)
static

Multi-IFO version of LALGetBinarytimes().

Get all binary-timings for all input detector-series.

Parameters
statuspointer to LALStatus structure
[out]multiBinarySSB-timings for all input detector-state series
[in]multiSSBSSB-timings for all input detector-state series
[in]multiDetStatesdetector-states at timestamps t_i
[in]binaryparamssource binary orbit parameters
refTimeSSB reference-time T_0 for SSB-timing

Definition at line 428 of file BinarySSBTimesTest.c.

◆ EccentricAnomoly()

static void EccentricAnomoly ( LALStatus status,
REAL8 tr,
REAL8  lE,
void *  x0 
)
static

For a given set of binary parameters we solve the following function for the eccentric anomoly E.

Definition at line 407 of file BinarySSBTimesTest.c.

◆ XLALCompareSSBtimes()

int XLALCompareSSBtimes ( REAL8 err_DeltaT,
REAL8 err_Tdot,
const SSBtimes t1,
const SSBtimes t2 
)

Compare 2 SSBtimes vectors and return the maximal difference in DeltaT in s, and in Tdot (dimensionless)

Definition at line 247 of file BinarySSBTimesTest.c.

◆ XLALCompareMultiSSBtimes()

int XLALCompareMultiSSBtimes ( REAL8 err_DeltaT,
REAL8 err_Tdot,
const MultiSSBtimes m1,
const MultiSSBtimes m2 
)

Compare 2 MultiSSBtimes vectors and return the maximal difference in DeltaT in s, and in Tdot (dimensionless)

Definition at line 215 of file BinarySSBTimesTest.c.

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 79 of file BinarySSBTimesTest.c.

Variable Documentation

◆ A

REAL8 A
static

Definition at line 52 of file BinarySSBTimesTest.c.

◆ B

REAL8 B
static

Definition at line 52 of file BinarySSBTimesTest.c.