LALPulsar  6.1.0.1-89842e6
ExtrapolatePulsarSpins.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Karl Wette
3  * Copyright (C) 2005, 2006 Reinhard Prix
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 #ifndef _EXTRAPOLATEPULSARSPINS_H /* Double-include protection. */
21 #define _EXTRAPOLATEPULSARSPINS_H
22 
23 #include <lal/PulsarDataTypes.h>
24 #include <lal/AVFactories.h>
25 #include <lal/LALDetectors.h>
26 #include <lal/LALBarycenter.h>
27 #include <lal/DetectorStates.h>
28 
29 #ifdef __cplusplus /* C++ protection. */
30 extern "C" {
31 #endif
32 
33 /**
34  * \defgroup ExtrapolatePulsarSpins_h Header ExtrapolatePulsarSpins.h
35  * \ingroup lalpulsar_general
36  * \brief Extrapolate the Pulsar spin-paramters
37  * \f$ \{f^{(k)}\}\equiv\{f, \dot{f},\ddot{f},...\} \f$ , and "spin-ranges"
38  * \f$ \{ f^{(k)}, \Delta f^{(k)} \} \f$ from one SSB epoch to another.
39  * \author Reinhard Prix
40  *
41  * The central function of this module is XLALExtrapolatePulsarSpinRange(), which extrapolates
42  * a complete "spin range" (defined as PulsarSpinRange) from one epoch to another.
43  * A "spin-range" contains an epoch, and \em two vectors, \f$ f^{(k)} \f$ and \f$ \Delta f^{(k)} \f$
44  * (where "canonical" ordering refers to \f$ \Delta f^{(k)} >= 0 \f$ for all k.
45  *
46  * The extrapolation is defined by the pulsar spindown-model:
47  * \f[ f(\tau_1) = f(\tau_0) + \frac{\dot{f}(\tau_0)}{1!} \,\Delta\tau
48  * + \frac{\ddot{f}(\tau_0)}{2!} \,\Delta\tau^2 + ...
49  * = \sum_{k=0}^s \frac{f^{(k)}(\tau_0)}{k!}\, \Delta\tau^k\,,
50  * \f]
51  * where \f[\Delta\tau \equiv \tau_1 - \tau_0\f]
52  * and therefore generally
53  *
54  * \f[
55  * f^{(l)}(\tau_1) = \sum_{k=0}^{s - l} \frac{ f^{(k+l)}(\tau_0)}{k! }\, \Delta\tau^k\,.
56  * \f]
57  *
58  * This expression is used to extrapolate a whole "spin-range", namely at each spindown-order \f$ (l) \f$
59  * the extrapolated range is given by
60  * \f[
61  * \min\left[ f^{(l)}(\tau_1) \right] = \sum_{k=0}^{s - l} \frac{1}{k!} \min\left[ f^{(k+l)}(\tau_0) \, \Delta\tau^k \right]\,.
62  * \f]
63  *
64  * \f[
65  * \max\left[ f^{(l)}(\tau_1) \right] = \sum_{k=0}^{s - l} \frac{1}{k!} \max\left[ f^{(k+l)}(\tau_0) \, \Delta\tau^k \right]\,.
66  * \f]
67  *
68  * This ensures that the range will be correctly extrapolated even if \f$ \tau_1 < \tau_0 \f$ , i.e. \f$ \Delta\tau < 0 \f$ .
69  *
70  * The initial-phase extrapolation in XLALExtrapolatePulsarPhase() proceeds in the other direction, extrapolating
71  * \f$ \phi(\tau_0) \f$ to \f$ \phi(\tau_1) \f$ , where the spins are given at \f$ \tau_1 \f$ , i.e. \f$ f^{(k)}(\tau_1) \f$ .
72  * By using the above equations, one can arrive at the following expression:
73  * \f[
74  * \phi(\tau_1) = \phi(\tau_0) - \sum_{k=0}^s \frac{f^{(k)}(\tau_1)}{(k+1)!} \, (-\Delta\tau)^{k+1} \,.
75  * \f]
76  * This function is used in XLALEstimatePulsarAmplitudeParams() to propagate the estimated initial phase
77  * from the internal reference time back to the user-input reference time.
78  */
79 /** @{ */
80 
81 /*---------- exported prototypes [API] ----------*/
82 int XLALInitPulsarSpinRangeFromSpins( PulsarSpinRange *range, const LIGOTimeGPS *refTime, const PulsarSpins fkdot1, const PulsarSpins fkdot2 );
83 
84 int XLALExtrapolatePulsarSpinRange( PulsarSpinRange *range1, const PulsarSpinRange *range0, const REAL8 dtau );
85 
86 #ifdef SWIG // SWIG interface directives
87 SWIGLAL( OUTPUT_ARRAY_1D( PulsarSpins, fkdot1 ) );
88 #endif // SWIG
89 int XLALExtrapolatePulsarSpins( PulsarSpins fkdot1, const PulsarSpins fkdot0, REAL8 dtau );
90 #ifdef SWIG // SWIG interface directives
91 SWIGLAL_CLEAR( OUTPUT_ARRAY_1D( PulsarSpins, fkdot1 ) );
92 #endif // SWIG
93 
94 int XLALExtrapolatePulsarPhase( REAL8 *phi1, const PulsarSpins fkdot1, const REAL8 phi0, const REAL8 dtau );
95 
96 int XLALCWSignalCoveringBand( REAL8 *minCoverFreq, REAL8 *maxCoverFreq, const LIGOTimeGPS *time1, const LIGOTimeGPS *time2,
97  const PulsarSpinRange *spinRange, const REAL8 binaryMaxAsini, const REAL8 binaryMinPeriod, const REAL8 binaryMaxEcc );
98 
99 int XLALCWSignalBand( REAL8 *minCoverFreq, REAL8 *maxCoverFreq, const DetectorStateSeries *detStates, const PulsarDopplerParams *doppler );
100 DetectorStateSeries *XLALPrepareCWSignalBand( SkyPosition *skypos_maxdoppler, const LIGOTimeGPS tStart, const REAL8 Tspan, const REAL8 dT, const LALDetector *detector, const EphemerisData *edat );
101 
102 /** @} */
103 
104 #ifdef __cplusplus
105 }
106 #endif /* C++ protection. */
107 
108 #endif /* Double-include protection. */
int XLALExtrapolatePulsarPhase(REAL8 *phi1, const PulsarSpins fkdot1, const REAL8 phi0, const REAL8 dtau)
Extrapolate phase from to , given the spins fkdot1 at .
DetectorStateSeries * XLALPrepareCWSignalBand(SkyPosition *skypos_maxdoppler, const LIGOTimeGPS tStart, const REAL8 Tspan, const REAL8 dT, const LALDetector *detector, const EphemerisData *edat)
(Optional) Helper function for using XLALCWSignalBand(): compute DetectorStateSeries for given time-s...
int XLALExtrapolatePulsarSpinRange(PulsarSpinRange *range1, const PulsarSpinRange *range0, const REAL8 dtau)
General pulsar-spin extrapolation function: given a "spin-range" (ie spins + spin-bands) range0 at ti...
int XLALExtrapolatePulsarSpins(PulsarSpins fkdot1, const PulsarSpins fkdot0, REAL8 dtau)
Extrapolate the Pulsar spin-parameters (fkdot0) from the initial reference-epoch to the new referen...
int XLALInitPulsarSpinRangeFromSpins(PulsarSpinRange *range, const LIGOTimeGPS *refTime, const PulsarSpins fkdot1, const PulsarSpins fkdot2)
Initialise a PulsarSpinRange struct from two PulsarSpins structs.
int XLALCWSignalBand(REAL8 *minFreq, REAL8 *maxFreq, const DetectorStateSeries *detStates, const PulsarDopplerParams *doppler)
Determines the frequency band occupied by the frequency evolution of a given CW signal between two GP...
int XLALCWSignalCoveringBand(REAL8 *minCoverFreq, REAL8 *maxCoverFreq, const LIGOTimeGPS *time1, const LIGOTimeGPS *time2, const PulsarSpinRange *spinRange, const REAL8 binaryMaxAsini, const REAL8 binaryMinPeriod, const REAL8 binaryMaxEcc)
Determines a frequency band which covers the frequency evolution of a band of CW signals between two ...
double REAL8
REAL8 PulsarSpins[PULSAR_MAX_SPINS]
Typedef for fixed-size array holding GW frequency and derivatives fk = d^k Freq/dt^k|(tau_ref)
Timeseries of DetectorState's, representing the detector-info at different timestamps.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
Contains a "spin-range", ie spins and corresponding bands at a given (SSB) reference GPS-time .