LALPulsar  6.1.0.1-b72065a
UniversalDopplerMetric.c File Reference

Prototypes

static DopplerFstatMetricXLALComputeFmetricFromAtoms (const FmetricAtoms_t *atoms, REAL8 cosi, REAL8 psi)
 Compute the 'F-metric' gF_ij (and also gFav_ij, m1_ij, m2_ij, m3_ij) from the given FmetricAtoms and the signal amplitude parameters. More...
 
static gsl_matrix * XLALComputeFisherFromAtoms (const FmetricAtoms_t *atoms, PulsarAmplitudeParams Amp)
 Function to compute full 4+n dimensional Fisher matric for the full CW parameter-space of Amplitude + Doppler parameters ! More...
 
static double CW_am1_am2_Phi_i_Phi_j (double tt, void *params)
 For gsl-integration: general quadruple product between two antenna-pattern functions am1, am2 in {a(t),b(t)} and two phase-derivatives phi_i * phi_j, i.e. More...
 
static double CW_Phi_i (double tt, void *params)
 Partial derivative of continuous-wave (CW) phase, with respect to Doppler coordinate 'i' := intparams_t->phderiv. More...
 
static double XLALAverage_am1_am2_Phi_i_Phi_j (const intparams_t *params, double *relerr_max)
 Integrate a general quadruple product CW_am1_am2_Phi_i_Phi_j() from 0 to 1. More...
 
static double XLALCovariance_Phi_ij (const MultiLALDetector *multiIFO, const MultiNoiseFloor *multiNoiseFloor, const LALSegList *segList, const intparams_t *params, double *relerr_max)
 Compute a pure phase-deriv covariance \( [\phi_i, \phi_j] = \langle phi_i phi_j\rangle - \langle phi_i\rangle\langle phi_j\rangle \) which gives a component of the "phase metric". More...
 
static UINT4 findHighestGCSpinOrder (const DopplerCoordinateSystem *coordSys)
 Return the highest 'global-correlation' spindown order found in this coordinate system. More...
 
REAL8 XLALComputePhaseDerivative (REAL8 t, const PulsarDopplerParams *dopplerPoint, DopplerCoordinateID coordID, const EphemerisData *edat, const LALDetector *site, BOOLEAN includeRoemer)
 
int XLALDetectorPosVel (PosVel3D_t *spin_posvel, PosVel3D_t *orbit_posvel, const LIGOTimeGPS *tGPS, const LALDetector *site, const EphemerisData *edat, DetectorMotionType detMotionType)
 Given a GPS time and detector, return the current position (and velocity) of the detector. More...
 
