LALInspiral 5.0.3.1-eeff03c
GenerateInspRing.c
Go to the documentation of this file.
1/* * Copyright (C) 2007 Bernd Machenschalk, Stephen Fairhurst
2*
3* This program is free software; you can redistribute it and/or modify
4* it under the terms of the GNU General Public License as published by
5* the Free Software Foundation; either version 2 of the License, or
6* (at your option) any later version.
7*
8* This program is distributed in the hope that it will be useful,
9* but WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with with program; see the file COPYING. If not, write to the
15* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16* MA 02110-1301 USA
17*/
18
19#include <stdlib.h>
20#include <math.h>
21#include <stdio.h>
22#include <stdlib.h>
23#include <string.h>
24#include <lal/Date.h>
25#include <lal/DetResponse.h>
26#include <lal/LALStdlib.h>
27#include <lal/LALConstants.h>
28#include <lal/AVFactories.h>
29#include <lal/SeqFactories.h>
30#include <lal/LIGOMetadataTables.h>
31#include <lal/LIGOMetadataInspiralUtils.h>
32#include <lal/LIGOMetadataRingdownUtils.h>
33#include <lal/Units.h>
34#include <lal/SimulateCoherentGW.h>
35#include <lal/RingUtils.h>
36#include <lal/TimeDelay.h>
37#include <lal/TimeSeries.h>
38#include <lal/GenerateInspRing.h>
39
40static SimRingdownTable*
42 SimRingdownTable *ringInj
43 );
44
45/**
46 * Takes an inspiral waveform, and a simInspiralTable and generates a ringdown
47 * at an appropriate frequency and quality
48 */
51 CoherentGW *waveform, /**< the inspiral waveform */
52 SimInspiralTable *inspiralInj, /**< details of the inspiral */
53 SimRingdownTable *ringInj, /**< ringdown details to be populated */
54 int injectSignalType /**< type of injection */
55 )
56{
57 REAL4 *a, *f; /* pointers to generated amplitude and frequency data */
58 REAL4 *shift = NULL; /* pointers to generated shift (polarization) data */
59 REAL8 *phi; /* pointer to generated phase data */
60
61 /* length of the waveform */
62 INT4 inputLength;
63 INT4 outputLength;
64 INT4 mergerLength;
65 INT4 ringLength;
66 INT4 endMerger = 0;
67 INT4 condt;
68
69 /* waveform parameters */
70 REAL8 phase;
71 REAL8 mergerPhase;
72 REAL8 phi0;
73 REAL4 dt;
74 REAL4 ampPlus;
75 REAL4 ampPlusDot;
76 REAL4 a2Plus;
77 REAL4 ampCross;
78 REAL4 ampCrossDot;
79 REAL4 a2Cross;
80 REAL4 freq;
81 REAL4 freqDot;
82 REAL4 freq0;
83 REAL4 freqDot0;
84 REAL4 polarization = 0;
85 REAL4 polDot = 0;
86 REAL4 dampFac;
87 REAL4 phaseFac;
88 REAL4 A, lambda;
89 REAL4 tToRing;
90 REAL4 tRing;
91 REAL4 amp;
92 INT4 n, N;
93
94 /* ringdown details */
95 REAL4 mTot = 0;
96 REAL4 orbAngMom, totalAngMom;
97 REAL4 Jx, Jy, Jz;
98
99 /*REAL4 splus, scross, cosiotaA, cosiotaB;*/
100 REAL4 cosiota;
101
102 /*
103 *
104 * Work out where the inspiral ended
105 *
106 */
107
108 /* check that the inspiral waveform exists */
109 if ( !waveform || !(waveform->a->data) || !(waveform->f->data) ||
110 !(waveform->phi->data) )
111 {
112 XLALPrintError("Invalid waveform passed as input to %s\n", __func__);
114 }
115
116 if ( (waveform->a->data->length < 2) )
117 {
119 "Length of waveform input to %s must be at least 2 points\n", __func__);
121 }
122
123 if ( !inspiralInj )
124 {
125 XLALPrintError("No sim inspiral table passed as input to %s\n", __func__);
127 }
128
129 /* read in the number of points already present */
130 inputLength = waveform->a->data->length;
131
132 /* record the final frequency, amplitude and phase */
133 dt = waveform->f->deltaT;
134
135 ampPlus = waveform->a->data->data[2*inputLength - 2];
136 ampPlusDot = ampPlus - waveform->a->data->data[2*inputLength - 4];
137
138 ampCross = waveform->a->data->data[2*inputLength - 1];
139 ampCrossDot = ampCross - waveform->a->data->data[2*inputLength - 3];
140
141 freq0 = waveform->f->data->data[inputLength - 1];
142 freqDot0 = freq0 - waveform->f->data->data[inputLength - 2];
143 freqDot0 /= dt;
144
145 phase = waveform->phi->data->data[inputLength - 1];
146
147
148 if ( waveform->shift )
149 {
150 polarization = waveform->shift->data->data[inputLength - 1];
151 polDot = polarization - waveform->shift->data->data[inputLength - 2];
152 }
153
155 "Final inspiral frequency = %.2f Hz, fdot = %.2e Hz/s\n"
156 "\n", freq0, freqDot0);
157
158 /*
159 *
160 * Work out where we want the ringdown to start
161 *
162 */
163
164
165
166 /* estimate the final angular momentum */
167 orbAngMom = 4 * inspiralInj->eta * 0.7;
168 mTot = inspiralInj->mass1 + inspiralInj->mass2;
169
170 Jx = orbAngMom * sin(inspiralInj->inclination) +
171 (inspiralInj->spin1x * inspiralInj->mass1 * inspiralInj->mass1 +
172 inspiralInj->spin2x * inspiralInj->mass2 * inspiralInj->mass2) /
173 (mTot * mTot) ;
174 Jy = (inspiralInj->spin1y * inspiralInj->mass1 * inspiralInj->mass1 +
175 inspiralInj->spin2y * inspiralInj->mass2 * inspiralInj->mass2) /
176 (mTot * mTot) ;
177 Jz = orbAngMom * cos(inspiralInj->inclination) +
178 (inspiralInj->spin1z * inspiralInj->mass1 * inspiralInj->mass1 +
179 inspiralInj->spin2z * inspiralInj->mass2 * inspiralInj->mass2) /
180 (mTot * mTot);
181 totalAngMom = pow(Jx * Jx + Jy * Jy + Jz * Jz, 0.5);
182
183 XLALPrintInfo( "Approximate orbital ang mom = %.2f\n", orbAngMom);
184 XLALPrintInfo( "Approximate total angular momentum of inspiral:\n"
185 "Jx = %.2f, Jy = %.2f, Jz = %.2f\n", Jx, Jy, Jz);
186 XLALPrintInfo( "Estimated Final Spin = %.2f\n", totalAngMom );
187
188 /* estimate the final mass */
189 XLALPrintInfo( "Total inspiral mass = %.2f\n", mTot );
190 mTot *= (1 - 0.01 * (1.0 + 6.0 * totalAngMom * totalAngMom ) );
191 ringInj->mass = mTot;
192 XLALPrintInfo( "Estimated Final Mass = %.2f\n", ringInj->mass );
193
194 /* populate the ring params */
195 ringInj->spin = totalAngMom < 0.99 ? totalAngMom : 0.95;
196
197 ringInj->frequency = pow( LAL_C_SI, 3) / LAL_G_SI / LAL_MSUN_SI / 2.0 /
198 LAL_PI * ( 1.0 - 0.63 * pow( ( 1.0 - ringInj->spin ), 0.3 ) ) /
199 ringInj->mass;
200 ringInj->quality = 2.0 * pow( ( 1.0 - ringInj->spin ), -0.45 );
201
203 "Estimated Ringdown Frequency = %.2f Hz, and Quality = %.2f\n"
204 "\n", ringInj->frequency, ringInj->quality );
205
206 ringInj->longitude = inspiralInj->longitude;
207 ringInj->latitude = inspiralInj->latitude;
208 ringInj->distance = inspiralInj->distance;
209
211 "Ringdown longitude = %.2f, latitude = %.2f, distance = %.2f\n",
212 ringInj->longitude, ringInj->latitude, ringInj->distance );
213
214
215 /*
216 *
217 * Work out the length of the full signal
218 *
219 */
220
221 /* We use a very simple model to extend the frequency of the waveform.
222 * This is done in two parts:
223 *
224 * 1) Continue the frequency by assuming that fdot is proportional f^(11/3)
225 *
226 * using this, we obtain the frequency and phase at any later time
227 * given f, fdot at t=0 as:
228 *
229 * f(t) = f(0) * ( 1 - (8 fdot(0) t / 3 f(0) ) )^(-3/8)
230 *
231 * phi(t) = phi0 - (2 pi) * 3/5 * f(0)^2 / fdot(0) *
232 * (1 - (8 fdot(0) t / 3 f(0) ) )^(5/8)
233 *
234 * where phi0 = phi(0) + ( 2 pi ) * ( 3 f(0)^2 / 5 fdot(0) )
235 *
236 *
237 * 2) At the point before the ring frequency would be exceeded,
238 * exponentially approach the ring frequency.
239 * -- The exponential decay is determined by matching the derivative
240 */
241
242 /* calculate the number of points to reach 0.9 * ringdown frequency */
243 tToRing = 3 * freq0 / ( 8 * freqDot0 ) *
244 (1 - pow( freq0 / (0.9 * ringInj->frequency), 8.0/3.0) );
245 mergerLength = ceil( tToRing / dt ) - 1;
246 phi0 = phase + LAL_TWOPI * 3 * freq0 * freq0 / (5 * freqDot0);
247
248 mergerPhase = phi0 - phase
249 - ( LAL_TWOPI) * (3.0 * freq0 * freq0 ) / ( 5.0 * freqDot0 ) *
250 pow( 1 - ( 8.0 * freqDot0 * tToRing) / ( 3.0 * freq0 ) , 5.0/8.0 );
251
252
253 XLALPrintInfo( "Adding by hand a merger and ringdown\n");
254 XLALPrintInfo( "Time to reach 0.9 of ringdown frequency = %.4f seconds,\n"
255 "%d data points, %.2f radians in GW phase\n"
256 "We then add the same length to asymptote to ringdown values\n",
257 tToRing, mergerLength, mergerPhase);
258
259 if ( mergerPhase > 200 * LAL_TWOPI )
260 {
261 XLALPrintError("Failed to add a decent merger and ringdown\n"
262 "The merger had a length of %.2f radians in GW phase (only allow 400 pi)\n"
263 "Returning null from %s\n",
264 mergerPhase, __func__);
265 XLALFree( waveform->a );
266 XLALFree( waveform->phi );
267 XLALFree( waveform->f );
268 XLALFree( waveform->shift );
270 }
271
272
273 /* calculate number of additional points necessary to damp by exp(12). */
274 phaseFac = LAL_TWOPI * ringInj->frequency * dt;
275 dampFac = exp( - phaseFac / (2 * ringInj->quality));
276
277 ringLength = ceil((24 * ringInj->quality)/( phaseFac));
278 tRing = ringLength * dt;
279
280 XLALPrintInfo( "Time to damp the ringdown by exp(12) = %.4f seconds,\n"
281 "%d data points, %.2f radians in GW phase\n"
282 "\n", tRing, ringLength, ringLength * phaseFac);
283
284 /* Total extra length is merger length + ringdown length + some length over
285 * which we smooth the merger to the ring */
286
287 outputLength = inputLength + 2 * mergerLength - 1 + ringLength;
288
289
290
291
292 /*
293 *
294 * extend the data structures
295 *
296 */
297
298 waveform->a->data->length = outputLength;
299 waveform->a->data->data = (REAL4 *) XLALRealloc( ( waveform->a->data->data ),
300 2*outputLength*sizeof(REAL4) );
301 if ( !waveform->a->data->data )
302 {
303 XLALFree( waveform->a);
305 }
306
307 memset(waveform->a->data->data + 2 * inputLength, 0,
308 2 * (outputLength - inputLength) * sizeof(REAL4) );
309 XLALResizeREAL8TimeSeries( waveform->phi, 0, outputLength);
310 if ( !waveform->phi->data )
311 {
312 XLALFree( waveform->a);
313 XLALFree( waveform->phi);
315 }
316
317 XLALResizeREAL4TimeSeries( waveform->f, 0, outputLength);
318 if ( !waveform->f->data->data )
319 {
320 XLALFree( waveform->a );
321 XLALFree( waveform->phi );
322 XLALFree( waveform->f );
324 }
325
326 if ( waveform->shift )
327 {
328 XLALResizeREAL4TimeSeries( waveform->shift, 0, outputLength);
329 if ( !waveform->f->data->data )
330 {
331 XLALFree( waveform->a );
332 XLALFree( waveform->phi );
333 XLALFree( waveform->f );
334 XLALFree( waveform->shift );
336 }
337 }
338
339 a = &(waveform->a->data->data[2*inputLength]);
340 phi = &(waveform->phi->data->data[inputLength]);
341 f = &(waveform->f->data->data[inputLength]);
342
343 if ( waveform->shift )
344 {
345 shift = &(waveform->shift->data->data[inputLength]);
346 }
347
348 /*
349 *
350 * generate frequency, phase and shift (if needed) for merger and ringdown
351 *
352 */
353
354 freq = freq0;
355
356 /* run frequency close to ring frequency */
357 for ( n = 1; n < mergerLength + 1; n++ )
358 {
359 REAL4 factor = 1 - (8.0 * freqDot0 * n * dt) / (3.0 * freq0 );
360 freq = *(f++) = freq0 * pow( factor , -3.0/8.0 );
361 phase = *(phi++) = phi0 -
362 LAL_TWOPI * 3.0 * freq0 * freq0 / (5.0 * freqDot0) *
363 pow( factor , 5.0/8.0);
364 if ( shift )
365 {
366 polarization = *(shift++) = polarization + polDot;
367 }
368 }
369
370 /* populate ringdown phase */
371 ringInj->phase = phase;
372
373 /* converge to ring frequency and constant polarization */
374 /* fit to freq = f_ring - A * exp( - lambda * t )
375 * then A = f_ring - freq
376 * A * lambda = freqDot
377 */
378 freqDot = (freq - *(f - 2)) / dt;
379 A = ringInj->frequency - freq;
380 lambda = freqDot / A;
381
383 "Starting to asymptote to ringdown\n"
384 "Final 'merger' frequency = %.2f Hz, fdot = %.2e Hz/s\n",
385 freq, freqDot);
387 "Frequency evolution fitted to freq = f_ring - A exp(-lambda t)\n"
388 "A = %.2f, lambda = %.2e\n"
389 "\n", A, lambda);
390
391 condt = 0;
392 for ( n = 1; n < mergerLength + ringLength; n++ )
393 {
394 phase = *(phi++) = phase + LAL_TWOPI * freq * dt;
395 freq = *(f++) = ringInj->frequency - A * exp( - n * dt * lambda );
396 if ( (freq == ringInj->frequency) && (condt == 0))
397 {
398 endMerger = n - 1.0;
399 condt = 1.0;
400 }
401 if ( shift )
402 {
403 polDot *= exp( - lambda * dt);
404 polarization = *(shift++) = polarization + polDot;
405 }
406 }
407
408 /* ringdown start time */
409 {
410 REAL8 tRing2;
411 tRing2 = XLALGPSGetREAL8(&(inspiralInj->geocent_end_time));
412 tRing2 += ( mergerLength + endMerger + 1.0) * dt;
413 XLALGPSSetREAL8( &(ringInj->geocent_start_time), tRing2 );
414 }
416 "Ringdown start time = %d.%d\n", ringInj->geocent_start_time.gpsSeconds,
418
419 /* ringdown polarization */
420 ringInj->polarization = polarization;
421
422
423 /*
424 *
425 * set amplitude for merger and ringdown
426 *
427 */
428
429 /* From end of inspiral to start of ringdown, we fit the amplitudes with
430 * a quadratic. The three pieces of data we need to fit are:
431 * 1) The initial amplitude
432 * 2) The initial amplitude derivative
433 * 3) The ringdown amplitude derivative / amplitude = 1 - dampFac
434 *
435 * so, if A(n) = a_0 + a_1 * n + a_2 * n^2,
436 *
437 * a_0 = amp
438 * a_1 = ampDot
439 *
440 * a_1 + 2 * N * a_2
441 * -------------------------- = (dampFac - 1)
442 * a_0 + N * a_1 + N^2 * a_2
443 *
444 * (dampFac - 1) (a_0 + N * a_1) - a_1
445 * a_2 = ----------------------------
446 * (1 - dampFac) * N^2 + 2 * N
447 */
448
449 /* the number of points */
450 N = 2 * mergerLength;
451
452 a2Plus = ((dampFac - 1) * ( ampPlus + N * ampPlusDot ) - ampPlusDot) /
453 ( 2*N - N*N*(dampFac - 1) );
454 a2Cross = ((dampFac - 1) * ( ampCross + N * ampCrossDot ) - ampCrossDot) /
455 ( 2*N - N*N*(dampFac - 1) );
456
457 XLALPrintInfo( "Fitting amplitude evolution to a quadratic\n"
458 "A = a_0 + a_1 * t + a_2 * t^2\n"
459 "For plus polarization, a_0 = %.2e, a_1 = %.2e, a_2 = %.2e\n"
460 "For cross polarization, a_0 = %.2e, a_1 = %.2e, a_2 = %.2e\n"
461 "\n", ampPlus, ampPlusDot / dt, a2Plus / (dt * dt),
462 ampCross, ampCrossDot / dt, a2Cross / (dt * dt) );
463
464 /* quadratic part */
465 for ( n = 1; n < N; n++ )
466 {
467 *(a++) = ampPlus + ampPlusDot * n + a2Plus * n * n;
468 *(a++) = ampCross + ampCrossDot * n + a2Cross * n * n;
469 }
470
471 /* set the final amplitudes */
472 ampPlus = *(a - 2);
473 ampCross = *(a - 1);
474
475 for ( n = 0; n < ringLength; n++ )
476 {
477 ampPlus = *(a++) = ampPlus * dampFac;
478 ampCross = *(a++) = ampCross * dampFac;
479 }
480
481 /* h0 */
482 n = 2.0*(inputLength + mergerLength + endMerger );
483 ampPlus = waveform->a->data->data[n];
484 n = 2.0*(inputLength + mergerLength + endMerger ) + 1.0;
485 ampCross = waveform->a->data->data[n];
486 /* FIXME This calculation leads to nans and thus failures is there a typo?
487 cosiotaA = ampPlus / ampCross *
488 (1.0 + sqrt(1-ampCross*ampCross/ampPlus/ampPlus));
489 cosiotaB = ampPlus / ampCross *
490 (1.0 - sqrt(1-ampCross*ampCross/ampPlus/ampPlus));
491
492 if ( cosiotaA > -1.0 && cosiotaA < 1.0)
493 cosiota = cosiotaA;
494 else if ( cosiotaB > -1.0 && cosiotaB < 1.0)
495 cosiota = cosiotaB;
496 else
497 {
498 XLALPrintError("inclination angle out of range\n");
499 XLALFree( waveform->a );
500 XLALFree( waveform->phi );
501 XLALFree( waveform->f );
502 XLALFree( waveform->shift );
503 XLAL_ERROR_NULL(XLAL_EFAILED);
504 }
505 */
506 /* ringdown inclination and amplitude */
507 /*ringInj->inclination = acos( cosiota );*/
508 /* Since the inclination angle doens't seem to be reliably calculated by
509 the above calculation I am setting it to zero */
510 cosiota = 0.0;
511 ringInj->inclination = 0.0;
512 amp = ampPlus / ( 1.0 + cosiota * cosiota );
513 ringInj->amplitude = sqrt( amp*amp);
514
515 /* zero out inspiral and merger if we only want to inject a ringdown*/
516 if ( injectSignalType == LALRINGDOWN_IMR_RING_INJECT ||
517 strstr(inspiralInj->waveform, "KludgeRingOnly") )
518 {
519 for ( n = 0; n < 2.0*(inputLength + mergerLength + endMerger ); n++ )
520 {
521 waveform->a->data->data[n]= 0;
522 }
523 }
524 ringInj = XLALDeriveRingdownParameters(ringInj);
525
526 return( waveform );
527}
528
529static SimRingdownTable*
531 SimRingdownTable *ringInj /**< ringdown details to be populated */
532 )
533{
534 REAL4 cosiota;
535 double splus, scross, fplus, fcross;
536 double tDelay, tStart;
537
540
541 /* Calculate the Ringdown parameters */
542 XLALPrintInfo( "Calculating (approximate) parameters for the ringdown\n" );
543
544 /* waveform */
545 strcpy( ringInj->waveform, "Ringdown" );
546 snprintf( ringInj->coordinates, LIGOMETA_COORDINATES_MAX * sizeof(CHAR),
547 "EQUATORIAL");
548
549 /* calculate hrss */
550 ringInj->hrss = ringInj->amplitude * sqrt( 2 / LAL_PI / ringInj->frequency ) *
551 pow( ( 2.0 * pow( ringInj->quality, 3.0 ) + ringInj->quality ) /
552 ( 1.0 + 4.0 * pow ( ringInj->quality, 2 ) ) , 0.5);
553
554 XLALPrintInfo( "Ringdown h_rss = %.2g\n", ringInj->hrss);
555
556 /* and epsilon */
557 ringInj->epsilon = XLALBlackHoleRingEpsilon( ringInj->frequency,
558 ringInj->quality, ringInj->distance, ringInj->amplitude );
559 XLALPrintInfo( "Ringdown epsilon = %.2g\n", ringInj->epsilon);
560
561 /* calculate start time at sites */
562 tStart = XLALGPSGetREAL8(&(ringInj->geocent_start_time) );
564 &(ringInj->geocent_start_time), 0.0 );
565
566 /* lho */
567 tDelay = XLALTimeDelayFromEarthCenter( lho.location, ringInj->longitude,
568 ringInj->latitude, &(ringInj->geocent_start_time) );
569 XLALGPSSetREAL8( &(ringInj->h_start_time), tDelay + tStart );
570 /* llo */
571 tDelay = XLALTimeDelayFromEarthCenter( llo.location, ringInj->longitude,
572 ringInj->latitude, &(ringInj->geocent_start_time) );
573 XLALGPSSetREAL8( &(ringInj->l_start_time), tDelay + tStart );
574
575 XLALPrintInfo( "Site start times:\n"
576 "LHO: %d.%d GPS seconds\n"
577 "LLO: %d.%d GPS seconds\n",
580
581 /* compute effective distance and hrss for sites */
582 cosiota = cos(ringInj->inclination);
583 splus = -( 1.0 + cosiota * cosiota );
584 scross = -2.0 * cosiota;
585 /* LHO */
586 XLALComputeDetAMResponse(&fplus, &fcross, (const REAL4(*)[3])lho.response, ringInj->latitude,
587 ringInj->longitude, ringInj->polarization, ringInj->start_time_gmst);
588 ringInj->eff_dist_h = 2.0 * ringInj->distance;
589 ringInj->eff_dist_h /= sqrt( splus*splus*fplus*fplus +
590 scross*scross*fcross*fcross );
591 ringInj->hrss_h = ringInj->amplitude * pow ( (
592 (2*pow(ringInj->quality,3)+ringInj->quality ) *
593 splus*splus*fplus*fplus +
594 2*pow(ringInj->quality,2) * splus*scross*fplus*fcross +
595 2*pow(ringInj->quality,3) * scross*scross*fcross*fcross )
596 / 2.0 / LAL_PI / ringInj->frequency /
597 ( 1.0 + 4.0 * pow ( ringInj->quality, 2 ) ) , 0.5 );
598 XLALPrintInfo( "LHO response: F+ = %f, Fx = %f\n", fplus, fcross);
599
600 /* compute hrss at LLO */
601 /* LLO */
602 XLALComputeDetAMResponse(&fplus, &fcross, (const REAL4(*)[3])llo.response, ringInj->longitude,
603 ringInj->latitude, ringInj->polarization, ringInj->start_time_gmst);
604 ringInj->eff_dist_l = 2.0 * ringInj->distance;
605 ringInj->eff_dist_l /= sqrt( splus*splus*fplus*fplus +
606 scross*scross*fcross*fcross );
607 ringInj->hrss_l = ringInj->amplitude * pow ( (
608 (2*pow(ringInj->quality,3)+ringInj->quality ) *
609 splus*splus*fplus*fplus +
610 2*pow(ringInj->quality,2) * splus*scross*fplus*fcross +
611 2*pow(ringInj->quality,3) * scross*scross*fcross*fcross )
612 / 2.0 / LAL_PI / ringInj->frequency /
613 ( 1.0 + 4.0 * pow ( ringInj->quality, 2 ) ) , 0.5 );
614
615 XLALPrintInfo( "LLO response: F+ = %f, Fx = %f\n", fplus, fcross);
616 XLALPrintInfo( "Site effective distances:\n"
617 "LHO: %f Mpc\n"
618 "LLO: %f Mpc\n",
619 ringInj->eff_dist_h, ringInj->eff_dist_l);
620
621 XLALPrintInfo( "Site h_rss:\n"
622 "LHO: %g\n"
623 "LLO: %g\n",
624 ringInj->hrss_l, ringInj->hrss_l);
625 return( ringInj );
626}
LALDetectorIndexLLODIFF
LALDetectorIndexLHODIFF
static SimRingdownTable * XLALDeriveRingdownParameters(SimRingdownTable *ringInj)
@ LALRINGDOWN_IMR_RING_INJECT
#define LIGOMETA_COORDINATES_MAX
const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS]
void XLALComputeDetAMResponse(double *fplus, double *fcross, const REAL4 D[3][3], const double ra, const double dec, const double psi, const double gmst)
CoherentGW * XLALGenerateInspRing(CoherentGW *waveform, SimInspiralTable *inspiralInj, SimRingdownTable *ringInj, int injectSignalType)
Takes an inspiral waveform, and a simInspiralTable and generates a ringdown at an appropriate frequen...
#define LAL_C_SI
#define LAL_MSUN_SI
#define LAL_PI
#define LAL_TWOPI
#define LAL_G_SI
double REAL8
char CHAR
int32_t INT4
float REAL4
void * XLALRealloc(void *p, size_t n)
void XLALFree(void *p)
static const INT4 a
REAL4 XLALBlackHoleRingEpsilon(REAL4 f, REAL4 Q, REAL4 r, REAL4 amplitude)
Definition: RingUtils.c:204
REAL8 XLALTimeDelayFromEarthCenter(const double detector_earthfixed_xyz_metres[3], double source_right_ascension_radians, double source_declination_radians, const LIGOTimeGPS *gpstime)
REAL8TimeSeries * XLALResizeREAL8TimeSeries(REAL8TimeSeries *series, int first, size_t length)
REAL4TimeSeries * XLALResizeREAL4TimeSeries(REAL4TimeSeries *series, int first, size_t length)
#define XLAL_ERROR_NULL(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
XLAL_ENOMEM
XLAL_EIO
XLAL_EFAILED
REAL8 XLALGreenwichSiderealTime(const LIGOTimeGPS *gpstime, REAL8 equation_of_equinoxes)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
int n
int N
REAL4TimeSeries * shift
REAL4TimeVectorSeries * a
REAL8TimeSeries * phi
REAL4TimeSeries * f
REAL4 response[3][3]
REAL8 location[3]
INT4 gpsNanoSeconds
REAL4Sequence * data
REAL4VectorSequence * data
REAL4 * data
REAL8Sequence * data
REAL8 * data
LIGOTimeGPS geocent_end_time
CHAR waveform[LIGOMETA_WAVEFORM_MAX]
CHAR waveform[LIGOMETA_WAVEFORM_MAX]
LIGOTimeGPS h_start_time
LIGOTimeGPS geocent_start_time
CHAR coordinates[LIGOMETA_COORDINATES_MAX]
LIGOTimeGPS l_start_time