20 #ifndef _PTOLEMETRIC_H
21 #define _PTOLEMETRIC_H
27 #include <gsl/gsl_matrix.h>
28 #include <lal/DetectorSite.h>
29 #include <lal/LALConstants.h>
30 #include <lal/LALStdlib.h>
31 #include <lal/SkyCoordinates.h>
32 #include <lal/LALBarycenter.h>
72 #define PMETRIC_MIN(x,y) ((x) < (y) ? (x) : (y))
73 #define PMETRIC_MAX(x,y) ((x) > (y) ? (x) : (y))
76 #define PMETRIC_INDEX(a,b) (PMETRIC_MIN((a),(b))+PMETRIC_MAX((a),(b))*(PMETRIC_MAX((a),(b)) + 1 ) / 2 )
80 #define PTOLEMETRICH_ENULL 1
81 #define PTOLEMETRICH_EPARM 2
82 #define PTOLEMETRICH_EDIM 3
83 #define PTOLEMETRICH_ENONULL 4
84 #define PTOLEMETRICH_EMETRIC 5
86 #define PTOLEMETRICH_MSGENULL "unexpected null pointer"
87 #define PTOLEMETRICH_MSGEPARM "bad parameter value"
88 #define PTOLEMETRICH_MSGEDIM "bad array length"
89 #define PTOLEMETRICH_MSGENONULL "unexpected non-null pointer"
90 #define PTOLEMETRICH_MSGEMETRIC "unknown metric type"
95 typedef enum tagLALPulsarMetricType {
108 SWIGLAL( IMMUTABLE_MEMBERS( tagPtoleMetricIn, site, ephemeris ) );
110 typedef struct tagPtoleMetricIn {
void LALPtoleMetric(LALStatus *status, REAL8Vector *metric, PtoleMetricIn *input)
Computes metric components for a pulsar search in the `‘Ptolemaic’' approximation; both the Earth's s...
void LALProjectMetric(LALStatus *, REAL8Vector *metric, BOOLEAN errors)
Project out the zeroth dimension of a metric.
LALPulsarMetricType
Constants defining different types of pulsar-metrics.
int XLALSpindownMetric(gsl_matrix *metric, double Tspan)
Frequency and frequency derivative components of the metric, suitable for a directed search with only...
void LALPulsarMetric(LALStatus *status, REAL8Vector **metric, PtoleMetricIn *input)
Unified "wrapper" to provide a uniform interface to LALPtoleMetric() and LALCoherentMetric().
int XLALFindMetricDim(const REAL8Vector *metric)
Figure out dimension of a REAL8Vector -encoded metric (see PMETRIC_INDEX() ).
@ LAL_PMETRIC_COH_PTOLE_ANALYTIC
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
This structure will likely be changed to match up better with those under StackMetric....
SkyPosition position
The equatorial coordinates at which the metric components are evaluated.
REAL4Vector * spindown
The (dimensionless) spindown parameters for which the metric components are evaluated.
REAL4 maxFreq
The maximum frequency to be searched, in Hz.
LALPulsarMetricType metricType
The type of metric to use: analytic, Ptolemaic or fully ephemeris-based.
const LALDetector * site
The detector site, used only for its latitude and longitude.
REAL4 duration
Duration of integration, in seconds.
const EphemerisData * ephemeris
Not used for the Ptolemaic approximation, this is for compatibility with other metrics.
LIGOTimeGPS epoch
When the coherent integration begins.