int XLALPtolemaicPosVel (PosVel3D_t *posvel, const LIGOTimeGPS *tGPS)
 Compute position and velocity assuming a purely "Ptolemaic" orbital motion (i.e. More...
 
DopplerPhaseMetricXLALComputeDopplerPhaseMetric (const DopplerMetricParams *metricParams, const EphemerisData *edat)
 Calculate an approximate "phase-metric" with the specified parameters. More...
 
void XLALDestroyDopplerPhaseMetric (DopplerPhaseMetric *metric)
 Free a DopplerPhaseMetric structure. More...
 
DopplerFstatMetricXLALComputeDopplerFstatMetric (const DopplerMetricParams *metricParams, const EphemerisData *edat)
 Calculate the general (single-segment coherent, or multi-segment semi-coherent) full (multi-IFO) Fstat-metrix and the Fisher-matrix derived in [20] . More...
 
void XLALDestroyDopplerFstatMetric (DopplerFstatMetric *metric)
 Free a DopplerFstatMetric structure. More...
 
FmetricAtoms_tXLALComputeAtomsForFmetric (const DopplerMetricParams *metricParams, const EphemerisData *edat)
 Function to the compute the FmetricAtoms_t, from which the F-metric and Fisher-matrix can be computed. More...
 
int XLALParseDetectorMotionString (const CHAR *detMotionString)
 Parse a detector-motion type string into the corresponding enum-number,. More...
 
const CHARXLALDetectorMotionName (DetectorMotionType detMotionType)
 Provide a pointer to a static string containing the DopplerCoordinate-name cooresponding to the enum DopplerCoordinateID. More...
 
int XLALParseDopplerCoordinateString (const CHAR *coordName)
 Parse a DopplerCoordinate-name into the corresponding DopplerCoordinateID. More...
 
int XLALDopplerCoordinateNames2System (DopplerCoordinateSystem *coordSys, const LALStringVector *coordNames)
 Given a LALStringVector of coordinate-names, parse them into a 'DopplerCoordinateSystem', namely a list of coordinate-IDs. More...
 
int XLALFindDopplerCoordinateInSystem (const DopplerCoordinateSystem *coordSys, const DopplerCoordinateID coordID)
 Given a coordinate ID 'coordID', return its dimension within the given coordinate system 'coordSys', or return -1 if 'coordID' is not found. More...
 
const CHARXLALDopplerCoordinateName (DopplerCoordinateID coordID)
 Provide a pointer to a static string containing the DopplerCoordinate-name cooresponding to the enum DopplerCoordinateID. More...
 
const CHARXLALDopplerCoordinateHelp (DopplerCoordinateID coordID)
 Provide a pointer to a static string containing the a descriptive 'help-string' describing the coordinate DopplerCoordinateID. More...
 
CHARXLALDopplerCoordinateHelpAll (void)
 Return a string (allocated here) containing a full name - helpstring listing for all doppler-coordinates DopplerCoordinateID allowed by UniversalDopplerMetric.c. More...
 
void XLALDestroyFmetricAtoms (FmetricAtoms_t *atoms)
 Free a FmetricAtoms_t structure, allowing any pointers to be NULL. More...
 
void XLALequatorialVect2ecliptic (vect3D_t out, const vect3D_t in)
 Convert 3-D vector from equatorial into ecliptic coordinates. More...
 
void XLALeclipticVect2equatorial (vect3D_t out, const vect3D_t in)
 Convert 3-D vector from ecliptic into equatorial coordinates. More...
 
void XLALmatrix33_in_vect3 (vect3D_t out, mat33_t mat, const vect3D_t in)
 compute matrix product mat . More...
 
vect3Dlist_tXLALComputeOrbitalDerivatives (UINT4 maxorder, const LIGOTimeGPS *tGPS, const EphemerisData *edat)
 Compute time-derivatives up to 'maxorder' of the Earths' orbital position vector \( r_{\mathrm{orb}}(t) \) . More...
 
void XLALDestroyVect3Dlist (vect3Dlist_t *list)
 

Go to the source code of this file.

Data Structures

struct  intparams_t
 parameters for metric-integration More...
 

Macros

#define POW2(a)   ( (a) * (a) )
 Function to compute the full F-statistic metric, including antenna-pattern functions from multi-detector, as derived in [20] . More...
 
#define POW3(a)   ( (a) * (a) * (a) )
 
#define POW4(a)   ( (a) * (a) * (a) * (a) )
 
#define POW5(a)   ( (a) * (a) * (a) * (a) * (a) )
 
#define SCALE_R   (LAL_AU_SI)
 
#define SCALE_T   (LAL_YRSID_SI)
 
#define DETMOTION_NAMES(orbit_type, spin_orbit_name, nospin_orbit_name)
 
#define TRUE   (1==1)
 
#define FALSE   (0==1)
 
#define GET_COORD_ID(coordSys, coord)   ( (coord) >= 0 ? (coordSys)->coordIDs[(coord)] : DOPPLERCOORD_NONE )
 
#define GET_COORD_NAME(coordSys, coord)   ( (coord) >= 0 ? DopplerCoordinates[GET_COORD_ID(coordSys, coord)].name : "(none)" )
 
#define GET_COORD_SCALE(coordSys, coord)   ( (coord) >= 0 ? DopplerCoordinates[GET_COORD_ID(coordSys, coord)].scale : 1.0 )
 
#define COPY_VECT(dst, src)   do { (dst)[0] = (src)[0]; (dst)[1] = (src)[1]; (dst)[2] = (src)[2]; } while(0)
 copy 3 components of Euklidean vector More...
 
#define DOT_VECT(u, v)   ((u)[0]*(v)[0] + (u)[1]*(v)[1] + (u)[2]*(v)[2])
 Simple Euklidean scalar product for two 3-dim vectors in cartesian coords. More...
 
#define CROSS_VECT_0(u, v)   ((u)[1]*(v)[2] - (u)[2]*(v)[1])
 Vector product of two 3-dim vectors in cartesian coords. More...
 
#define CROSS_VECT_1(u, v)   ((u)[2]*(v)[0] - (u)[0]*(v)[2])
 
#define CROSS_VECT_2(u, v)   ((u)[0]*(v)[1] - (u)[1]*(v)[0])
 
#define CROSS_VECT(x, u, v)   do { (x)[0] = CROSS_VECT_0(u,v); (x)[1] = CROSS_VECT_1(u,v); (x)[2] = CROSS_VECT_2(u,v); } while (0)
 
#define ZERO_VECT(v)   do{ (v)[0] = 0; (v)[1] = 0; (v)[2] = 0; } while(0)
 Operations on 3-dim vectors
More...
 
#define NORMSQ_VECT(v)   DOT_VECT(v,v)
 
#define NORM_VECT(v)   sqrt(NORMSQ_VECT(v))
 
#define MULT_VECT(v, lam)   do{ (v)[0] *= (lam); (v)[1] *= (lam); (v)[2] *= (lam); } while(0)
 
#define ADD_VECT(dst, src)   do { (dst)[0] += (src)[0]; (dst)[1] += (src)[1]; (dst)[2] += (src)[2]; } while(0)
 
#define SUB_VECT(dst, src)   do { (dst)[0] -= (src)[0]; (dst)[1] -= (src)[1]; (dst)[2] -= (src)[2]; } while(0)
 
#define EQU_VECT_TO_ECL(dst, src)
 Convert 3-D vector from equatorial into ecliptic coordinates. More...
 
#define ECL_VECT_TO_EQU(dst, src)
 Convert 3-D vector from ecliptic into equatorial coordinates. More...
 
#define SQUARE(x)   ((x) * (x))
 
#define GPS2REAL8(gps)   (1.0 * (gps).gpsSeconds + 1.e-9 * (gps).gpsNanoSeconds )
 convert GPS-time to REAL8 More...
 
#define MYMAX(a, b)   ( (a) > (b) ? (a) : (b) )
 
#define MYMIN(a, b)   ( (a) < (b) ? (a) : (b) )
 
#define RELERR(dx, x)   ( (x) == 0 ? (dx) : ( (dx) / (x) ) )
 
#define MAX_SPDNORDER   4
 
#define DERIV5P_1(pm2, pm1, p0, pp1, pp2, h)   ( ( (pm2) - 8.0 * (pm1) + 8.0 * (pp1) - (pp2)) / ( 12.0 * (h) ) )
 5-point derivative formulas (eg see http://math.fullerton.edu/mathews/articles/2003NumericalDiffFormulae.pdf) More...
 
#define DERIV5P_2(pm2, pm1, p0, pp1, pp2, h)   ( (-(pm2) + 16.0 * (pm1) - 30.0 * (p0) + 16.0 * (pp1) - (pp2) ) / ( 12.0 * (h) * (h) ) )
 
#define DERIV5P_3(pm2, pm1, p0, pp1, pp2, h)   ( (-(pm2) + 2.0 * (pm1) - 2.0 * (pp1) + (pp2) ) / ( 2.0 * (h) * (h) * (h) ) )
 
#define DERIV5P_4(pm2, pm1, p0, pp1, pp2, h)   ( ( (pm2) - 4.0 * (pm1) + 6.0 * (p0) - 4.0 * (pp1) + (pp2) ) / ( (h) * (h) * (h) * (h) ) )
 
#define rOrb_c   (LAL_AU_SI / LAL_C_SI)
 
#define rEarth_c   (LAL_REARTH_SI / LAL_C_SI)
 
#define vOrb_c   (LAL_TWOPI * LAL_AU_SI / LAL_C_SI / LAL_YRSID_SI)
 
#define HEADER   "Doppler-coordinate names and explanations:\n--------------------------------------------------\n"
 

Enumerations

enum  AM_comp_t { AMCOMP_NONE = -1 , AMCOMP_A = 0 , AMCOMP_B , AMCOMP_LAST }
 components of antenna-pattern function: q_l = {a(t), b(t)} More...
 

Variables

struct {
   const DetectorMotionType   type
 
   const char *const   name
 
DetectorMotionNames []
 Array of symbolic 'names' for various detector-motions. More...
 
struct {
   const char *const   name
 coordinate name More...
 
   const double   scale
 multiplicative scaling factor of the coordinate More...
 
   const char *const   help
 help string explaining the coordinate's meaning and units More...
 
DopplerCoordinates [DOPPLERCOORD_LAST]
 Array of descriptor structs for each Doppler coordinate name. More...
 

Macro Definition Documentation

◆ POW3

#define POW3 (   a)    ( (a) * (a) * (a) )

Definition at line 61 of file UniversalDopplerMetric.c.

◆ POW4

#define POW4 (   a)    ( (a) * (a) * (a) * (a) )

Definition at line 62 of file UniversalDopplerMetric.c.

◆ POW5

#define POW5 (   a)    ( (a) * (a) * (a) * (a) * (a) )

Definition at line 63 of file UniversalDopplerMetric.c.

◆ SCALE_R

#define SCALE_R   (LAL_AU_SI)

Definition at line 68 of file UniversalDopplerMetric.c.

◆ SCALE_T

#define SCALE_T   (LAL_YRSID_SI)

Definition at line 69 of file UniversalDopplerMetric.c.

◆ DETMOTION_NAMES

#define DETMOTION_NAMES (   orbit_type,
  spin_orbit_name,
  nospin_orbit_name 
)
Value:
{DETMOTION_SPIN | orbit_type, "spin" spin_orbit_name}, \
{DETMOTION_SPINZ | orbit_type, "spinz" spin_orbit_name}, \
{DETMOTION_SPINXY | orbit_type, "spinxy" spin_orbit_name}, \
{orbit_type, nospin_orbit_name} /* this must be the last entry in the macro */
@ DETMOTION_SPIN
Full spin motion.
@ DETMOTION_SPINXY
Ecliptic-X+Y components of spin motion only.
@ DETMOTION_SPINZ
Ecliptic-Z component of spin motion only.

◆ TRUE

#define TRUE   (1==1)

Definition at line 153 of file UniversalDopplerMetric.c.

◆ FALSE

#define FALSE   (0==1)

Definition at line 154 of file UniversalDopplerMetric.c.

◆ GET_COORD_ID

#define GET_COORD_ID (   coordSys,
  coord 
)    ( (coord) >= 0 ? (coordSys)->coordIDs[(coord)] : DOPPLERCOORD_NONE )

Definition at line 157 of file UniversalDopplerMetric.c.

◆ GET_COORD_NAME

#define GET_COORD_NAME (   coordSys,
  coord 
)    ( (coord) >= 0 ? DopplerCoordinates[GET_COORD_ID(coordSys, coord)].name : "(none)" )

Definition at line 160 of file UniversalDopplerMetric.c.

◆ GET_COORD_SCALE

#define GET_COORD_SCALE (   coordSys,
  coord 
)    ( (coord) >= 0 ? DopplerCoordinates[GET_COORD_ID(coordSys, coord)].scale : 1.0 )

