GenerateTaylorCW.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Jolien Creighton, Teviet Creighton
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="GenerateTaylorCWHV">
00021 Author: Creighton, T. D.
00022 $Id: GenerateTaylorCW.h,v 1.5 2007/06/08 14:41:46 bema Exp $
00023 **************************************************** </lalVerbatim> */
00024 
00025 /********************************************************** <lalLaTeX>
00026 
00027 \section{Header \texttt{GenerateTaylorCW.h}}
00028 \label{s:GenerateTaylorCW.h}
00029 
00030 Provides routines to generate Taylor-parameterized continuous
00031 waveforms.
00032 
00033 \subsection*{Synopsis}
00034 \begin{verbatim}
00035 #include <lal/GenerateTaylorCW.h>
00036 \end{verbatim}
00037 
00038 This header covers routines to generate continuous quasiperiodic
00039 waveforms whose frequency varies slowly and smoothly with time.  For
00040 such sources the frequency function is normally described by its
00041 Taylor ``spindown'' (or spin-up) coefficients.  This type of waveform
00042 may be typical of objects such as neutron stars that are gradually
00043 shedding angular momentum, or are accelerating in the gravitational
00044 potential of a star cluster.  The Taylor expansion is likely
00045 \emph{not} suitable for long-term modelling of the frequency of waves
00046 from glitching neutron stars, neutron stars in close binary orbits, or
00047 neutron stars that are accreting or shedding angular momentum in a
00048 stochastic manner.
00049 
00050 The frequency and phase of such slowly-varying quasiperiodic sources
00051 are given by their Taylor series:
00052 \begin{eqnarray}
00053 \label{eq:taylorcw-freq}
00054 f(t)    & = & f_0 \left[ 1 + \sum_{k=1}^n f_k(t-t_0)^k \right] \;, \\
00055 \label{eq:taylorcw-phi}
00056 \phi(t) & = & \phi_0 + 2\pi f_0 \left[ (t-t_0) +
00057                 \sum_{k=1}^n \frac{f_k}{k+1}(t-t_0)^{k+1} \right] \;,
00058 \end{eqnarray}
00059 where $f_k$ are the spin-normalized Taylor coefficients.  If the
00060 source's spin is varying over some timescale $\tau$, one typically
00061 expects that $f_k\sim\tau^{-k}$.  Note that in this and later
00062 discussions, $f$ and $\phi$ refer to the frequency and phase of the
00063 gravitational wave, which are typically some constant multiple of
00064 (often twice) the frequency and phase of the rotating source.
00065 
00066 The \verb@CoherentGW@ structure allows for a very general
00067 description of waveforms with modulations in the amplitudes or
00068 relative phases of the wave polarizations, as described in
00069 \verb@SimulateCoherentGW.h@.  However, in this simplest model of
00070 quasiperiodic waveforms, we neglect such phenomena as precession that
00071 would produce these effects.  Thus for any given source one can choose
00072 a polarization basis (described by some polarization angle $\psi$) in
00073 which the wave has a constant elliptical polarization of the form:
00074 \begin{eqnarray}
00075 \label{eq:taylorcw-hplus}
00076 h_+(t)      & = & A_+      \cos\phi(t) \;, \\
00077 \label{eq:taylorcw-hcross}
00078 h_\times(t) & = & A_\times \sin\phi(t) \;.
00079 \end{eqnarray}
00080 
00081 ******************************************************* </lalLaTeX> */
00082 
00083 #ifndef _GENERATETAYLORCW_H
00084 #define _GENERATETAYLORCW_H
00085 
00086 #include <lal/LALStdlib.h>
00087 #include <lal/SimulateCoherentGW.h>
00088 #include <lal/SkyCoordinates.h>
00089 
00090 #ifdef  __cplusplus
00091 extern "C" {
00092 #pragma }
00093 #endif
00094 
00095 NRCSID( GENERATETAYLORCWH, "$Id: GenerateTaylorCW.h,v 1.5 2007/06/08 14:41:46 bema Exp $" );
00096 
00097 /********************************************************** <lalLaTeX>
00098 \subsection*{Error conditions}
00099 ****************************************** </lalLaTeX><lalErrTable> */
00100 #define GENERATETAYLORCWH_ENUL 1
00101 #define GENERATETAYLORCWH_EOUT 2
00102 #define GENERATETAYLORCWH_EMEM 3
00103 
00104 #define GENERATETAYLORCWH_MSGENUL "Unexpected null pointer in arguments"
00105 #define GENERATETAYLORCWH_MSGEOUT "Output field a, f, phi, or shift already exists"
00106 #define GENERATETAYLORCWH_MSGEMEM "Out of memory"
00107 /******************************************** </lalErrTable><lalLaTeX>
00108 
00109 \subsection*{Types}
00110 
00111 \subsubsection*{Structure \texttt{TaylorCWParamStruc}}
00112 \idx[Type]{TaylorCWParamStruc}
00113 
00114 This structure stores the parameters for constructing a gravitational
00115 waveform with a Taylor-polynomial frequency and phase.  As with the
00116 \verb@PPNParamStruc@ type in \verb@GeneratePPNInspiral.h@, we divide
00117 the fields into passed fields (which are supplied to the final
00118 \verb@CoherentGW@ structure but not used in any calculations), input
00119 fields (that are used by the waveform generator), and output fields
00120 (that are set by the waveform generator).  They are:
00121 
00122 \bigskip\noindent\textit{Passed fields:}
00123 \begin{description}
00124 \item[\texttt{SkyPosition position}] The location of the source on the
00125 sky, normally in equatorial coordinates.
00126 
00127 \item[\texttt{REAL4 psi}] The polarization angle of the source, in
00128 radians.
00129 
00130 \item[\texttt{LIGOTimeGPS epoch}] The start time $t_0$ of the output
00131 series.
00132 \end{description}
00133 
00134 \medskip\noindent\textit{Input fields:}
00135 \begin{description}
00136 \item[\texttt{REAL8 deltaT}] The requested sampling interval of the
00137 waveform, in s.
00138 
00139 \item[\texttt{UINT4 length}] The number of samples in the generated
00140 waveform.
00141 
00142 \item[\texttt{REAL4 aPlus, aCross}] The polarization amplitudes $A_+$,
00143 $A_\times$, in dimensionless strain units.
00144 
00145 \item[\texttt{REAL8 phi0}] The wave phase at time $t_0$, in radians.
00146 
00147 \item[\texttt{REAL8 f0}] The wave frequency at time $t_0$, in Hz.
00148 
00149 \item[\texttt{REAL8Vector *f}] The spin-normalized Taylor parameters
00150 $f_k$, as defined in Eq.~\ref{eq:taylorcw-freq}, above.  If
00151 \verb@f@=\verb@NULL@, a monochromatic wave is generated.
00152 \end{description}
00153 
00154 \medskip\noindent\textit{Output fields:}
00155 \begin{description}
00156 \item[\texttt{REAL4 dfdt}] The maximum value of $\Delta f\Delta t$
00157 encountered over any timestep $\Delta t$ used in generating the
00158 waveform.
00159 \end{description}
00160 
00161 ******************************************************* </lalLaTeX> */
00162 
00163 typedef struct tagTaylorCWParamStruc {
00164   /* Passed parameters. */
00165   SkyPosition position; /* location of source on sky */
00166   REAL4 psi;            /* polarization angle (radians) */
00167   LIGOTimeGPS epoch;    /* start time of output time series */
00168 
00169   /* Input parameters. */
00170   REAL8 deltaT;         /* requested sampling interval (s) */
00171   UINT4 length;         /* length of time series */
00172   REAL4 aPlus, aCross;  /* polarization amplitudes */
00173   REAL8 phi0;           /* initial phase */
00174   REAL8 f0;             /* initial frequency */
00175   REAL8Vector *f;       /* f0-normalized Taylor parameters */
00176 
00177   /* Output parameters. */
00178   REAL4 dfdt;           /* maximum value of df*dt over any timestep */
00179 } TaylorCWParamStruc;
00180 
00181 
00182 /* <lalLaTeX>
00183 \vfill{\footnotesize\input{GenerateTaylorCWHV}}
00184 </lalLaTeX> */
00185 
00186 
00187 /* Function prototypes. */
00188 
00189 /* <lalLaTeX>
00190 \newpage\input{GenerateTaylorCWC}
00191 </lalLaTeX> */
00192 void
00193 LALGenerateTaylorCW( LALStatus          *,
00194                      CoherentGW         *output,
00195                      TaylorCWParamStruc *params );
00196 
00197 /* <lalLaTeX>
00198 \newpage\input{SimulateTaylorCWTestC}
00199 </lalLaTeX> */
00200 
00201 #ifdef  __cplusplus
00202 #pragma {
00203 }
00204 #endif
00205 
00206 #endif /* _GENERATETAYLORCW_H */

Generated on Sat Sep 6 03:07:00 2008 for LAL by  doxygen 1.5.2