Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralPolarizations.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2008 Evan Ochsner
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/**
21 * \author Ochsner, E.
22 * \file
23 *
24 * \brief This code generates the two GW polarizations of the inspiral waveform for a given phase model.
25 *
26 * ### Prototypes ###
27 *
28 * <tt>LALInspiralHplus()</tt>
29 * <ul>
30 * <li> \c output: Outputs either \f$h_+\f$ or \f$h_\times.\f$</li>
31 * <li> \c params: Input containing binary chirp parameters.</li>
32 * <li> \c phase: Input containing binary chirp phase.</li>
33 * <li> \c v: PN expansion parameter</li>
34 * </ul>
35 *
36 * ### Description ###
37 *
38 *
39 * ### Algorithm ###
40 *
41 *
42 * ### Uses ###
43 *
44 *
45 * ### Notes ###
46 *
47 */
48
49#include <math.h>
50#include <lal/LALStdlib.h>
51#include<lal/LALConstants.h>
52#include<lal/LALInspiral.h>
53/*-------------------------------------*/
54/* Need to add a field ampOrder to the */
55/* InspiralTemplate struct */
56/*-------------------------------------*/
58{
59 REAL8 hPlus = 0.0;
60 REAL8 M = params->totalMass;
61 REAL8 eta = params->eta;
62 REAL8 eta2 = eta*eta;
63 REAL8 dM = fabs(params->mass1 - params->mass2) / params->totalMass;
64 REAL8 cI = cos(params->inclination);
65 REAL8 sI = sin(params->inclination);
66 REAL8 sI2 = sI*sI;
67 REAL8 cI2 = cI*cI;
68 REAL8 cI4 = cI2*cI2;
69 REAL8 cI6 = cI4*cI2;
70 switch( params->ampOrder )
71 {
73 hPlus = hPlus + v * v * v * v * v * ( sI*dM*
74 ( (1771./5120. - cI2*1667./5120. + cI4*217./9216. - cI6/9216.)
75 + eta*(681./256. + cI2*13./768. - cI4*35./768. + cI6/2304.)
76 + eta2*(-3451./9216. + cI2*673./3072. - cI4*5./9216. - cI6/3072.) )
77 *cos(phase) + LAL_PI*( (19./3. + 3.*cI2 - cI4*2./3.)
78 + eta*(-16./3. + cI2*14./3. + 2.*cI4) )*cos(2.*phase)
79 + sI*dM* ( (3537./1024. - cI2*22977./5120. - cI4*15309./5120. + cI6*729./5120.)
80 + eta*(-23829./1280. + cI2*5529./1280. + cI4*7749./1280. - cI6*729./1280.)
81 + eta2*(29127./5120. - cI2*27267./5120. - cI4*1647./5120. + cI6*2187./5120.) )
82 *cos(3.*phase) - (16./3.)*LAL_PI*(1.+cI2)*sI2*(1.-3.*eta)*cos(4.*phase)
83 + sI*dM*( (-108125./9216. + cI2*40625./9216. + cI4*83125./9216. - cI6*15625./9216.)
84 + eta*(8125./256. - cI2*40625./2304. - cI4*48125./2304. + cI6*15625./2304.)
85 + eta2*(-119375./9216. + cI2*40625./3072. + cI4*44375./9216. - cI6*15625./3072.) )
86 *cos(5.*phase) + dM*sI2*sI2*sI*(1.+cI2)*(117649./46080.)*(1. - 4.*eta + 3.*eta2)
87 *cos(7.*phase) + ( (-9./5. + cI2*14./5. + cI4*7./5.)
88 + eta*(32. + cI2*56./5. - cI4*28./5.) )*sin(2.*phase) + sI2*(1.+cI2)
89 *( (56./5. - log(2.)*32./3.) - eta*(1193./30. - 32.*log(2.)) ) *sin(4.*phase) );
90#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
91 __attribute__ ((fallthrough));
92#endif
93 case LAL_PNORDER_TWO:
94 hPlus = hPlus + v * v * v * v * ( (1./120.)*( (22.+396.*cI2 + 145.*cI4 - 5.*cI6)
95 + (5./3.)*eta*(706. - 216.*cI2 - 251.*cI4 + 15.*cI6)
96 - 5.*eta2* (98. - 108.*cI2 + 7.*cI4 + 5.*cI6) )* cos(2.*phase)
97 + (2./15.)*sI2* ( (59. + 35.*cI2 - 8.*cI4) - (5./3.)*eta*(131.+59.*cI2 - 24.*cI4)
98 + 5.*eta2* (21. - 3.*cI2 - 8.*cI4) )*cos(4.*phase)
99 - (81./40.)*(1. - 5.*eta + 5.*eta2)*sI2*sI2*(1.+cI2)* cos(6.*phase)
100 + (sI/40.)*dM* ( (11.+7.*cI2 + 10.*(5. + cI2)*log(2))*sin(phase)
101 - 5.*LAL_PI*(5. + cI2)*cos(phase) - 27.*(7. - 10.*log(3./2.))*(1 + cI2)*sin(3.*phase)
102 + 135.*LAL_PI*(1.+cI2)*cos(3.*phase) ) );
103#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
104 __attribute__ ((fallthrough));
105#endif
107 hPlus = hPlus + v * v * v * ( (sI/192.)* dM*
108 ( ( (57.+60.*cI2 - cI4) - 2.*eta*(49. - 12.*cI2 - cI4) )* cos(phase)
109 - (27./2.)*( (73. + 40.*cI2 - 9.*cI4) - 2.*eta*(25. - 8.*cI2 - 9.*cI4) )
110 *cos(3.*phase) + (625./2.)*(1. - 2.*eta)*sI2*(1+cI2)* cos(5.*phase) )
111 - 2.*LAL_PI* (1.+cI2)*cos(2.*phase) );
112#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
113 __attribute__ ((fallthrough));
114#endif
115 case LAL_PNORDER_ONE:
116 hPlus = hPlus + v * v *( (1./6.)*( (19.+9.*cI2 - 2.*cI4) - eta*(19. - 11.*cI2 - 6.*cI4) )
117 * cos( 2.*phase) - (4./3.)*sI2*(1.+cI2)*(1. - 3*eta)* cos(4.*phase) );
118#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
119 __attribute__ ((fallthrough));
120#endif
121 case LAL_PNORDER_HALF:
122 hPlus = hPlus - v * (sI * dM / 8.) * ( (5. + cI2) * cos(phase) - 9.*(1. + cI2)*cos(3.*phase));
123#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
124 __attribute__ ((fallthrough));
125#endif
127 hPlus = hPlus - (1.+cI2) * cos(2.*phase);
128 break;
129 default: fprintf(stderr, "There are no EOB waveforms at order %d in amplitude\n", params->ampOrder);
130 }
131 return 2.* M * LAL_MTSUN_SI* eta * v * v * hPlus * LAL_C_SI / ( LAL_PC_SI * 1.e6 );
132}
133
135{
136 REAL8 hCross = 0.0;
137 REAL8 M = params->totalMass;
138 REAL8 eta = params->eta;
139 REAL8 eta2 = eta*eta;
140 REAL8 dM = fabs(params->mass1 - params->mass2) / params->totalMass;
141 REAL8 cI = cos(params->inclination);
142 REAL8 sI = sin(params->inclination);
143 REAL8 sI2 = sI*sI;
144 REAL8 cI2 = cI*cI;
145 REAL8 cI4 = cI2*cI2;
146
147 switch( params->ampOrder )
148 {
150 hCross = hCross + v * v * v * v * v * ( cI*( (2. - cI2*22./5.) + eta*(-282./5. + cI2*94./5.) )
151 *cos(2.*phase) + cI*sI2*( (-112./5. + log(2.)*64./3.) + eta*(1193./15. - 64.*log(2.)) )
152 *cos(4.*phase) + sI*cI*dM*( (-913./7680. + cI2*1891./11520. - cI4*7./4608.)
153 + eta*(1165./384. - cI2*235./576. + cI4*7./1152.)
154 + eta2*(-1301./4608. + cI2*301./2304. - cI4*7./1536.) )*sin(phase)
155 + cI*LAL_PI*( (34./3. - cI2*8./3.) - eta*(20./3. - 8.*cI2) )*sin(2.*phase)
156 + sI*cI*dM*( (12501./2560. - cI2*12069./1280. + cI4*1701./2560.)
157 + eta*(-19581./640. + cI2*7821./320. - cI4*1701./640.)
158 + eta2*(18903./2560. - cI2*11403./1280. + cI4*5103./2560.) )*sin(3.*phase)
159 - sI2*cI*LAL_PI*(32./3.)*(1. - 3.*eta)*sin(4.*phase)
160 + sI*cI*dM*( (-101875./4608. + cI2*6875./256. - cI4*21875./4608.)
161 + eta*(66875./1152. - cI2*44375./576. + cI4*21875./1152.)
162 + eta2*(-100625./4608. + cI2*83125./2304. - cI4*21875./1536.) )*sin(5.*phase)
163 + sI2*sI2*sI*cI*dM*(117649./23040.)*(1. - 4.*eta + 3.*eta2)*sin(7.*phase) );
164#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
165 __attribute__ ((fallthrough));
166#endif
167 case LAL_PNORDER_TWO:
168 hCross = hCross + v * v * v * v * ( (cI/60.)*( (68. + 226.*cI2 - 15.*cI4)
169 + (5./3.)*eta*(572. - 490.*cI2 + 45.*cI4)
170 - 5.*eta2*(56. - 70.*cI2 + 15.*cI4) )*sin(2.*phase)
171 + (4./15.)*cI*sI2*( (55. - 12.*cI2) - (5./3.)*eta*(119. - 36.*cI2)
172 + 5.*eta2*(17. - 12.*cI2) )*sin(4.*phase)
173 - (81./20.)*(1. - 5.*eta + 5.*eta2)*cI*sI2*sI2* sin(6.*phase)
174 - (3./20.)*sI*cI*dM* ( (3.+10.*log(2))*cos(phase) + 5.*LAL_PI*sin(phase)
175 - 9.*(7. - 10.*log(3./2.))*cos(3.*phase) - 45.*LAL_PI*sin(3.*phase) ) );
176#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
177 __attribute__ ((fallthrough));
178#endif
180 hCross = hCross + v * v * v * ( (sI*cI/96.)*dM* ( ( (63. - 5.*cI2) - 2.*eta*(23. - 5.*cI2) )
181 *sin(phase) - (27./2.)*( (67. - 15.*cI2) - 2.*eta*(19. - 15.*cI2) )*sin(3.*phase)
182 + (625./2.)*(1. - 2.*eta)*sI2*sin(5.*phase) ) - 4.*LAL_PI*cI* sin(2.*phase) ) ;
183#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
184 __attribute__ ((fallthrough));
185#endif
186 case LAL_PNORDER_ONE:
187 hCross = hCross + v * v * ( (cI/3.)*( (17. - 4.*cI2) - eta* (13. - 12.*cI2) )
188 *sin(2.*phase) - (8./3.)*(1. - 3.*eta)*cI*sI2*sin(4.*phase) );
189#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
190 __attribute__ ((fallthrough));
191#endif
192 case LAL_PNORDER_HALF:
193 hCross = hCross - v * (3./4.)*sI*cI*dM* ( sin(phase) - 3.* sin(3.*phase) );
194#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
195 __attribute__ ((fallthrough));
196#endif
198 hCross = hCross - 2.* cI * sin(2.*phase);
199 break;
200 default: fprintf(stderr, "There are no EOB waveforms at order %d in amplitude\n", params->ampOrder);
201 }
202 return 2.* M * LAL_MTSUN_SI * eta * v * v * hCross * LAL_C_SI/ ( LAL_PC_SI * 1.e6 );
203
204}
REAL4 LALInspiralHCrossPolarization(REAL8 phase, REAL8 v, InspiralTemplate *params)
REAL4 LALInspiralHPlusPolarization(REAL8 phase, REAL8 v, InspiralTemplate *params)
#define fprintf
#define __attribute__(x)
#define LAL_C_SI
#define LAL_PI
#define LAL_MTSUN_SI
#define LAL_PC_SI
double REAL8
float REAL4
LAL_PNORDER_TWO_POINT_FIVE
LAL_PNORDER_TWO
LAL_PNORDER_ONE
LAL_PNORDER_HALF
LAL_PNORDER_ONE_POINT_FIVE
LAL_PNORDER_NEWTONIAN
M
The inspiral waveform parameter structure containing information about the waveform to be generated.
Definition: LALInspiral.h:205
double inclination