Definition at line 161 of file UniversalDopplerMetric.c.

◆ COPY_VECT

#define COPY_VECT (   dst,
  src 
)    do { (dst)[0] = (src)[0]; (dst)[1] = (src)[1]; (dst)[2] = (src)[2]; } while(0)

copy 3 components of Euklidean vector

Definition at line 164 of file UniversalDopplerMetric.c.

◆ DOT_VECT

#define DOT_VECT (   u,
 
)    ((u)[0]*(v)[0] + (u)[1]*(v)[1] + (u)[2]*(v)[2])

Simple Euklidean scalar product for two 3-dim vectors in cartesian coords.

Definition at line 167 of file UniversalDopplerMetric.c.

◆ CROSS_VECT_0

#define CROSS_VECT_0 (   u,
 
)    ((u)[1]*(v)[2] - (u)[2]*(v)[1])

Vector product of two 3-dim vectors in cartesian coords.

Definition at line 170 of file UniversalDopplerMetric.c.

◆ CROSS_VECT_1

#define CROSS_VECT_1 (   u,
 
)    ((u)[2]*(v)[0] - (u)[0]*(v)[2])

Definition at line 171 of file UniversalDopplerMetric.c.

◆ CROSS_VECT_2

#define CROSS_VECT_2 (   u,
 
)    ((u)[0]*(v)[1] - (u)[1]*(v)[0])

