The only purpose of this file is to serve as a backwards-comparison check for XLALDopplerFstatMetric(). This used to be a standalone-code 'lalapps_FstatMetric', and was XLALified and moved into the test-directory, main() was wrapped into the forwards-compatible function XLALOldDopplerFstatMetric() and called in UniversalDopplerMetricTest for comparison. More...
Prototypes | |
int | InitCode (ConfigVariables *cfg, const DopplerMetricParams *metricParams, const EphemerisData *edat) |
basic initializations: set-up 'ConfigVariables' Taken from FstatMetric where it parsed user-input into ConfigVariables, now basically just translates from modern-API 'metricParams' into old-API 'ConfigVariables' More... | |
MultiPhaseDerivs * | getMultiPhaseDerivs (const MultiDetectorStateSeries *multiDetStates, const DopplerPoint *dopplerPoint, PhaseType_t phaseType) |
calculate the phase-derivatives \( \partial_i \phi \) for the time-series detStates and the given doppler-point. More... | |
int | computeFstatMetric (gsl_matrix *gF_ij, gsl_matrix *gFav_ij, gsl_matrix *m1_ij, gsl_matrix *m2_ij, gsl_matrix *m3_ij, ConfigVariables *cfg) |
int | computePhaseMetric (gsl_matrix *g_ij, const PhaseDerivs *dphi, const REAL8Vector *GLweights) |
int | project_metric (gsl_matrix *ret_ij, gsl_matrix *g_ij, const UINT4 c) |
Calculate the projected metric onto the subspace of 'c' given by ret_ij = g_ij - ( g_ic * g_jc / g_cc ) , where c is the value of the projected coordinate The output-matrix ret must be allocated. More... | |
int | outer_product (gsl_matrix *ret_ij, const gsl_vector *u_i, const gsl_vector *v_j) |
Calculate the outer product ret_ij of vectors u_i and v_j, given by ret_ij = u_i v_j The output-matrix ret must be allocated and have dimensions len(u) x len(v) More... | |
int | symmetrize (gsl_matrix *mat) |
REAL8 | quad_form (const gsl_matrix *mat, const gsl_vector *vec) |
void | getPtolePosVel (PosVel_t *posvel, REAL8 tGPS, REAL8 tAutumnGPS) |
Get Ptolemaic position and velocity at time tGPS cut-down version of LALDTBaryPtolemaic() More... | |
void | XLALDestroyMultiPhaseDerivs (MultiPhaseDerivs *mdPhi) |
void | gauleg (double x1, double x2, double x[], double w[], int n) |
OldDopplerMetric * | XLALOldDopplerFstatMetric (const OldMetricType_t metricType, const DopplerMetricParams *metricParams, const EphemerisData *edat) |
The only purpose of this function is to serve as a backwards-comparison check for XLALDopplerFstatMetric(). More... | |
void | XLALDestroyOldDopplerMetric (OldDopplerMetric *metric) |
Free a OldDopplerMetric structure. More... | |
int | XLALAddOldDopplerMetric (OldDopplerMetric **metric1, const OldDopplerMetric *metric2) |
Add 'metric2' to 'metric1', by adding the matrixes and 'rho2', and adding error-estimates in quadrature. More... | |
int | XLALScaleOldDopplerMetric (OldDopplerMetric *m, REAL8 scale) |
Scale all (existing) matrices, error-estimates and 'rho2' by 'scale'. More... | |
The only purpose of this file is to serve as a backwards-comparison check for XLALDopplerFstatMetric(). This used to be a standalone-code 'lalapps_FstatMetric', and was XLALified and moved into the test-directory, main() was wrapped into the forwards-compatible function XLALOldDopplerFstatMetric() and called in UniversalDopplerMetricTest for comparison.
Definition in file old-FstatMetric.c.
Go to the source code of this file.
Data Structures | |
struct | OldDopplerMetric |
struct | DopplerPoint |
a 'point' in the "Doppler parameter space" {alpha, delta, fkdot } More... | |
struct | PhaseDerivs |
struct | MultiPhaseDerivs |
struct | PosVel_t |
struct | ConfigVariables |
Configuration settings required for and defining a coherent pulsar search. More... | |
Macros | |
#define | NUM_SPINS 2 |
#define | METRIC_DIM 2 + NUM_SPINS |
#define | SCALAR(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 | 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 | SQ(x) ((x) * (x)) |
#define | EPS 3.0e-11 |
Enumerations | |
enum | OldMetricType_t { OLDMETRIC_TYPE_PHASE = 0 , OLDMETRIC_TYPE_FSTAT = 1 , OLDMETRIC_TYPE_ALL = 2 , OLDMETRIC_TYPE_LAST , OLDMETRIC_TYPE_PHASE = 0 , OLDMETRIC_TYPE_FSTAT = 1 , OLDMETRIC_TYPE_ALL = 2 , OLDMETRIC_TYPE_LAST } |
enum | PhaseType_t { PHASE_NONE = -1 , PHASE_FULL = 0 , PHASE_ORBITAL , PHASE_SPIN , PHASE_PTOLE , PHASE_LAST } |
#define NUM_SPINS 2 |
Definition at line 58 of file old-FstatMetric.c.
#define METRIC_DIM 2 + NUM_SPINS |
Definition at line 59 of file old-FstatMetric.c.
Simple Euklidean scalar product for two 3-dim vectors in cartesian coords.
Definition at line 63 of file old-FstatMetric.c.
#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 66 of file old-FstatMetric.c.
Definition at line 68 of file old-FstatMetric.c.
#define EPS 3.0e-11 |
Definition at line 1258 of file old-FstatMetric.c.
enum OldMetricType_t |
Definition at line 71 of file old-FstatMetric.c.
enum PhaseType_t |
Enumerator | |
---|---|
PHASE_NONE | |
PHASE_FULL | |
PHASE_ORBITAL | |
PHASE_SPIN | |
PHASE_PTOLE | |
PHASE_LAST |
Definition at line 96 of file old-FstatMetric.c.
int InitCode | ( | ConfigVariables * | cfg, |
const DopplerMetricParams * | metricParams, | ||
const EphemerisData * | edat | ||
) |
basic initializations: set-up 'ConfigVariables' Taken from FstatMetric where it parsed user-input into ConfigVariables, now basically just translates from modern-API 'metricParams' into old-API 'ConfigVariables'
Definition at line 796 of file old-FstatMetric.c.
MultiPhaseDerivs * getMultiPhaseDerivs | ( | const MultiDetectorStateSeries * | multiDetStates, |
const DopplerPoint * | dopplerPoint, | ||
PhaseType_t | phaseType | ||
) |
calculate the phase-derivatives \( \partial_i \phi \) for the time-series detStates and the given doppler-point.
Has the option of using only the orbital part of the phase (PHASE_ORBITAL) or the full-phase (PHASE_FULL).
returned PhaseDerivs is allocated in here.
Definition at line 949 of file old-FstatMetric.c.
int computeFstatMetric | ( | gsl_matrix * | gF_ij, |
gsl_matrix * | gFav_ij, | ||
gsl_matrix * | m1_ij, | ||
gsl_matrix * | m2_ij, | ||
gsl_matrix * | m3_ij, | ||
ConfigVariables * | cfg | ||
) |
Definition at line 424 of file old-FstatMetric.c.
int computePhaseMetric | ( | gsl_matrix * | g_ij, |
const PhaseDerivs * | dphi, | ||
const REAL8Vector * | GLweights | ||
) |
Definition at line 716 of file old-FstatMetric.c.
Calculate the projected metric onto the subspace of 'c' given by ret_ij = g_ij - ( g_ic * g_jc / g_cc ) , where c is the value of the projected coordinate The output-matrix ret must be allocated.
return 0 = OK, -1 on error.
Definition at line 1067 of file old-FstatMetric.c.
Calculate the outer product ret_ij of vectors u_i and v_j, given by ret_ij = u_i v_j The output-matrix ret must be allocated and have dimensions len(u) x len(v)
return 0 = OK, -1 on error.
Definition at line 1105 of file old-FstatMetric.c.
int symmetrize | ( | gsl_matrix * | mat | ) |
Definition at line 1131 of file old-FstatMetric.c.
Definition at line 1160 of file old-FstatMetric.c.
Get Ptolemaic position and velocity at time tGPS cut-down version of LALDTBaryPtolemaic()
Definition at line 1188 of file old-FstatMetric.c.
void XLALDestroyMultiPhaseDerivs | ( | MultiPhaseDerivs * | mdPhi | ) |
Definition at line 1219 of file old-FstatMetric.c.
void gauleg | ( | double | x1, |
double | x2, | ||
double | x[], | ||
double | w[], | ||
int | n | ||
) |
Definition at line 1265 of file old-FstatMetric.c.
OldDopplerMetric * XLALOldDopplerFstatMetric | ( | const OldMetricType_t | metricType, |
const DopplerMetricParams * | metricParams, | ||
const EphemerisData * | edat | ||
) |
The only purpose of this function is to serve as a backwards-comparison check for XLALDopplerFstatMetric().
This is why it has been moved into the test-directory
This is basically a wrapper of the 'main()' function from the old standalone 'lalapps_FstatMetric' code, providing an API compatible with XLALDopplerFstatMetric().
metricType | type of metric to compute |
metricParams | input parameters determining the metric calculation |
edat | ephemeris data |
Definition at line 187 of file old-FstatMetric.c.
void XLALDestroyOldDopplerMetric | ( | OldDopplerMetric * | metric | ) |
Free a OldDopplerMetric structure.
Definition at line 254 of file old-FstatMetric.c.
int XLALAddOldDopplerMetric | ( | OldDopplerMetric ** | metric1, |
const OldDopplerMetric * | metric2 | ||
) |
Add 'metric2' to 'metric1', by adding the matrixes and 'rho2', and adding error-estimates in quadrature.
Note1: if the 'metric1 == NULL', then it is initialized to the values in 'metric2'. The elements are *copied and the result is allocated here.
Note2: the 'meta' field-information of 'metric2' is simply copied into the output, meta-info consistency is not checked.
Definition at line 299 of file old-FstatMetric.c.
int XLALScaleOldDopplerMetric | ( | OldDopplerMetric * | m, |
REAL8 | scale | ||
) |
Scale all (existing) matrices, error-estimates and 'rho2' by 'scale'.
Definition at line 378 of file old-FstatMetric.c.