Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
HeterodynedPulsarModel.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Matthew Pitkin
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19
20#ifndef _HETERODYNEDPULSARMODEL_H
21#define _HETERODYNEDPULSARMODEL_H
22
23#include <math.h>
24
25#include <lal/LALError.h>
26#include <lal/AVFactories.h>
27#include <lal/LALDatatypes.h>
28#include <lal/DetResponse.h>
29#include <lal/DetectorSite.h>
30#include <lal/LALBarycenter.h>
31#include <lal/ReadPulsarParFile.h>
32#include <lal/BinaryPulsarTiming.h>
33#include <lal/SFTfileIO.h>
34#include <lal/TimeSeries.h>
35#include <lal/Units.h>
36
37#include <gsl/gsl_sf_gamma.h>
38
39/* C++ protection. */
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/**
45 * \ingroup lalpulsar
46 * \author Matthew Pitkin
47 * \date 2018
48 *
49 * \brief Pulsar signal-generation routines for heterodyned data.
50 *
51 */
52
53/** @{ */
54
55
56typedef struct tagDetResponseTimeLookupTable {
57 LIGOTimeGPS t0; /**< GPS time epoch for the look-up table */
58 UINT4 ntimebins; /**< number of time bins in the look-up table */
59 LALDetector *det; /**< detector */
60 REAL8 alpha; /**< the source right ascension in radians */
61 REAL8 delta; /**< the source declination in radians */
62 REAL8 psi; /**< the polarisation angle in radians */
63 REAL8Vector *fplus; /**< tensor plus polarisation response */
64 REAL8Vector *fcross; /**< tensor cross polarisation response */
65 REAL8Vector *fx; /**< vector "x" polarisation response */
66 REAL8Vector *fy; /**< vector "y" polarisation response */
67 REAL8Vector *fb; /**< scalar breathing mode polarisation response */
68 REAL8Vector *fl; /**< scalar longitudinal mode polarisation response */
70
71
72/* ---------- Function prototypes ---------- */
73
75 PulsarParameters *origparams,
76 const LIGOTimeGPSVector *datatimes,
77 REAL8 freqfactor,
78 REAL8Vector *ssbdts,
79 UINT4 calcSSBDelay,
80 REAL8Vector *bsbdts,
81 UINT4 calcBSBDelay,
82 REAL8Vector *glphase,
83 UINT4 calcglphase,
84 REAL8Vector *fitwavesphase,
85 UINT4 calcfitwaves,
86 const LALDetector *detector,
87 const EphemerisData *ephem,
89 TimeCorrectionType ttype );
90
92 const LIGOTimeGPSVector *datatimes,
93 const LALDetector *detector,
94 const EphemerisData *ephem,
96 TimeCorrectionType ttype );
97
99 const LIGOTimeGPSVector *datatimes,
100 const REAL8Vector *dts,
101 const EphemerisData *edat );
102
103void XLALGetEarthPosVel( EarthState *earth,
104 const EphemerisData *edat,
105 const LIGOTimeGPS *tGPS );
106
108 const LIGOTimeGPSVector *datatimes,
109 const REAL8Vector *ssbdts,
110 const REAL8Vector *bsbdts );
111
113 const LIGOTimeGPSVector *datatimes,
114 const REAL8Vector *ssbdts,
115 REAL8 freq );
116
118 REAL8 freqfactor,
119 UINT4 varyphase,
120 UINT4 useroq,
121 UINT4 nonGR,
123 const DetResponseTimeLookupTable *resp );
124
126 PulsarParameters *origpars,
127 REAL8 freqfactor,
128 UINT4 varyphase,
129 UINT4 useroq,
130 UINT4 nonGR,
132 REAL8Vector *hetssbdelays,
133 UINT4 calcSSBDelay,
134 REAL8Vector *hetbsbdelays,
135 UINT4 calcBSBDelay,
136 REAL8Vector *glphase,
137 UINT4 calcglphase,
138 REAL8Vector *fitwavesphase,
139 UINT4 calcfitwaves,
140 const DetResponseTimeLookupTable *resp,
141 const EphemerisData *ephem,
143 TimeCorrectionType ttype );
144
146 const LALDetector *det,
147 REAL8 alpha,
148 REAL8 delta,
149 UINT4 timeSteps,
150 REAL8 avedt );
151
153
155
156
157/** @} */
158
159#ifdef __cplusplus
160}
161#endif
162/* C++ protection. */
163
164#endif
COMPLEX16TimeSeries * XLALHeterodynedPulsarGetModel(PulsarParameters *pars, PulsarParameters *origpars, REAL8 freqfactor, UINT4 varyphase, UINT4 useroq, UINT4 nonGR, const LIGOTimeGPSVector *timestamps, REAL8Vector *hetssbdelays, UINT4 calcSSBDelay, REAL8Vector *hetbsbdelays, UINT4 calcBSBDelay, REAL8Vector *glphase, UINT4 calcglphase, REAL8Vector *fitwavesphase, UINT4 calcfitwaves, const DetResponseTimeLookupTable *resp, const EphemerisData *ephem, const TimeCorrectionData *tdat, TimeCorrectionType ttype)
Generate the model of the neutron star signal.
REAL8Vector * XLALHeterodynedPulsarPhaseDifference(PulsarParameters *params, PulsarParameters *origparams, const LIGOTimeGPSVector *datatimes, REAL8 freqfactor, REAL8Vector *ssbdts, UINT4 calcSSBDelay, REAL8Vector *bsbdts, UINT4 calcBSBDelay, REAL8Vector *glphase, UINT4 calcglphase, REAL8Vector *fitwavesphase, UINT4 calcfitwaves, const LALDetector *detector, const EphemerisData *ephem, const TimeCorrectionData *tdat, TimeCorrectionType ttype)
The phase evolution difference compared to a heterodyned phase (for a pulsar)
void XLALPulsarSourceToWaveformParams(PulsarParameters *params)
Convert source parameters into amplitude and phase notation parameters.
COMPLEX16TimeSeries * XLALHeterodynedPulsarGetAmplitudeModel(PulsarParameters *pars, REAL8 freqfactor, UINT4 varyphase, UINT4 useroq, UINT4 nonGR, const LIGOTimeGPSVector *timestamps, const DetResponseTimeLookupTable *resp)
The amplitude model of a complex heterodyned signal from the harmonics of a rotating neutron star.
void XLALDestroyDetResponseTimeLookupTable(DetResponseTimeLookupTable *resp)
Free memory for antenna response look-up table structure.
DetResponseTimeLookupTable * XLALDetResponseLookupTable(REAL8 t0, const LALDetector *det, REAL8 alpha, REAL8 delta, UINT4 timeSteps, REAL8 avedt)
Creates a lookup table of the detector antenna pattern.
REAL8Vector * XLALHeterodynedPulsarGetSSBDelay(PulsarParameters *pars, const LIGOTimeGPSVector *datatimes, const LALDetector *detector, const EphemerisData *ephem, const TimeCorrectionData *tdat, TimeCorrectionType ttype)
Computes the delay between a GPS time at Earth and the solar system barycentre.
void XLALGetEarthPosVel(EarthState *earth, const EphemerisData *edat, const LIGOTimeGPS *tGPS)
Get the position and velocity of the Earth at a given time.
REAL8Vector * XLALHeterodynedPulsarGetBSBDelay(PulsarParameters *pars, const LIGOTimeGPSVector *datatimes, const REAL8Vector *dts, const EphemerisData *edat)
Computes the delay between a pulsar in a binary system and the barycentre of the system.
REAL8Vector * XLALHeterodynedPulsarGetGlitchPhase(PulsarParameters *params, const LIGOTimeGPSVector *datatimes, const REAL8Vector *ssbdts, const REAL8Vector *bsbdts)
Computes the phase evolution due to the presence of glitches.
REAL8Vector * XLALHeterodynedPulsarGetFITWAVESPhase(PulsarParameters *params, const LIGOTimeGPSVector *datatimes, const REAL8Vector *ssbdts, REAL8 freq)
Computes the phase evolution due to the presence of FITWAVES parameters.
LIGOTimeGPSVector * timestamps
TimeCorrectionType
Enumerated type denoting the time system type to be produced in the solar system barycentring routine...
Definition: LALBarycenter.h:72
double REAL8
uint32_t UINT4
Pulsar signal-generation routines for heterodyned data.
REAL8 alpha
the source right ascension in radians
REAL8Vector * fb
scalar breathing mode polarisation response
REAL8 delta
the source declination in radians
REAL8Vector * fl
scalar longitudinal mode polarisation response
REAL8 psi
the polarisation angle in radians
UINT4 ntimebins
number of time bins in the look-up table
REAL8Vector * fy
vector "y" polarisation response
REAL8Vector * fx
vector "x" polarisation response
REAL8Vector * fcross
tensor cross polarisation response
LIGOTimeGPS t0
GPS time epoch for the look-up table.
REAL8Vector * fplus
tensor plus polarisation response
Basic output structure of LALBarycenterEarth.c.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
Definition: SFTfileIO.h:188
The PulsarParameters structure to contain a set of pulsar parameters.
This structure will contain a vector of time corrections used during conversion from TT to TDB/TCB/Te...