Definition at line 172 of file UniversalDopplerMetric.c.

◆ CROSS_VECT

#define CROSS_VECT (   x,
  u,
 
)    do { (x)[0] = CROSS_VECT_0(u,v); (x)[1] = CROSS_VECT_1(u,v); (x)[2] = CROSS_VECT_2(u,v); } while (0)

Definition at line 173 of file UniversalDopplerMetric.c.

◆ ZERO_VECT

#define ZERO_VECT (   v)    do{ (v)[0] = 0; (v)[1] = 0; (v)[2] = 0; } while(0)

Operations on 3-dim vectors

Definition at line 176 of file UniversalDopplerMetric.c.

◆ NORMSQ_VECT

#define NORMSQ_VECT (   v)    DOT_VECT(v,v)

Definition at line 177 of file UniversalDopplerMetric.c.

◆ NORM_VECT

#define NORM_VECT (   v)    sqrt(NORMSQ_VECT(v))

Definition at line 178 of file UniversalDopplerMetric.c.

◆ MULT_VECT

#define MULT_VECT (   v,
  lam 
)    do{ (v)[0] *= (lam); (v)[1] *= (lam); (v)[2] *= (lam); } while(0)

Definition at line 179 of file UniversalDopplerMetric.c.

◆ ADD_VECT

