LALPulsar  6.1.0.1-fe68b98
GenerateTaylorCW.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2007 Jolien Creighton, Teviet Creighton
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 _GENERATETAYLORCW_H
21 #define _GENERATETAYLORCW_H
22 
23 #include <lal/LALStdlib.h>
24 #include <lal/PulsarSimulateCoherentGW.h>
25 #include <lal/SkyCoordinates.h>
26 
27 #if defined(__cplusplus)
28 extern "C" {
29 #elif 0
30 } /* so that editors will match preceding brace */
31 #endif
32 
33 /**
34  * \defgroup GenerateTaylorCW_h Header GenerateTaylorCW.h
35  * \ingroup lalpulsar_inject
36  * \author Creighton, T. D.
37  *
38  * \brief Provides routines to generate Taylor-parameterized continuous waveforms.
39  *
40  * ### Synopsis ###
41  *
42  * \code
43  * #include <lal/GenerateTaylorCW.h>
44  * \endcode
45  *
46  * This header covers routines to generate continuous quasiperiodic
47  * waveforms whose frequency varies slowly and smoothly with time. For
48  * such sources the frequency function is normally described by its
49  * Taylor "spindown" (or spin-up) coefficients. This type of waveform
50  * may be typical of objects such as neutron stars that are gradually
51  * shedding angular momentum, or are accelerating in the gravitational
52  * potential of a star cluster. The Taylor expansion is likely
53  * \e not suitable for long-term modelling of the frequency of waves
54  * from glitching neutron stars, neutron stars in close binary orbits, or
55  * neutron stars that are accreting or shedding angular momentum in a
56  * stochastic manner.
57  *
58  * The frequency and phase of such slowly-varying quasiperiodic sources
59  * are given by their Taylor series:
60  * \f{eqnarray}{
61  * \label{eq_taylorcw-freq}
62  * f(t) & = & f_0 \left[ 1 + \sum_{k=1}^n f_k(t-t_0)^k \right] \;, \\
63  * \label{eq_taylorcw-phi}
64  * \phi(t) & = & \phi_0 + 2\pi f_0 \left[ (t-t_0) +
65  * \sum_{k=1}^n \frac{f_k}{k+1}(t-t_0)^{k+1} \right] \;,
66  * \f}
67  * where \f$ f_k \f$ are the spin-normalized Taylor coefficients. If the
68  * source's spin is varying over some timescale \f$ \tau \f$ , one typically
69  * expects that \f$ f_k\sim\tau^{-k} \f$ . Note that in this and later
70  * discussions, \f$ f \f$ and \f$ \phi \f$ refer to the frequency and phase of the
71  * gravitational wave, which are typically some constant multiple of
72  * (often twice) the frequency and phase of the rotating source.
73  *
74  * The \c PulsarCoherentGW structure allows for a very general
75  * description of waveforms with modulations in the amplitudes or
76  * relative phases of the wave polarizations, as described in
77  * \ref PulsarSimulateCoherentGW_h. However, in this simplest model of
78  * quasiperiodic waveforms, we neglect such phenomena as precession that
79  * would produce these effects. Thus for any given source one can choose
80  * a polarization basis (described by some polarization angle \f$ \psi \f$ ) in
81  * which the wave has a constant elliptical polarization of the form:
82  * \f{eqnarray}{
83  * \label{eq_taylorcw-hplus}
84  * h_+(t) & = & A_+ \cos\phi(t) \;, \\
85  * \label{eq_taylorcw-hcross}
86  * h_\times(t) & = & A_\times \sin\phi(t) \;.
87  * \f}
88  */
89 /** @{ */
90 
91 /** \name Error Codes */
92 /** @{ */
93 #define GENERATETAYLORCWH_ENUL 1 /**< Unexpected null pointer in arguments */
94 #define GENERATETAYLORCWH_EOUT 2 /**< Output field a, f, phi, or shift already exists */
95 #define GENERATETAYLORCWH_EMEM 3 /**< Out of memory */
96 /** @} */
97 
98 /** \cond DONT_DOXYGEN */
99 #define GENERATETAYLORCWH_MSGENUL "Unexpected null pointer in arguments"
100 #define GENERATETAYLORCWH_MSGEOUT "Output field a, f, phi, or shift already exists"
101 #define GENERATETAYLORCWH_MSGEMEM "Out of memory"
102 /** \endcond */
103 
104 /**
105  * This structure stores the parameters for constructing a gravitational
106  * waveform with a Taylor-polynomial frequency and phase. As with the
107  * \c PPNParamStruc type in \c GeneratePPNInspiral_h, we divide
108  * the fields into passed fields (which are supplied to the final
109  * \c PulsarCoherentGW structure but not used in any calculations), input
110  * fields (that are used by the waveform generator), and output fields
111  * (that are set by the waveform generator).
112  */
113 typedef struct tagTaylorCWParamStruc {
114  /** \name Passed parameters. */
115  /** @{ */
116  SkyPosition position; /**< The location of the source on the sky, normally in equatorial coordinates */
117  REAL4 psi; /**< The polarization angle of the source, in radians */
118  LIGOTimeGPS epoch; /**< The start time \f$ t_0 \f$ of the output series */
119  /** @} */
120 
121  /** \name Input parameters. */
122  /** @{ */
123  REAL8 deltaT; /**< The requested sampling interval of the waveform, in s */
124  UINT4 length; /**< The number of samples in the generated waveform */
125  REAL4 aPlus, aCross; /**< The polarization amplitudes \f$ A_+ \f$ , \f$ A_\times \f$ , in dimensionless strain units */
126  REAL8 phi0; /**< The wave phase at time \f$ t_0 \f$ , in radians */
127  REAL8 f0; /**< The wave frequency at time \f$ t_0 \f$ , in Hz */
128  REAL8Vector *f; /**< The spin-normalized Taylor parameters \f$ f_k \f$ , as defined in \eqref{eq_taylorcw-freq}; If \c f=\c NULL, a monochromatic wave is generated */
129  /** @} */
130 
131  /** \name Output parameters. */
132  /** @{ */
133  REAL4 dfdt; /**< The maximum value of \f$ \Delta f\Delta t \f$ encountered over any timestep \f$ \Delta t \f$ used in generating the waveform */
134  /** @} */
136 
137 
138 /* ---------- Function prototypes. ---------- */
139 void
143 
144 /** @} */
145 
146 #if 0
147 {
148  /* so that editors will match succeeding brace */
149 #elif defined(__cplusplus)
150 }
151 #endif
152 
153 #endif /* _GENERATETAYLORCW_H */
void LALGenerateTaylorCW(LALStatus *, PulsarCoherentGW *output, TaylorCWParamStruc *params)
Computes a Taylor-parametrized continuous waveform.
double REAL8
uint32_t UINT4
float REAL4
This structure stores a representation of a plane gravitational wave propagating from a particular po...
This structure stores the parameters for constructing a gravitational waveform with a Taylor-polynomi...
REAL8 deltaT
The requested sampling interval of the waveform, in s.
SkyPosition position
The location of the source on the sky, normally in equatorial coordinates.
REAL8Vector * f
The spin-normalized Taylor parameters , as defined in Eq.
REAL4 dfdt
The maximum value of encountered over any timestep used in generating the waveform.
REAL8 phi0
The wave phase at time , in radians.
LIGOTimeGPS epoch
The start time of the output series.
UINT4 length
The number of samples in the generated waveform.
REAL4 psi
The polarization angle of the source, in radians.
REAL8 f0
The wave frequency at time , in Hz.
REAL4 aCross
The polarization amplitudes , , in dimensionless strain units.