LALInspiralPolarizations.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2008 Evan Ochsner
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="LALInspiralPolarizationsCV">
00021 
00022 Author: Ochsner, E.
00023 $Id: LALInspiralPolarizations.c,v 1.2 2008/02/28 10:22:18 sathya Exp $
00024 </lalVerbatim>  */
00025 
00026 /*  <lalLaTeX>
00027 
00028 \subsection{Module \texttt{LALInspiralPolarizations.c} and \texttt{LALInspiralPolarizationsTemplates.c}}
00029 This code generates the two GW polarizations of the inspiral waveform for a given phase model.
00030 
00031 
00032 \subsubsection*{Prototypes}
00033 \vspace{0.1in}
00034 \input{LALInspiralPolarizationsCP}
00035 \index{\verb&LALInspiralHplus()&}
00036 \begin{itemize}
00037 \item {\tt output:} Outputs either $h_+$ or $h_\times.$
00038 \item {\tt params:} Input containing binary chirp parameters.
00039 \item {\tt phase:} Input containing binary chirp phase.
00040 \item {\tt v:} PN expansion parameter
00041 \end{itemize}
00042 
00043 \subsubsection*{Description}
00044 
00045 \subsubsection*{Algorithm}
00046 
00047 \subsubsection*{Uses}
00048 
00049 \subsubsection*{Notes}
00050 
00051 \vfill{\footnotesize\input{LALInspiralPolarizationsCV}}
00052 
00053 </lalLaTeX>  */
00054 
00055 #include <lal/LALStdlib.h>
00056 #include<lal/LALConstants.h>
00057 #include<lal/LALInspiral.h>
00058 /*-------------------------------------*/
00059 /* Need to add a field ampOrder to the */
00060 /*       InspiralTemplate struct       */
00061 /*-------------------------------------*/
00062 REAL4 LALInspiralHPlusPolarization( REAL8 phase, REAL8 v, InspiralTemplate *params )
00063 {
00064         REAL8 hPlus = 0.0;
00065         REAL8 M = params->totalMass;
00066         REAL8 eta = params->eta;
00067         REAL8 eta2 = eta*eta;
00068         REAL8 dM = abs(params->mass1 - params->mass2) / params->totalMass;
00069         REAL8 cI = cos(params->inclination);
00070         REAL8 sI = sin(params->inclination);
00071         REAL8 sI2 = sI*sI;
00072         REAL8 cI2 = cI*cI;
00073         REAL8 cI4 = cI2*cI2;
00074         REAL8 cI6 = cI4*cI2;
00075         switch( params->ampOrder )
00076         {
00077                 case twoPointFivePN:
00078                 hPlus = hPlus + v * v * v * v * v * ( sI*dM* 
00079                         ( (1771./5120. - cI2*1667./5120. + cI4*217./9216. - cI6/9216.) 
00080                         + eta*(681./256. + cI2*13./768. - cI4*35./768. + cI6/2304.) 
00081                         + eta2*(-3451./9216. + cI2*673./3072. - cI4*5./9216. - cI6/3072.) )
00082                         *cos(phase) + LAL_PI*( (19./3. + 3.*cI2 - cI4*2./3.) 
00083                         + eta*(-16./3. + cI2*14./3. + 2.*cI4) )*cos(2.*phase) 
00084                         + sI*dM* ( (3537./1024. - cI2*22977./5120. - cI4*15309./5120. + cI6*729./5120.) 
00085                         + eta*(-23829./1280. + cI2*5529./1280. + cI4*7749./1280. - cI6*729./1280.) 
00086                         + eta2*(29127./5120. - cI2*27267./5120. - cI4*1647./5120. + cI6*2187./5120.) )
00087                         *cos(3.*phase) - (16./3.)*LAL_PI*(1.+cI2)*sI2*(1.-3.*eta)*cos(4.*phase) 
00088                         + sI*dM*( (-108125./9216. + cI2*40625./9216. + cI4*83125./9216. - cI6*15625./9216.) 
00089                         + eta*(8125./256. - cI2*40625./2304. - cI4*48125./2304. + cI6*15625./2304.) 
00090                         + eta2*(-119375./9216. + cI2*40625./3072. + cI4*44375./9216. - cI6*15625./3072.) )
00091                         *cos(5.*phase) + dM*sI2*sI2*sI*(1.+cI2)*(117649./46080.)*(1. - 4.*eta + 3.*eta2)
00092                         *cos(7.*phase) + ( (-9./5. + cI2*14./5. + cI4*7./5.) 
00093                         + eta*(32. + cI2*56./5. - cI4*28./5.) )*sin(2.*phase) + sI2*(1.+cI2)
00094                         *( (56./5. - log(2.)*32./3.) - eta*(1193./30. - 32.*log(2.)) ) *sin(4.*phase)  );
00095                 case twoPN:
00096                 hPlus = hPlus + v * v * v * v * (  (1./120.)*( (22.+396.*cI2 + 145.*cI4 - 5.*cI6) 
00097                         + (5./3.)*eta*(706. - 216.*cI2 - 251.*cI4 + 15.*cI6) 
00098                         - 5.*eta2* (98. - 108.*cI2 + 7.*cI4 + 5.*cI6) )* cos(2.*phase) 
00099                         + (2./15.)*sI2* ( (59. + 35.*cI2 - 8.*cI4) - (5./3.)*eta*(131.+59.*cI2 - 24.*cI4) 
00100                         + 5.*eta2* (21. - 3.*cI2 - 8.*cI4) )*cos(4.*phase) 
00101                         - (81./40.)*(1. - 5.*eta + 5.*eta2)*sI2*sI2*(1.+cI2)* cos(6.*phase) 
00102                         + (sI/40.)*dM* ( (11.+7.*cI2 + 10.*(5. + cI2)*log(2))*sin(phase) 
00103                         - 5.*LAL_PI*(5. + cI2)*cos(phase) - 27.*(7. - 10.*log(3./2.))*(1 + cI2)*sin(3.*phase) 
00104                         + 135.*LAL_PI*(1.+cI2)*cos(3.*phase) )  );
00105                 case onePointFivePN:
00106                 hPlus = hPlus + v * v * v * (  (sI/192.)* dM*
00107                         (  ( (57.+60.*cI2 - cI4) - 2.*eta*(49. - 12.*cI2 - cI4) )* cos(phase) 
00108                         - (27./2.)*( (73. + 40.*cI2 - 9.*cI4) - 2.*eta*(25. - 8.*cI2 - 9.*cI4) )
00109                         *cos(3.*phase) + (625./2.)*(1. - 2.*eta)*sI2*(1+cI2)* cos(5.*phase)  ) 
00110                         - 2.*LAL_PI* (1.+cI2)*cos(2.*phase)  );
00111                 case onePN:
00112                 hPlus = hPlus + v * v *(   (1./6.)*( (19.+9.*cI2 - 2.*cI4) - eta*(19. - 11.*cI2 - 6.*cI4) )
00113                         * cos( 2.*phase) - (4./3.)*sI2*(1.+cI2)*(1. - 3*eta)* cos(4.*phase)  );
00114                 case oneHalfPN:
00115                 hPlus = hPlus - v * (sI * dM / 8.) * ( (5. + cI2) * cos(phase) - 9.*(1. + cI2)*cos(3.*phase));
00116                 case newtonian:
00117                 hPlus = hPlus - (1.+cI2) * cos(2.*phase);
00118                 break;
00119                 default: fprintf(stderr, "There are no EOB waveforms at order %d in amplitude\n", params->ampOrder);
00120         }
00121         return 2.* M * LAL_MTSUN_SI* eta * v * v * hPlus * LAL_C_SI / ( LAL_PC_SI * 1.e6 );
00122 }
00123 
00124 REAL4 LALInspiralHCrossPolarization( REAL8 phase, REAL8 v, InspiralTemplate *params )
00125 {
00126         REAL8 hCross = 0.0;
00127         REAL8 M = params->totalMass;
00128         REAL8 eta = params->eta;
00129         REAL8 eta2 = eta*eta;
00130         REAL8 dM = abs(params->mass1 - params->mass2) / params->totalMass;
00131         REAL8 cI = cos(params->inclination);
00132         REAL8 sI = sin(params->inclination);
00133         REAL8 sI2 = sI*sI;
00134         REAL8 cI2 = cI*cI;
00135         REAL8 cI4 = cI2*cI2;
00136 
00137         switch( params->ampOrder )
00138         {
00139                 case twoPointFivePN:
00140                 hCross = hCross + v * v * v * v * v * ( cI*( (2. - cI2*22./5.) + eta*(-282./5. + cI2*94./5.) )
00141                          *cos(2.*phase) + cI*sI2*( (-112./5. + log(2.)*64./3.) + eta*(1193./15. - 64.*log(2.)) )
00142                          *cos(4.*phase) + sI*cI*dM*( (-913./7680. + cI2*1891./11520. - cI4*7./4608.) 
00143                          + eta*(1165./384. - cI2*235./576. + cI4*7./1152.) 
00144                          + eta2*(-1301./4608. + cI2*301./2304. - cI4*7./1536.) )*sin(phase) 
00145                          + cI*LAL_PI*( (34./3. - cI2*8./3.) - eta*(20./3. - 8.*cI2) )*sin(2.*phase) 
00146                          + sI*cI*dM*( (12501./2560. - cI2*12069./1280. + cI4*1701./2560.) 
00147                          + eta*(-19581./640. + cI2*7821./320. - cI4*1701./640.) 
00148                          + eta2*(18903./2560. - cI2*11403./1280. + cI4*5103./2560.) )*sin(3.*phase) 
00149                          - sI2*cI*LAL_PI*(32./3.)*(1. - 3.*eta)*sin(4.*phase) 
00150                          + sI*cI*dM*( (-101875./4608. + cI2*6875./256. - cI4*21875./4608.) 
00151                          + eta*(66875./1152. - cI2*44375./576. + cI4*21875./1152.) 
00152                          + eta2*(-100625./4608. + cI2*83125./2304. - cI4*21875./1536.) )*sin(5.*phase) 
00153                          + sI2*sI2*sI*cI*dM*(117649./23040.)*(1. - 4.*eta + 3.*eta2)*sin(7.*phase)  );
00154                 case twoPN:
00155                   hCross = hCross + v * v * v * v * (  (cI/60.)*( (68. + 226.*cI2 - 15.*cI4) 
00156                            + (5./3.)*eta*(572. - 490.*cI2 + 45.*cI4) 
00157                            - 5.*eta2*(56. - 70.*cI2 + 15.*cI4) )*sin(2.*phase) 
00158                            + (4./15.)*cI*sI2*( (55. - 12.*cI2) - (5./3.)*eta*(119. - 36.*cI2) 
00159                            + 5.*eta2*(17. - 12.*cI2) )*sin(4.*phase) 
00160                            - (81./20.)*(1. - 5.*eta + 5.*eta2)*cI*sI2*sI2* sin(6.*phase) 
00161                            - (3./20.)*sI*cI*dM* ( (3.+10.*log(2))*cos(phase) + 5.*LAL_PI*sin(phase) 
00162                            - 9.*(7. - 10.*log(3./2.))*cos(3.*phase) - 45.*LAL_PI*sin(3.*phase) )  );
00163                 case onePointFivePN:
00164                   hCross = hCross + v * v * v * (  (sI*cI/96.)*dM* ( ( (63. - 5.*cI2) - 2.*eta*(23. - 5.*cI2)  )
00165                            *sin(phase) - (27./2.)*(  (67. - 15.*cI2) - 2.*eta*(19. - 15.*cI2)  )*sin(3.*phase) 
00166                            + (625./2.)*(1. - 2.*eta)*sI2*sin(5.*phase)  ) - 4.*LAL_PI*cI* sin(2.*phase) ) ;
00167                 case onePN:
00168                   hCross = hCross + v * v * (  (cI/3.)*( (17. - 4.*cI2) - eta* (13. - 12.*cI2) )
00169                            *sin(2.*phase) - (8./3.)*(1. - 3.*eta)*cI*sI2*sin(4.*phase)  );
00170                 case oneHalfPN:
00171                 hCross = hCross - v * (3./4.)*sI*cI*dM* ( sin(phase) - 3.* sin(3.*phase) );
00172                 case newtonian:
00173                 hCross = hCross - 2.* cI * sin(2.*phase);
00174                 break;
00175                 default:  fprintf(stderr, "There are no EOB waveforms at order %d in amplitude\n", params->ampOrder);
00176         }
00177         return 2.* M * LAL_MTSUN_SI * eta * v * v * hCross * LAL_C_SI/ ( LAL_PC_SI * 1.e6 );
00178 
00179 }

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