#define ADD_VECT (   dst,
  src 
)    do { (dst)[0] += (src)[0]; (dst)[1] += (src)[1]; (dst)[2] += (src)[2]; } while(0)

Definition at line 180 of file UniversalDopplerMetric.c.

◆ SUB_VECT

#define SUB_VECT (   dst,
  src 
)    do { (dst)[0] -= (src)[0]; (dst)[1] -= (src)[1]; (dst)[2] -= (src)[2]; } while(0)

Definition at line 181 of file UniversalDopplerMetric.c.

◆ EQU_VECT_TO_ECL

#define EQU_VECT_TO_ECL (   dst,
  src 
)
Value:
do { \
(dst)[0] = (src)[0]; \
(dst)[1] = (src)[1]*LAL_COSIEARTH + (src)[2]*LAL_SINIEARTH; \
(dst)[2] = (src)[2]*LAL_COSIEARTH - (src)[1]*LAL_SINIEARTH; \
} while(0)
#define LAL_COSIEARTH
dst
src

Convert 3-D vector from equatorial into ecliptic coordinates.

Definition at line 184 of file UniversalDopplerMetric.c.

◆ ECL_VECT_TO_EQU

#define ECL_VECT_TO_EQU (   dst,
  src 
)
Value:
do { \
(dst)[0] = (src)[0]; \
(dst)[1] = (src)[1]*LAL_COSIEARTH - (src)[2]*LAL_SINIEARTH; \
(dst)[2] = (src)[2]*LAL_COSIEARTH + (src)[1]*LAL_SINIEARTH; \
} while(0)

Convert 3-D vector from ecliptic into equatorial coordinates.

Definition at line 191 of file UniversalDopplerMetric.c.

◆ SQUARE

#define SQUARE (   x)    ((x) * (x))

Definition at line 197 of file UniversalDopplerMetric.c.

◆ GPS2REAL8

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

convert GPS-time to REAL8

Definition at line 200 of file UniversalDopplerMetric.c.

◆ MYMAX

#define MYMAX (   a,
 
)    ( (a) > (b) ? (a) : (b) )

Definition at line 202 of file UniversalDopplerMetric.c.

◆ MYMIN

#define MYMIN (   a,
 
)    ( (a) < (b) ? (a) : (b) )

Definition at line 203 of file UniversalDopplerMetric.c.

◆ RELERR

#define RELERR (   dx,
  x 
)    ( (x) == 0 ? (dx) : ( (dx) / (x) ) )

Definition at line 205 of file UniversalDopplerMetric.c.

◆ MAX_SPDNORDER

