LALInspiralBankUtils.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Thomas Cokelaer
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="LALInspiralBankUtilsCV">
00021 Author: Cokelaer Thomas
00022 $Id: LALInspiralBankUtils.c,v 1.3 2007/06/08 14:41:42 bema Exp $
00023 </lalVerbatim>  */
00024 
00025 /*  <lalLaTeX>
00026 
00027 \subsection{Module \texttt{LALInspiralBankUtils.c}}
00028 
00029 \subsubsection*{Prototypes}
00030 \vspace{0.1in}
00031 \input{XLALInspiralTau3FromTau0AndEqualMassLineCP}
00032 \input{XLALInspiralTau3FromNonEqualMassCP}
00033 \input{XLALInspiralTau0FromMEtaCP}
00034 \input{XLALInspiralMFromTau0AndNonEqualMassCP}
00035 
00036 \idx{LALInspiralBankUtils()}
00037 
00038 \subsubsection*{Description}
00039 In a parameter space defined by $m_1$ and $m_2$, or equivalently, $M=m_1+m_2$ and $\eta=\frac{m_1 m_2}{M^2}$, the conversion
00040 to chirp-time parameter such as $\tau_0$ and $\tau_3$ si quite common. In particular, it is interesting to get the value of
00041 $\tau_3$ when only $\tau_0$ is known, and a constraint on the masses exists (e.g., $m_1=m_2$ or one of the mass equals mMin or mMax.
00042 This modules contains a few functions to perform these conversion. 
00043 \subsubsection*{Algorithm}
00044 We know that 
00045 \begin{equation}
00046 \tau_0 = \frac{A_0}{\eta} M^{-5/2}, 
00047 \label{eq:tau0a}
00048 \end{equation}
00049 and
00050  \begin{equation}
00051 \tau_3 = \frac{A_3}{\eta} M^{-2/3}, 
00052 \end{equation}
00053 where
00054 \begin{equation}
00055 A_0 = \frac{5}{256 (\pi *f_L)^{8/3}}, 
00056 \end{equation}
00057 and
00058 \begin{equation}
00059 A_3 = \frac{\pi}{8 (\pi *f_L)^{5/3}}, 
00060 \end{equation}
00061 
00062 Therefore, it is straightforward to express $\tau_3$ as a function of $\tau_0$ amd $\eta$:
00063 \begin{equation}
00064 \tau_3 = \frac{A3}{\eta} \left( \frac{\tau_0 \eta}{ A_0} \right)^{2/5}
00065 \label{eq:tau3b}
00066 \end{equation}
00067 if $\eta=0.25$ on the equal-mass line, then
00068 \begin{equation}
00069 \tau_3 = 4 A3 \left( \frac{\tau_0}{ 4 A_0} \right)^{2/5}
00070 \label{eq:tau3a}
00071 \end{equation}
00072 
00073 
00074 \noindent Equation \ref{eq:tau3b} returns $\tau_3$ given in $M, \eta$ and $f_L$ and is defined
00075 in\texttt{XLALInspiralTau3FromNonEqualMassLine}.
00076 \\\\
00077 Equation \ref{eq:tau3a} returns tau3 in the particular case $m_1=m_2$, given 
00078 $\tau_0$ only, and is defined in \texttt{XLALInspiralTau3FromTau0AndEqualMassLine}.
00079  \\\\
00080 Equation \ref{eq:tau0a} returns $tau_0$ given $M, \eta$ and $f_L$, and is defined 
00081 \texttt{XLALInspiralTau0FromMEta}. 
00082 \\\\
00083 Finally, \texttt{XLALInspiralMFromTau0AndNonEqualMass} returns $M$ when $\tau_0$ is known
00084  and a constraint exists on one of the individual mass (e.g., $m_1={\rm mMax}$ or 
00085  $m_1={\rm mMin}$). This functions requires a little more algebra and is used in the
00086 HybridHexagonal placement. The function LALInspiralHybridHexagonal describes this algebra. 
00087 
00088 \vspace{0.1in}
00089 \vfill{\footnotesize\input{LALInspiralBankUtilsCV}}
00090 </lalLaTeX>  */
00091 
00092 #include <stdio.h>
00093 #include <lal/LALStdio.h>
00094 #include <lal/LALConstants.h>
00095 #include <lal/AVFactories.h>
00096 #include <lal/SeqFactories.h>
00097 #include <lal/FindRoot.h>
00098 #include <math.h>
00099 
00100 
00101 NRCSID(LALINSPIRALBANKUTILSC, "$Id: LALInspiralBankUtils.c,v 1.3 2007/06/08 14:41:42 bema Exp $");
00102 
00103 
00104 
00105 /*  <lalVerbatim file="XLALInspiralTau3FromTau0AndEqualMassLineCP"> */
00106 REAL4
00107 XLALInspiralTau3FromTau0AndEqualMassLine(
00108     REAL4               tau0,
00109     REAL4               fL
00110     )
00111 {   /*  </lalVerbatim>  */
00112   REAL4 A0, A3, tau3=0; 
00113   
00114 
00115   A0 = (5.0 / 256.0) * pow(LAL_PI * fL, (-8.0/3.0));
00116   A3  = LAL_PI / (8.0 * pow(LAL_PI * fL, (5.0/3.0)));
00117 
00118   tau3 = 4 * A3 * pow(tau0/4/A0, 2./5.);
00119   
00120   return tau3;
00121 }
00122  
00123  
00124 /*  <lalVerbatim file="XLALInspiralTau3FromNonEqualMassCP"> */
00125 REAL4 
00126 XLALInspiralTau3FromNonEqualMass(
00127     REAL4               M,
00128     REAL4               eta,
00129     REAL4               fL
00130  )
00131 { /*  </lalVerbatim>  */
00132   REAL4 A3; 
00133   REAL4 tau3 = 0;
00134     
00135   A3  = LAL_PI / (8.0 * pow(LAL_PI*fL, (5.0/3.0)));  
00136   tau3 = A3 * pow(M * LAL_MTSUN_SI, -2.0/3.0) / eta;
00137 
00138   return tau3;
00139 }
00140 
00141 /*  <lalVerbatim file="XLALInspiralTau0FromMEtaCP"> */
00142 REAL4 
00143 XLALInspiralTau0FromMEta(
00144     REAL4               M,
00145     REAL4               eta,
00146     REAL4               fL
00147  )
00148 {/*  </lalVerbatim>  */
00149 
00150 /* This function returns tau3, computed from M and eta*/
00151 
00152   REAL4 A0; 
00153   REAL4 tau0 = 0;
00154     
00155   A0 = (5.0 / 256.0) * pow( LAL_PI * fL, (-8.0/3.0));
00156   tau0 = A0 * pow(M*LAL_MTSUN_SI, -5.0/3.0) / eta;
00157 
00158   return tau0;
00159 }
00160 
00161 /*  <lalVerbatim file="XLALInspiralMFromTau0AndNonEqualMassCP"> */
00162 REAL8
00163 XLALInspiralMFromTau0AndNonEqualMass(
00164   REAL8 tau0,
00165   REAL8 extremMass,
00166   REAL8 fL)
00167 {/*  </lalVerbatim>  */
00168   REAL8 result, A0, p, q, x; 
00169    
00170   A0 = (5.0 / 256.0) * pow( LAL_PI * fL, (-8.0/3.0));
00171 
00172   /* from tau0, and M, we can get a poylomial expression where M is the 
00173   unknowm of the form x^3+px+q =0 where x = M^(1/3) and p and q as follows :*/
00174   p = -A0/tau0/extremMass/LAL_MTSUN_SI; 
00175   q = -extremMass * LAL_MTSUN_SI;
00176 
00177   x = pow((-q/2-0.5*sqrt((27*q*q + 4*p*p*p)/27)), 1./3.);
00178   x += pow((-q/2+0.5*sqrt((27*q*q + 4*p*p*p)/27)), 1./3.);
00179   
00180   /* This is a real solution and M is simply */
00181   result = x*x*x/LAL_MTSUN_SI;
00182   
00183   return result;
00184 }

Generated on Sun Sep 7 03:06:54 2008 for LAL by  doxygen 1.5.2