LALPulsar  6.1.0.1-b72065a
GeneratePulsarSignal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004, 2005 Reinhard Prix
3  * Copyright (C) 2004, 2005 Greg Mendell
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with with program; see the file COPYING. If not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18  * MA 02110-1301 USA
19  */
20 
21 /* NOTES: */
22 /* 07/14/04 gam; add functions LALFastGeneratePulsarSFTs and LALComputeSkyAndZeroPsiAMResponse */
23 /* 10/08/04 gam; fix indexing into trig lookup tables (LUTs) by having table go from -2*pi to 2*pi */
24 /* 09/07/05 gam; Add Dterms parameter to LALFastGeneratePulsarSFTs; use this to fill in SFT bins with fake data as per LALDemod else fill in bin with zero */
25 
26 #ifndef _GENERATEPULSARSIGNAL_H /* Double-include protection. */
27 #define _GENERATEPULSARSIGNAL_H
28 
29 #include <lal/LALDatatypes.h>
30 #include <lal/DetResponse.h>
31 #include <lal/DetectorSite.h>
32 #include <lal/GenerateSpinOrbitCW.h>
33 #include <lal/Date.h>
34 #include <lal/LALBarycenter.h>
35 #include <lal/PulsarDataTypes.h>
36 #include <lal/ComputeSky.h>
37 #include <lal/Window.h>
38 #include <lal/SFTfileIO.h>
39 
40 /* C++ protection. */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /**
46  * \defgroup GeneratePulsarSignal_h Header GeneratePulsarSignal.h
47  * \ingroup lalpulsar_inject
48  * \author Reinhard Prix, Greg Mendell
49  * \date 2005
50  *
51  * \brief Pulsar signal-generation routines for hardware- and software-injections.
52  *
53  * ### Description ###
54  *
55  * - The main function LALGeneratePulsarSignal() generates a fake
56  * pulsar-signal, either for an isolated or a binary pulsar. It returns a
57  * time-series with the generated signal as received by the detector.
58  *
59  * - The time-series can then be turned into a vector of short time-base FFTs
60  * (the so-called "SFTs") by using the function LALSignalToSFTs().
61  * These SFTs are the data-format used by most frequency-domain pulsar codes,
62  * therefore these functions can be directly used in a Monte-Carlo
63  * injection driver.
64  *
65  * This module also contains a few more general-purpose helper-functions:
66  *
67  * - Namely, XLALConvertSSB2GPS() and XLALConvertGPS2SSB()
68  * which convert arrival times for a given source (not necessarily a
69  * pulsar!) the detector ("GPS") and the solar-system barycenter ("SSB").
70  * NOTE: only the source-location (<tt>params->pulsar.position</tt>), the
71  * detector-site (<tt>params->site</tt>) and the ephemeris-data
72  * (<tt>params->ephemerides</tt>)are used from the
73  * PulsarSignalParams structure.
74  *
75  * ### Algorithm ###
76  *
77  * LALGeneratePulsarSignal() is basically a wrapper for the two
78  * LAL-functions GenerateSpinOrbitCW() to produce the source-signal,
79  * and LALPulsarSimulateCoherentGW() to turn it into a time-series at the detector.
80  *
81  * LALSignalToSFTs() uses LALForwardRealFFT() appropriately on the input-timeseries to
82  * produce the required output-SFTs.
83  *
84  * \note
85  *
86  * LALSignalToSFTs() currently enforces the constraint of
87  * <tt>Tsft * Band</tt> being an integer, so that the number of
88  * time-samples per SFT is even. This follows <tt>makefakedata_v2</tt>.
89  *
90  * Furthermore, if the timestamps for SFT-creation passed to
91  * LALSignalToSFTs() do not fit exactly on a time-step of the
92  * input time-series, it will be "nudged" to the closest one.
93  * If <tt>lalDebugLevel>0</tt> a warning will be printed about this.
94  * The user could also see this effect in the actual timestamps of the
95  * SFTs returned.
96  *
97  * The FFTW-"plan" is currently created using the \c ESTIMATE flag,
98  * which is fast but only yields an approximate plan. Better results
99  * might be achieved by using \c MEASURE and an appropriate buffering
100  * of the resulting plan (which doesnt change provided the SFT-length is
101  * the same). Measuring the plan takes longer but might lead to
102  * substantial speedups for many FFTs, which seems the most likely situation.
103  *
104  * ### Use of LALFastGeneratePulsarSFTs() ###
105  *
106  * The functions LALComputeSkyAndZeroPsiAMResponse() and LALFastGeneratePulsarSFTs()
107  * use approximate analytic formulas to generate SFTs. This should be significantly
108  * faster than LALGeneratePulsarSignal() and LALSignalToSFTs(), which generate the
109  * time series data and then FFT it. Simple tests performed by the code in
110  * GeneratePulsarSignalTest.c indicate that the maximum modulus of the SFTs output
111  * by the approximate and exact codes differs by less that 10\%. Since the tests
112  * are not exhaustive, the user should use caution and conduct their own test
113  * to compare LALComputeSkyAndZeroPsiAMResponse() and LALFastGeneratePulsarSFTs() with
114  * LALGeneratePulsarSignal() and LALSignalToSFTs().
115  *
116  * The strain of a periodic signal at the detector is given by
117  * \f[
118  * h(t) = F_+(t) A_+ {\rm cos}\Phi(t) + F_\times(t) A_\times {\rm sin}\Phi(t),
119  * \f]
120  * where \f$ F_+ \f$ and \f$ F_\times \f$ are the usual beam pattern response functions,
121  * \f$ A_+ \f$ and \f$ A_\times \f$ are the amplitudes of the gravitational wave for the
122  * plus and cross polarizations, and \f$ \Phi \f$ is the phase. The phase contains modulations
123  * from doppler shifts due to the relative motion between the source and the
124  * detector and the spin evolution of the source. (The functions discussed here
125  * support both isolated sources and those in binary systems. The binary case
126  * has not been tested.)
127  *
128  * If we Taylor expand the phase out to first order about the time at the midpoint of
129  * an SFT and approximate \f$ F_+ \f$ and \f$ F_\times \f$ as constants, for one SFT we can write
130  * \f[
131  * \Phi(t) \approx \Phi_{1/2} + 2\pi f_{1/2}(t - t_{1/2}).
132  * \f]
133  * The strain at discrete time \f$ t_j \f$ , measured from the start of the SFT, can
134  * thus be approximated as
135  * \f[
136  * h_j \approx F_{+ 1/2} A_+ {\rm cos} [\Phi_{1/2} + 2\pi f_{1/2}(t_0 + t_j - t_{1/2})]
137  * + F_{\times 1/2} A_\times {\rm sin} [\Phi_{1/2} + 2\pi f_{1/2}(t_0 + t_j - t_{1/2})],
138  * \f]
139  * where \f$ t_0 \f$ is the time as the start of the SFT, and \f$ t_{1/2} - t_0 = T_{\rm sft}/2 \f$ ,
140  * where \f$ T_{\rm sft} \f$ is the duration of one SFT. This simplifies to
141  * \f[
142  * h_j \approx F_{+ 1/2} A_+ {\rm cos} (\Phi_0 + 2\pi f_{1/2}t_j)
143  * + F_{\times 1/2} A_\times {\rm sin} (\Phi_0 + 2\pi f_{1/2}t_j),
144  * \f]
145  * where \f$ \Phi_0 \f$ is the phase at the start of the SFT
146  * (not the initial phase at the start of the observation), i.e.,
147  * \f[
148  * \Phi_0 = \Phi_{1/2} - 2 \pi f_{1/2} (T_{\rm sft} / 2).
149  * \f]
150  * Note that these are the same approximations used by LALDemod().
151  *
152  * One can show that the Discrete Fourier Transform (DFT) of \f$ h_j \f$ above is:
153  * \f[
154  * \tilde{h}_k = e^{i\Phi_0} \frac{1}{2} ( F_{+ 1/2} A_+ - i F_{\times 1/2} A_\times)
155  * \frac{ 1 - e^{2\pi i (\kappa - k)}}{1 - e^{2\pi i (\kappa - k)/N} } \\
156  * + e^{-i\Phi_0} \frac{1}{2} ( F_{+ 1/2} A_+ + i F_{\times 1/2} A_\times)
157  * \frac{ 1 - e^{-2\pi i (\kappa + k)}}{ 1 - e^{-2\pi i (\kappa + k)/N} }
158  * \f]
159  * where \f$ N \f$ is the number of time samples used to find the
160  * DFT (i.e., the sample rate times \f$ T_{\rm sft} \f$ ), and
161  * \f[
162  * \kappa \equiv f_{1/2} T_{\rm sft},
163  * \f]
164  * is usually not an integer.
165  *
166  * Note that the factor \f$ e^{\pm 2\pi i k} \f$ in the numerators of the equation for \f$ \tilde{h}_k \f$
167  * equals 1. Furthermore, for \f$ 0 < \kappa < N/2 \f$ and \f$ |\kappa - k| << N \f$ the first term
168  * dominates and can be Taylor expanded to give:
169  * \f[
170  * \tilde{h}_k = N e^{i\Phi_0} \frac{1}{2} ( F_{+ 1/2} A_+ - i F_{\times 1/2} A_\times)
171  * \left [ \, \frac{ {\rm sin} (2\pi\kappa)}{2 \pi (\kappa - k) } \,
172  * + \, i \frac{ 1 - {\rm cos} (2\pi\kappa)}{2 \pi (\kappa - k) } \, \right ]
173  * \f]
174  * Note that the last factor in square brackets is \f$ P_{\alpha k}^* \f$ and
175  * \f$ e^{i\Phi_0} = Q_{\alpha}^* \f$ used by LALDemod.
176  *
177  * ### Example pseudocode ###
178  *
179  * The structs used by LALComputeSkyAndZeroPsiAMResponse() and LALFastGeneratePulsarSFTs()
180  * are given in previous sections, and make use of those used by
181  * LALGeneratePulsarSignal() and LALSignalToSFTs() plus a small number of
182  * additional parameters. Thus it is fairly easy to change between the above
183  * approximate routines the exact routines. See GeneratePulsarSignalTest.c for
184  * an example implementation of the code.
185  *
186  * Note that one needs to call LALComputeSkyAndZeroPsiAMResponse() once per sky position,
187  * and then call LALFastGeneratePulsarSFTs() for each set of signal parameters at that
188  * sky position. Thus, one could perform a Monte Carlo simulation, as shown
189  * by the pseudo code:
190  *
191  * \code
192  * loop over sky positions {
193  * ...
194  * LALComputeSkyAndZeroPsiAMResponse();
195  * ...
196  * loop over spindown {
197  * ...
198  * loop over frequencies {
199  * ...
200  * LALFastGeneratePulsarSFTs();
201  * ...
202  * }
203  * ...
204  * }
205  * ...
206  * }
207  *
208  * \endcode
209  *
210  * ### Notes on LALFastGeneratePulsarSFTs() ###
211  *
212  * -# If \c *outputSFTs sent to LALFastGeneratePulsarSFTs() is \c NULL then
213  * LALFastGeneratePulsarSFTs() allocates memory for the output SFTs; otherwise it assumes
214  * memory has already been allocated. Thus, the user does not have to deallocate
215  * memory for the SFTs until all calls to LALFastGeneratePulsarSFTs() are completed.
216  *
217  * -# \c fHeterodyne and <tt>0.5 * samplingRate</tt> set in the PulsarSignalParams struct
218  * give the start frequency and frequency band of the SFTs output from LALFastGeneratePulsarSFTs().
219  *
220  * -# If \c resTrig is set to zero in the SFTandSignalParams struct, then
221  * the C math libary \c cos() \c sin() functions are called, else lookup tables (LUTs) are used
222  * for calls to trig functions. There may be a slight speedup in using LUTs.
223  *
224  * -# To maximize the speed of SFT generations, LALFastGeneratePulsarSFTs() only generates
225  * values for the bins in the band <tt>2*Dterms</tt> centered on the signal frequency in each SFT. Dterms must be
226  * greater than zero and less than or equal to the number of frequency bins in the output SFTs. Note that
227  * Dterms is used the same way here as it is in LALDemod(). Nothing is done to the other bins, unless
228  * \c *outputSFTs is \c NULL; then, since memory is allocates for the output SFTs, the bins
229  * not in the <tt>2*Dterms</tt> band are initialized to zero.
230  *
231  */
232 /** @{ */
233 
234 /** \name Error codes */
235 /** @{ */
236 #define GENERATEPULSARSIGNALH_ENULL 1 /**< Arguments contained an unexpected null pointer */
237 #define GENERATEPULSARSIGNALH_ENONULL 2 /**< Output pointer is not NULL */
238 #define GENERATEPULSARSIGNALH_EMEM 3 /**< Out of memory */
239 #define GENERATEPULSARSIGNALH_ESAMPLING 4 /**< Waveform sampling interval too large. */
240 #define GENERATEPULSARSIGNALH_ESSBCONVERT 5 /**< SSB->GPS iterative conversion failed */
241 #define GENERATEPULSARSIGNALH_ESYS 6 /**< System error, probably while File I/O */
242 #define GENERATEPULSARSIGNALH_ETIMEBOUND 7 /**< Timestamp outside of allowed time-interval */
243 #define GENERATEPULSARSIGNALH_ENUMSFTS 8 /**< Inconsistent number of SFTs in timestamps and noise-SFTs */
244 #define GENERATEPULSARSIGNALH_EINCONSBAND 9 /**< Inconsistent values of sampling-rate and Tsft */
245 #define GENERATEPULSARSIGNALH_ENOISEDELTAF 10 /**< Frequency resolution of noise-SFTs inconsistent with signal */
246 #define GENERATEPULSARSIGNALH_ENOISEBAND 11 /**< Frequency band of noise-SFTs inconsistent with signal */
247 #define GENERATEPULSARSIGNALH_ENOISEBINS 12 /**< Frequency bins of noise-SFTs inconsistent with signal */
248 #define GENERATEPULSARSIGNALH_EBADCOORDS 13 /**< Current code requires sky position in equatorial coordinates */
249 #define GENERATEPULSARSIGNALH_ELUTS 14 /**< Lookup tables (LUTs) for trig functions must be defined on domain -2pi to 2pi inclusive */
250 #define GENERATEPULSARSIGNALH_EDTERMS 15 /**< Dterms must be greater than zero and less than or equal to half the number of SFT bins */
251 #define GENERATEPULSARSIGNALH_EINPUT 16 /**< Invalid input-arguments to function */
252 #define GENERATEPULSARSIGNALH_EDETECTOR 17 /**< Unknown detector-name */
253 /** @} */
254 
255 /** \cond DONT_DOXYGEN */
256 #define GENERATEPULSARSIGNALH_MSGENULL "Arguments contained an unexpected null pointer"
257 #define GENERATEPULSARSIGNALH_MSGENONULL "Output pointer is not NULL"
258 #define GENERATEPULSARSIGNALH_MSGEMEM "Out of memory"
259 #define GENERATEPULSARSIGNALH_MSGESAMPLING "Waveform sampling interval too large."
260 #define GENERATEPULSARSIGNALH_MSGESSBCONVERT "SSB->GPS iterative conversion failed"
261 #define GENERATEPULSARSIGNALH_MSGESYS "System error, probably while File I/O"
262 #define GENERATEPULSARSIGNALH_MSGETIMEBOUND "Timestamp outside of allowed time-interval"
263 #define GENERATEPULSARSIGNALH_MSGENUMSFTS "Inconsistent number of SFTs in timestamps and noise-SFTs"
264 #define GENERATEPULSARSIGNALH_MSGEINCONSBAND "Inconsistent values of sampling-rate and Tsft"
265 #define GENERATEPULSARSIGNALH_MSGENOISEDELTAF "Frequency resolution of noise-SFTs inconsistent with signal"
266 #define GENERATEPULSARSIGNALH_MSGENOISEBAND "Frequency band of noise-SFTs inconsistent with signal"
267 #define GENERATEPULSARSIGNALH_MSGENOISEBINS "Frequency bins of noise-SFTs inconsistent with signal"
268 #define GENERATEPULSARSIGNALH_MSGEBADCOORDS "Current code requires sky position in equatorial coordinates"
269 #define GENERATEPULSARSIGNALH_MSGELUTS "Lookup tables (LUTs) for trig functions must be defined on domain -2pi to 2pi inclusive"
270 #define GENERATEPULSARSIGNALH_MSGEDTERMS "Dterms must be greater than zero and less than or equal to half the number of SFT bins"
271 #define GENERATEPULSARSIGNALH_MSGEINPUT "Invalid input-arguments to function"
272 #define GENERATEPULSARSIGNALH_MSGEDETECTOR "Unknown detector-name"
273 /** \endcond */
274 
275 /**
276  * Input parameters to GeneratePulsarSignal(), defining the source and the time-series
277  */
278 #ifndef SWIG /* exclude from SWIG interface; nested struct */
279 typedef struct tagPulsarSignalParams {
280  /* source-parameters */
281  struct {
282  LIGOTimeGPS refTime; /**< reference time of pulsar parameters (in SSB!) */
283  SkyPosition position; /**< source location (in radians) */
284  REAL4 psi; /**< polarization angle (radians) at tRef */
285  REAL4 aPlus; /**< plus-polarization amplitude at tRef */
286  REAL4 aCross; /**< cross-polarization amplitude at tRef */
287  REAL8 phi0; /**< initial phase (radians) at tRef */
288  REAL8 f0; /**< WAVE-frequency(!) at tRef (in Hz) */
289  REAL8Vector *spindown;/**< wave-frequency spindowns at tRef (NOT f0-normalized!) */
291  struct {
292  LIGOTimeGPS tp; /**< time of observed periapsis passage (in SSB) */
293  REAL8 argp; /**< argument of periapsis (radians) */
294  REAL8 asini; /**< projected, normalized orbital semi-major axis (s) */
295  REAL8 ecc; /**< orbital eccentricity */
296  REAL8 period; /**< orbital period (sec) */
297  } orbit;
298  REAL8 sourceDeltaT; /**< source-frame sampling period ('0' means use previous internal defaults) */
299 
300  /* characterize the detector */
301  const COMPLEX8FrequencySeries *transfer;/**< detector transfer function (NULL if not used) */
302  const LALDetector *site; /**< detector location and orientation */
303  const EphemerisData *ephemerides; /**< Earth and Sun ephemerides */
304 
305  /* characterize the output time-series */
306  LIGOTimeGPS startTimeGPS; /**< start time of output time series */
307  UINT4 duration; /**< length of time series in seconds */
308  REAL8 samplingRate; /**< sampling rate of time-series (= 2 * frequency-Band) */
309  REAL8 fHeterodyne; /**< heterodyning frequency for output time-series */
310  UINT4 dtDelayBy2; /**< half-interval for the Doppler delay look-up table for LALPulsarSimulateCoherentGW() */
311  UINT4 dtPolBy2; /**< half-interval for the polarisation response look-up table for LALPulsarSimulateCoherentGW() */
313 #endif /* SWIG */
314 
315 /**
316  * Parameters defining the SFTs to be returned from LALSignalToSFTs().
317  */
318 #ifdef SWIG /* SWIG interface directives */
319 SWIGLAL( IMMUTABLE_MEMBERS( tagSFTParams, timestamps, noiseSFTs, window ) );
320 #endif /* SWIG */
321 typedef struct tagSFTParams {
322  REAL8 Tsft; /**< length of each SFT in seconds */
323  const LIGOTimeGPSVector *timestamps; /**< timestamps to produce SFTs for (can be NULL) */
324  const SFTVector *noiseSFTs; /**< noise SFTs to be added (can be NULL) */
325  const REAL4Window *window; /**< window function for the time series (can be NULL, which is equivalent to a rectangular window) */
326 } SFTParams;
327 
328 /**
329  * Parameters defining the pulsar signal and SFTs used by LALFastGeneratePulsarSFTs(). Lookup tables (LUTs) are
330  * used for trig functions if \code resTrig > 0 \endcode the user must then initialize \c trigArg, \c sinVal, and
331  * \c cosVal on the domain \f$ [-2\pi, 2\pi] \f$ inclusive. See GeneratePulsarSignalTest.c for an example.
332  */
333 typedef struct tagSFTandSignalParams {
336  INT4 nSamples; /**< nsample from noise SFT header; 2x this equals effective number of time samples */
337  INT4 Dterms; /**< use this to fill in SFT bins with fake data as per LALDemod else fill in bin with zero */
338  INT4 resTrig; /**< length sinVal, cosVal; domain: -2pi to 2pi; resolution = 4pi/resTrig */
339  REAL8 *trigArg; /**< array of arguments to hold lookup table (LUT) values for doing trig calls */
340  REAL8 *sinVal; /**< sinVal holds lookup table (LUT) values for doing trig sin calls */
341  REAL8 *cosVal; /**< cosVal holds lookup table (LUT) values for doing trig cos calls */
343 
344 
345 /**
346  * Sky Constants and beam pattern response functions used by LALFastGeneratePulsarSFTs().
347  * These are output from LALComputeSkyAndZeroPsiAMResponse().
348  */
349 typedef struct tagSkyConstAndZeroPsiAMResponse {
350  REAL8 *skyConst; /**< vector of A and B sky constants */
351  REAL4 *fPlusZeroPsi; /**< vector of Fplus values for psi = 0 at midpoint of each SFT */
352  REAL4 *fCrossZeroPsi; /**< vector of Fcross values for psi = 0 at midpoint of each SFT */
354 
355 /*---------- Global variables ----------*/
356 
357 /* ---------- Function prototypes ---------- */
360 SFTVector *XLALSignalToSFTs( const REAL4TimeSeries *signalvec, const SFTParams *params );
363 int XLALAddGaussianNoise( REAL4TimeSeries *inSeries, REAL4 sigma, INT4 seed );
364 
367 
368 // ----- obsolete and deprecated LAL interface
370 void LALSignalToSFTs( LALStatus *, SFTVector **outputSFTs, const REAL4TimeSeries *signalvec, const SFTParams *params );
371 
374 
375 /** @} */
376 
377 #ifdef __cplusplus
378 }
379 #endif
380 /* C++ protection. */
381 
382 #endif /* Double-include protection. */
LIGOTimeGPSVector * timestamps
void XLALDestroyMultiREAL4TimeSeries(MultiREAL4TimeSeries *multiTS)
Destroy a MultiREAL4TimeSeries, NULL-robust.
int XLALConvertGPS2SSB(LIGOTimeGPS *SSBout, LIGOTimeGPS GPSin, const PulsarSignalParams *params)
Convert earth-frame GPS time into barycentric-frame SSB time for given source.
REAL4TimeSeries * XLALGeneratePulsarSignal(const PulsarSignalParams *params)
Generate a time-series at the detector for a given pulsar.
int XLALConvertSSB2GPS(LIGOTimeGPS *GPSout, LIGOTimeGPS SSBin, const PulsarSignalParams *params)
Convert barycentric frame SSB time into earth-frame GPS time.
void LALGeneratePulsarSignal(LALStatus *status, REAL4TimeSeries **signalvec, const PulsarSignalParams *params)
REAL4TimeSeries * XLALGenerateLineFeature(const PulsarSignalParams *params)
Generate a REAL4TimeSeries containing a sinusoid with amplitude 'h0', frequency 'Freq-fHeterodyne' an...
SFTVector * XLALSignalToSFTs(const REAL4TimeSeries *signalvec, const SFTParams *params)
Turn the given time-series into SFTs and add noise if given.
void XLALDestroyMultiREAL8TimeSeries(MultiREAL8TimeSeries *multiTS)
Destroy a MultiREAL8TimeSeries, NULL-robust.
void LALFastGeneratePulsarSFTs(LALStatus *status, SFTVector **outputSFTs, const SkyConstAndZeroPsiAMResponse *input, const SFTandSignalParams *params)
Fast generation of Fake SFTs for a pure pulsar signal.
void LALSignalToSFTs(LALStatus *status, SFTVector **outputSFTs, const REAL4TimeSeries *signalvec, const SFTParams *params)
void LALComputeSkyAndZeroPsiAMResponse(LALStatus *status, SkyConstAndZeroPsiAMResponse *output, const SFTandSignalParams *params)
/deprecated Move to attic? Wrapper for LALComputeSky() and LALComputeDetAMResponse() that finds the s...
int XLALAddGaussianNoise(REAL4TimeSeries *inSeries, REAL4 sigma, INT4 seed)
Generate Gaussian noise with standard-deviation sigma, add it to inSeries.
double REAL8
uint32_t UINT4
int32_t INT4
float REAL4
A vector of COMPLEX8FrequencySeries.
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
A collection of (multi-IFO) REAL4 time-series.
A collection of (multi-IFO) REAL8 time-series.
Input parameters to GeneratePulsarSignal(), defining the source and the time-series.
LIGOTimeGPS tp
time of observed periapsis passage (in SSB)
REAL8 asini
projected, normalized orbital semi-major axis (s)
SkyPosition position
source location (in radians)
const COMPLEX8FrequencySeries * transfer
detector transfer function (NULL if not used)
REAL8 period
orbital period (sec)
REAL8 sourceDeltaT
source-frame sampling period ('0' means use previous internal defaults)
const EphemerisData * ephemerides
Earth and Sun ephemerides.
UINT4 dtPolBy2
half-interval for the polarisation response look-up table for LALPulsarSimulateCoherentGW()
REAL8 fHeterodyne
heterodyning frequency for output time-series
REAL4 aPlus
plus-polarization amplitude at tRef
REAL4 psi
polarization angle (radians) at tRef
REAL8 argp
argument of periapsis (radians)
REAL8 phi0
initial phase (radians) at tRef
LIGOTimeGPS startTimeGPS
start time of output time series
UINT4 dtDelayBy2
half-interval for the Doppler delay look-up table for LALPulsarSimulateCoherentGW()
const LALDetector * site
detector location and orientation
REAL8Vector * spindown
wave-frequency spindowns at tRef (NOT f0-normalized!)
REAL8 ecc
orbital eccentricity
LIGOTimeGPS refTime
reference time of pulsar parameters (in SSB!)
REAL8 f0
WAVE-frequency(!) at tRef (in Hz)
REAL4 aCross
cross-polarization amplitude at tRef
REAL8 samplingRate
sampling rate of time-series (= 2 * frequency-Band)
UINT4 duration
length of time series in seconds
Parameters defining the SFTs to be returned from LALSignalToSFTs().
REAL8 Tsft
length of each SFT in seconds
const REAL4Window * window
window function for the time series (can be NULL, which is equivalent to a rectangular window)
const LIGOTimeGPSVector * timestamps
timestamps to produce SFTs for (can be NULL)
const SFTVector * noiseSFTs
noise SFTs to be added (can be NULL)
Parameters defining the pulsar signal and SFTs used by LALFastGeneratePulsarSFTs().
REAL8 * sinVal
sinVal holds lookup table (LUT) values for doing trig sin calls
INT4 nSamples
nsample from noise SFT header; 2x this equals effective number of time samples
PulsarSignalParams * pSigParams
REAL8 * cosVal
cosVal holds lookup table (LUT) values for doing trig cos calls
REAL8 * trigArg
array of arguments to hold lookup table (LUT) values for doing trig calls
INT4 Dterms
use this to fill in SFT bins with fake data as per LALDemod else fill in bin with zero
INT4 resTrig
length sinVal, cosVal; domain: -2pi to 2pi; resolution = 4pi/resTrig
Sky Constants and beam pattern response functions used by LALFastGeneratePulsarSFTs().
REAL8 * skyConst
vector of A and B sky constants
REAL4 * fPlusZeroPsi
vector of Fplus values for psi = 0 at midpoint of each SFT
REAL4 * fCrossZeroPsi
vector of Fcross values for psi = 0 at midpoint of each SFT