#define MAX_SPDNORDER   4

Definition at line 208 of file UniversalDopplerMetric.c.

◆ DERIV5P_1

#define DERIV5P_1 (   pm2,
  pm1,
  p0,
  pp1,
  pp2,
 
)    ( ( (pm2) - 8.0 * (pm1) + 8.0 * (pp1) - (pp2)) / ( 12.0 * (h) ) )

5-point derivative formulas (eg see http://math.fullerton.edu/mathews/articles/2003NumericalDiffFormulae.pdf)

Definition at line 211 of file UniversalDopplerMetric.c.

◆ DERIV5P_2

#define DERIV5P_2 (   pm2,
  pm1,
  p0,
  pp1,
  pp2,
 
)    ( (-(pm2) + 16.0 * (pm1) - 30.0 * (p0) + 16.0 * (pp1) - (pp2) ) / ( 12.0 * (h) * (h) ) )

Definition at line 212 of file UniversalDopplerMetric.c.

◆ DERIV5P_3

#define DERIV5P_3 (   pm2,
  pm1,
  p0,
  pp1,
  pp2,
 
)    ( (-(pm2) + 2.0 * (pm1) - 2.0 * (pp1) + (pp2) ) / ( 2.0 * (h) * (h) * (h) ) )

Definition at line 213 of file UniversalDopplerMetric.c.

◆ DERIV5P_4

#define DERIV5P_4 (   pm2,
  pm1,
  p0,
  pp1,
  pp2,
 
)    ( ( (pm2) - 4.0 * (pm1) + 6.0 * (p0) - 4.0 * (pp1) + (pp2) ) / ( (h) * (h) * (h) * (h) ) )

Definition at line 214 of file UniversalDopplerMetric.c.

◆ rOrb_c

#define rOrb_c   (LAL_AU_SI / LAL_C_SI)

Definition at line 255 of file UniversalDopplerMetric.c.

◆ rEarth_c

#define rEarth_c   (LAL_REARTH_SI / LAL_C_SI)

Definition at line 256 of file UniversalDopplerMetric.c.

◆ vOrb_c

#define vOrb_c   (LAL_TWOPI * LAL_AU_SI / LAL_C_SI / LAL_YRSID_SI)

Definition at line 257 of file UniversalDopplerMetric.c.

◆ HEADER

#define HEADER   "Doppler-coordinate names and explanations:\n--------------------------------------------------\n"

Enumeration Type Documentation

◆ AM_comp_t

enum AM_comp_t

components of antenna-pattern function: q_l = {a(t), b(t)}

Enumerator
AMCOMP_NONE 

no antenna pattern function: (equivalent "a = 1")

AMCOMP_A 

a(t)

AMCOMP_B 

b(t)

AMCOMP_LAST 

Definition at line 222 of file UniversalDopplerMetric.c.

Variable Documentation

◆ type

Definition at line 77 of file UniversalDopplerMetric.c.

◆ name

const char* const name

coordinate name

Definition at line 78 of file UniversalDopplerMetric.c.

◆ 

const { ... } DetectorMotionNames[]
Initial value:
= {
#define DETMOTION_NAMES(orbit_type, spin_orbit_name, nospin_orbit_name)
DETMOTION_NAMES( DETMOTION_ORBIT, "+orbit", "orbit" ),
DETMOTION_NAMES( DETMOTION_PTOLEORBIT, "+ptoleorbit", "ptoleorbit" ),
DETMOTION_NAMES( 0, "", NULL )
}
#define DETMOTION_NAMES(orbit_type, spin_orbit_name, nospin_orbit_name)
@ DETMOTION_PTOLEORBIT
Ptolemaic (circular) orbital motion.
@ DETMOTION_ORBIT
Ephemeris-based orbital motion.

Array of symbolic 'names' for various detector-motions.

◆ scale

const double scale

multiplicative scaling factor of the coordinate

Definition at line 99 of file UniversalDopplerMetric.c.

◆ help

const char* const help

help string explaining the coordinate's meaning and units

Definition at line 100 of file UniversalDopplerMetric.c.

◆ 

const { ... } DopplerCoordinates[DOPPLERCOORD_LAST]

Array of descriptor structs for each Doppler coordinate name.