00001 /* 00002 * Copyright (C) 2007 Philip Charlton, Duncan Brown, Jolien Creighton, David McKechan, Stephen Fairhurst, Teviet Creighton, Thomas Cokelaer, John Whelan 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 /************************** <lalVerbatim file="GeneratePPNInspiralHV"> 00021 Author: Creighton, T. D. 00022 $Id: GeneratePPNInspiral.h,v 1.23 2007/11/30 08:54:50 mckechan Exp $ 00023 **************************************************** </lalVerbatim> */ 00024 00025 /********************************************************** <lalLaTeX> 00026 00027 \section{Header \texttt{GeneratePPNInspiral.h}} 00028 \label{s:GeneratePPNInspiral.h} 00029 00030 Provides routines to generate restricted parametrized 00031 post${}^{5/2}$-Newtonian inspiral waveforms. 00032 00033 \subsection*{Synopsis} 00034 \begin{verbatim} 00035 #include <lal/GeneratePPNInspiral.h> 00036 \end{verbatim} 00037 00038 This header covers routines to generate a ``restricted'' parametrized 00039 post${}^{5/2}$-Newtonian binary inspiral waveform in the time domain. 00040 That is, the calculation of the wave phase is accurate to 00041 post${}^{5/2}$-Newtonian order (including corrections up to order 00042 $v^5/c^5$, where $v$ is the orbital speed), but the wave amplitudes 00043 are accurate only to leading (post${}^0$-Newtonian) order. 00044 Furthermore, at each order the post${}^{n/2}$-Newtonian correction can 00045 be turned on, off, or set to an unphysical value, by adjusting a 00046 parameter $p_n$. 00047 00048 The post-Newtonian expansion implicitly assumes an \emph{adiabatic} 00049 inspiral, where one can represent the waveform by an ``instantaneous'' 00050 amplitude and frequency that vary over timescales longer than one wave 00051 period. The \emph{orbital} frequency of the system to 00052 post${}^{5/2}$-Newtonian order is given in Eqs.~6.4.1 and~6.9.1 00053 of~\cite{GRASP_1.9.8:2000}; here we work entirely in terms of the 00054 \emph{gravitational-wave} frequency, which is twice the orbital 00055 frequency: 00056 \begin{eqnarray} 00057 f(t) & = & \frac{M_\odot}{8\pi T_\odot m_\mathrm{tot}}\left\{ 00058 p_0\Theta^{-3/8}+ 00059 p_1\Theta^{-1/2}+ 00060 p_2\left(\frac{743}{2688}+\frac{11}{32}\eta\right)\Theta^{-5/8}- 00061 p_3\frac{3\pi}{10}\Theta^{-3/4} \right. \nonumber \\ 00062 \label{eq:ppn-freq} 00063 & & \left.+ p_4\left(\frac{1855099}{14450688}+\frac{56975}{258048}\eta+ 00064 \frac{371}{2048}\eta^2\right)\Theta^{-7/8}- 00065 p_5\left(\frac{7729}{21504}+\frac{3}{256}\eta\right)\pi\Theta^{-1} 00066 \right\} \; , 00067 \end{eqnarray} 00068 where $M_\odot$ is the mass of the Sun, 00069 $T_\odot=GM_\odot/c^3=4.925491\times10^{-6}$s is the ``geometrized'' 00070 solar mass in time units, $m_\mathrm{tot}=m_1+m_2$ is the total mass 00071 of the binary, $\eta=m_1m_2/m_\mathrm{tot}^2$ is the (symmetric) mass 00072 ratio parameter, and $\Theta$ is a dimensionless time parameter: 00073 \begin{equation} 00074 \label{eq:ppn-theta} 00075 \Theta(t) = \frac{\eta M_\odot}{5T_\odot m_\mathrm{tot}}(t_c-t) \; . 00076 \end{equation} 00077 Here $t_c$ is the time of coalescence of the two masses in the 00078 point-mass approximation. The post-Newtonian parameters $p_k$ are 00079 defined such that in a normal (physical) post${}^{n/2}$-Newtonian 00080 expansion, one sets $p_1=0$ and $p_{k>n}=0$, and $p_k=1$ for all other 00081 $k$. However, changing this convention can be used to model in an 00082 approximate way things such as spin, eccentricity, or non-GR theories 00083 of gravity. We also note that while most terms are normalized to 00084 their normal post-Newtonian values, the normalization on the $p_1$ 00085 term is completely arbitrary, since it is zero in a normal 00086 post-Newtonian expansion. 00087 00088 The wave phase as a function of time can be computed analytically from 00089 Eq.~\ref{eq:ppn-freq} as $\phi_\mathrm{orb}=2\pi\int f\,dt$: 00090 \begin{eqnarray} 00091 \phi(t) & = & \phi_c - \frac{2}{\eta}\left\{ 00092 p_0\Theta^{5/8}+ 00093 p_1\frac{5}{4}\Theta^{1/2}+ 00094 p_2\left(\frac{3715}{8064}+\frac{55}{96}\eta\right)\Theta^{3/8}- 00095 p_3\frac{3\pi}{4}\Theta^{1/4} \right. \nonumber \\ 00096 \label{eq:ppn-phi} 00097 & & \left.+ p_4\left(\frac{9275495}{14450688}+\frac{284875}{258048}\eta+ 00098 \frac{1855}{2048}\eta^2\right)\Theta^{1/8}- 00099 p_5\left(\frac{38645}{172032}+\frac{15}{2048}\eta\right)\pi 00100 \log\left(\frac{\Theta}{\Theta_0}\right)\right\} \; . 00101 \end{eqnarray} 00102 Here $\Theta_0$ is an arbitrary constant; changing it is equivalent to 00103 changing $\phi_c$. We note that the post${}^{5/2}$-Newtonian term 00104 introduces a late-time divergence in phase which renders meaningless 00105 the interpretation of $\phi_c$ as ``phase at coalescence''; in our 00106 convention we define $\phi_c$ to correspond to the case $\Theta_0=1$. 00107 00108 We refer the interested reader to Sec.~6.6 of~\cite{GRASP_1.9.8:2000} 00109 for a discussion of how propagation effects shift the phase of the 00110 waveform relative to the orbital phase. To summarize, though: A 00111 changing propagation delay does introduce a time-dependent phase shift 00112 in the waveform, but the dependence on $t$ is weak except at very late 00113 times; although it looks like a post${}^{3/2}$-Newtonian phase 00114 correction, it can in fact be represented as a post${}^{3}$-Newtonian 00115 phase correction combined with a post${}^{3/2}$-Newtonian amplitude 00116 correction. Since we are concerned with \emph{restricted} 00117 post${}^{5/2}$-Newtonian waveforms, which model the amplitude only to 00118 leading (post${}^0$-Newtonian) order, we can ignore these propagation 00119 effects. 00120 00121 To leading order, then, the amplitude of the + and $\times$ 00122 polarizations of the wave are given by Eqs.~6.6.1--6.6.4 00123 of~\cite{GRASP_1.9.8:2000} as: 00124 \begin{eqnarray} 00125 \label{eq:ppn-aplus} 00126 A_+(t) & = & -\frac{2T_\odot c}{D}(1+\cos^2 i) 00127 \left(\frac{\eta m_\mathrm{tot}}{M_\odot}\right) 00128 \left[\frac{\pi T_\odot m_\mathrm{tot}f(t)}{M_\odot} 00129 \right]^{2/3} \; , \\ 00130 \label{eq:ppn-across} 00131 A_\times(t) & = & -\frac{2T_\odot c}{D}(2\cos i) 00132 \left(\frac{\eta m_\mathrm{tot}}{M_\odot}\right) 00133 \left[\frac{\pi T_\odot m_\mathrm{tot}f(t)}{M_\odot} 00134 \right]^{2/3} \; , 00135 \end{eqnarray} 00136 where $D$ is the distance to the source and $i$ is the inclination of 00137 the axis of the source to the line of sight. The normal polarization 00138 convention in~\cite{Will_C:1996} is used, where the reference 00139 $x$-coordinate axis for the + and $\times$ polarization tensors is the 00140 ascending node of the rotational plane as it crosses the plane 00141 transverse to the propagation direction. This convention implies that 00142 the + and $\times$ waveforms are elliptically polarized as follows: 00143 \begin{eqnarray} 00144 \label{eq:ppn-hplus} 00145 h_+(t) & = & A_+(t)\cos\phi(t) \; , \\ 00146 \label{eq:ppn-hcross} 00147 h_\times(t) & = & A_\times(t)\sin\phi(t) \; . 00148 \end{eqnarray} 00149 00150 ******************************************************* </lalLaTeX> */ 00151 00152 #ifndef _GENERATEPPNINSPIRAL_H 00153 #define _GENERATEPPNINSPIRAL_H 00154 00155 #include <lal/LALStdlib.h> 00156 #include <lal/SimulateCoherentGW.h> 00157 #include <lal/SkyCoordinates.h> 00158 #include <lal/Random.h> 00159 00160 #ifdef __cplusplus 00161 extern "C" { 00162 #pragma } 00163 #endif 00164 00165 NRCSID( GENERATEPPNINSPIRALH, "$Id: GeneratePPNInspiral.h,v 1.23 2007/11/30 08:54:50 mckechan Exp $" ); 00166 00167 /********************************************************** <lalLaTeX> 00168 \subsection*{Error conditions} 00169 ****************************************** </lalLaTeX><lalErrTable> */ 00170 #define GENERATEPPNINSPIRALH_ENUL 1 00171 #define GENERATEPPNINSPIRALH_EOUT 2 00172 #define GENERATEPPNINSPIRALH_ETBAD 3 00173 #define GENERATEPPNINSPIRALH_EFBAD 4 00174 #define GENERATEPPNINSPIRALH_EPBAD 5 00175 #define GENERATEPPNINSPIRALH_EMBAD 6 00176 #define GENERATEPPNINSPIRALH_EDBAD 7 00177 #define GENERATEPPNINSPIRALH_EMEM 8 00178 00179 #define GENERATEPPNINSPIRALH_MSGENUL "Unexpected null pointer in arguments" 00180 #define GENERATEPPNINSPIRALH_MSGEOUT "output field a, f, phi, or shift already exists" 00181 #define GENERATEPPNINSPIRALH_MSGETBAD "Bad sampling interval" 00182 #define GENERATEPPNINSPIRALH_MSGEFBAD "Bad starting frequency; could not get valid start time" 00183 #define GENERATEPPNINSPIRALH_MSGEPBAD "Bad post-Newtonian parameters" 00184 #define GENERATEPPNINSPIRALH_MSGEMBAD "Bad masses" 00185 #define GENERATEPPNINSPIRALH_MSGEDBAD "Bad distance" 00186 #define GENERATEPPNINSPIRALH_MSGEMEM "Out of memory" 00187 /******************************************** </lalErrTable><lalLaTeX> 00188 \subsection*{Termination conditions} 00189 00190 In addition to the error conditions above, there are a number of ways 00191 that the signal generation routine can terminate gracefully while 00192 still returning a valid waveform. In many cases one \emph{wants} to 00193 continue generating a waveform ``until things fall apart''; the 00194 following codes, returned in the \verb@PPNParamStruc@ below, allow the 00195 waveform generator to report exactly \emph{how} things fell apart. 00196 00197 For the sake of LAL namespace conventions, these termination codes are 00198 \verb@#define@d and autodocumented exactly like error codes. 00199 ****************************************** </lalLaTeX><lalErrTable> */ 00200 #define GENERATEPPNINSPIRALH_EFSTOP 0 00201 #define GENERATEPPNINSPIRALH_ELENGTH 1 00202 #define GENERATEPPNINSPIRALH_EFNOTMON 2 00203 #define GENERATEPPNINSPIRALH_EPNFAIL 3 00204 #define GENERATEPPNINSPIRALH_ERTOOSMALL 4 00205 00206 #define GENERATEPPNINSPIRALH_MSGEFSTOP "Reached requested termination frequency" 00207 #define GENERATEPPNINSPIRALH_MSGELENGTH "Reached maximum length, or end of provided time series vector" 00208 #define GENERATEPPNINSPIRALH_MSGEFNOTMON "Frequency no longer increasing monotonically" 00209 #define GENERATEPPNINSPIRALH_MSGEPNFAIL "Evolution dominated by higher-order PN terms" 00210 #define GENERATEPPNINSPIRALH_MSGERTOOSMALL "Orbital radius too small for PN approximation" 00211 /******************************************** </lalErrTable><lalLaTeX> 00212 00213 \subsection*{Types} 00214 00215 \subsubsection*{Structure \texttt{PPNParamStruc}} 00216 \idx[Type]{PPNParamStruc} 00217 00218 This structure stores the parameters for constructing a restricted 00219 post-Newtonian waveform. It is divided into three parts: parameters 00220 passed along to the output structure but not used by waveform 00221 generator, parameters used as input to the waveform generator, and 00222 parameters set by the generator to evaluate its success. 00223 00224 \bigskip\noindent\textit{Passed fields:} 00225 \begin{description} 00226 \item[\texttt{SkyPosition position}] The location of the source on the 00227 sky, normally in equatorial coordinates. 00228 00229 \item[\texttt{REAL4 psi}] The polarization angle of the source, in 00230 radians. 00231 00232 \item[\texttt{LIGOTimeGPS epoch}] The start time of the output series. 00233 \end{description} 00234 00235 \medskip\noindent\textit{Input fields:} 00236 \begin{description} 00237 \item[\texttt{REAL4 mTot}] The total mass $m_\mathrm{tot}=m_1+m_2$ of 00238 the binary system, in solar masses. 00239 00240 \item[\texttt{REAL4 eta}] The mass ratio 00241 $\eta=m_1m_2/m_\mathrm{tot}^2$ of the binary system. Physically this 00242 parameter must lie in the range $\eta\in(0,1/4]$; values outside of 00243 this range may be permitted in order to represent ``nonphysical'' 00244 post-Newtonian expansions. 00245 00246 \item[\texttt{REAL4 d}] The distance to the system, in metres. 00247 00248 \item[\texttt{REAL4 inc}] The inclination of the system to the line of 00249 sight, in radians. 00250 00251 \item[\texttt{REAL4 phi}] The phase at coalescence $\phi_c$ (or 00252 arbitrary reference phase for a post${}^{5/2}$-Newtonian 00253 approximation), in radians. 00254 00255 \item[\texttt{REAL8 deltaT}] The requested sampling interval of the 00256 waveform, in s. 00257 00258 \item[\texttt{REAL4 fStartIn}] The requested starting frequency of the 00259 waveform, in Hz. 00260 00261 \item[\texttt{REAL4 fStopIn}] The requested termination frequency of 00262 the waveform, in Hz. If set to 0, the waveform will be generated 00263 until a termination condition (above) is met. If set to a negative 00264 number, the generator will use its absolute value as the terminating 00265 frequency, but will ignore post-Newtonian breakdown; it will terminate 00266 only at the requested frequency $-\mathtt{fStopIn}$, a local maximum 00267 frequency, or the central singularity. 00268 00269 \item[\texttt{UINT4 lengthIn}] The maximum number of samples in the 00270 generated waveform. If zero, the waveforms can be arbitrarily long. 00271 00272 \item[\texttt{REAL4Vector *ppn}] The parameters $p_n$ selecting the 00273 type of post-Newtonian expansion. If \verb@ppn@=\verb@NULL@, a 00274 ``normal'' (physical) expansion is assumed. 00275 \end{description} 00276 00277 \medskip\noindent\textit{Output fields:} 00278 \begin{description} 00279 \item[\texttt{REAL8 tc}] The time $t_c-t$ from the start of the 00280 waveform to coalescence (in the point-mass approximation), in s. 00281 00282 \item[\texttt{REAL4 dfdt}] The maximum value of $\Delta f\Delta t$ 00283 encountered over any timestep $\Delta t$ used in generating the 00284 waveform. 00285 00286 \item[\texttt{REAL4 fStart}] The actual starting frequency of the 00287 waveform, in Hz (normally close but not identical to \verb@fStartIn@). 00288 00289 \item[\texttt{REAL4 fStop}] The frequency at the termination of the 00290 waveform, in Hz. 00291 00292 \item[\texttt{INT4 length}] The length of the generated waveform. 00293 00294 \item[\texttt{INT4 termCode}] The termination condition (above) that 00295 stopped computation of the waveform. 00296 00297 \item[\texttt{const CHAR *termDescription}] The termination code 00298 description (above). 00299 \end{description} 00300 00301 ******************************************************* </lalLaTeX> */ 00302 00303 typedef struct tagPPNParamStruc { 00304 /* Passed parameters. */ 00305 SkyPosition position; /* location of source on sky */ 00306 REAL4 psi; /* polarization angle (radians) */ 00307 LIGOTimeGPS epoch; /* start time of output time series */ 00308 00309 /* Input parameters. */ 00310 REAL4 mTot; /* total system mass (Msun) */ 00311 REAL4 eta; /* mass ratio */ 00312 REAL4 d; /* distance (metres) */ 00313 REAL4 inc; /* inclination angle (radians) */ 00314 REAL4 phi; /* coalescence phase (radians) */ 00315 REAL8 deltaT; /* requested sampling interval (s) */ 00316 REAL4 fStartIn; /* requested start frequency (Hz) */ 00317 REAL4 fStopIn; /* requested stop frequency (Hz) */ 00318 UINT4 lengthIn; /* maximum length of waveform */ 00319 REAL4Vector *ppn; /* post-Newtonian selection parameters */ 00320 INT4 ampOrder; /* PN amplitude selection 0-5 */ 00321 00322 /* Output parameters. */ 00323 REAL8 tc; /* time to coalescence from start of waveform */ 00324 REAL4 dfdt; /* maximum value of df*dt over any timestep */ 00325 REAL4 fStart; /* actual start frequency (Hz) */ 00326 REAL4 fStop; /* actual stop frequency (Hz) */ 00327 UINT4 length; /* length of signal generated */ 00328 INT4 termCode; /* termination code */ 00329 const CHAR *termDescription; /* description of termination code */ 00330 } PPNParamStruc; 00331 00332 /********************************************************** <lalLaTeX> 00333 00334 \subsubsection*{Structure \texttt{GalacticInspiralParamStruc}} 00335 \idx[Type]{GalacticInspiralParamStruc} 00336 00337 This structure stores the position and mass parameters of a galactic 00338 inspiral event. The fields are: 00339 00340 \begin{description} 00341 \item[\texttt{REAL4 rho}] The distance of the binary system from the 00342 Galactic axis, in kpc. 00343 00344 \item[\texttt{REAL4 z}] The distance of the system from the Galactic 00345 plane, in kpc. 00346 00347 \item[\texttt{REAL4 lGal}] The Galactocentric Galactic longitude of 00348 the system (i.e.\ the Galactic longitude of the direction \emph{from 00349 the Galactic centre} through the system), in radians. 00350 See~\verb@SkyCoordinates.h@ for the definition of this quantity. 00351 00352 \item[\texttt{REAL4 m1, m2}] The masses of the binary components, in 00353 solar masses. 00354 00355 \item[\texttt{LIGOTimeGPS geocentEndTime}] The geocentric end time of 00356 the inspiral event. 00357 \end{description} 00358 00359 ******************************************************* </lalLaTeX> */ 00360 00361 typedef struct tagGalacticInspiralParamStruc { 00362 REAL4 rho; /* Galactocentric axial radius (kpc) */ 00363 REAL4 z; /* Galactocentric axial height (kpc) */ 00364 REAL4 lGal; /* Galactocentric longitude (radians) */ 00365 REAL4 m1, m2; /* system masses (solar masses) */ 00366 LIGOTimeGPS geocentEndTime; /* geocentric end time */ 00367 } GalacticInspiralParamStruc; 00368 00369 00370 /* <lalLaTeX> 00371 \vfill{\footnotesize\input{GeneratePPNInspiralHV}} 00372 </lalLaTeX> */ 00373 00374 typedef struct tagAmpSwitchStruc { 00375 UINT4 q0, q1, q2, q3, q4, q5; 00376 } AmpSwitchStruc; 00377 00378 00379 00380 /* Function prototypes. */ 00381 00382 /* <lalLaTeX> 00383 \newpage\input{GeneratePPNInspiralC} 00384 </lalLaTeX> */ 00385 void 00386 LALGeneratePPNInspiral( LALStatus *, 00387 CoherentGW *output, 00388 PPNParamStruc *params ); 00389 00390 /* <lalLaTeX> 00391 \newpage\input{GeneratePPNAmpCorInspiralC} 00392 </lalLaTeX> */ 00393 void 00394 LALGeneratePPNAmpCorInspiral( LALStatus *, 00395 CoherentGW *output, 00396 PPNParamStruc *params ); 00397 00398 /* <lalLaTeX> 00399 \newpage\input{GeneratePPNAmpTruncInspiralC} 00400 </lalLaTeX> */ 00401 void 00402 LALGeneratePPNAmpTruncInspiral( LALStatus *, 00403 CoherentGW *output, 00404 PPNParamStruc *params ); 00405 00406 00407 /* <lalLaTeX> 00408 \newpage\input{GetInspiralParamsC} 00409 </lalLaTeX> */ 00410 void 00411 LALGetInspiralParams( LALStatus *, 00412 PPNParamStruc *output, 00413 GalacticInspiralParamStruc *input, 00414 RandomParams *params ); 00415 00416 /* <lalLaTeX> 00417 \newpage\input{GenerateInspiralSmoothC} 00418 </lalLaTeX> */ 00419 void 00420 LALGenerateInspiralSmooth( LALStatus *, 00421 CoherentGW **output, 00422 PPNParamStruc *params, 00423 REAL4 *qfactor); 00424 00425 /* <lalLaTeX> 00426 \newpage\input{GeneratePPNInspiralTestC} 00427 </lalLaTeX> */ 00428 00429 #ifdef __cplusplus 00430 #pragma { 00431 } 00432 #endif 00433 00434 #endif /* _GENERATEPPNINSPIRAL_H */
1.5.2