Skip to content

fix FDWaveformSeq

Sebastian Khan requested to merge sebastian-khan/lalsuite:fix-tf2-seq into master

I think this fixes a problem that was pointed out by Alex Nitz where FDWaveformSequence was giving seg faults.

Also fixed a bug where the tidal parameters were not being treated in the same way as in LALSimInspiral.c

Here is a code snippet that shows a TaylorF2 waveform generated with SimInspiralChooseFDWaveform and SimInspiralChooseFDWaveformSequence look similar.

import matplotlib
import matplotlib.pyplot as plt

import lalsimulation, lal, numpy
b = lal.CreateREAL8Vector(1024)
b.data[:] =  numpy.arange(30, 1054, 1.0)
hpseq, hcseq = lalsimulation.SimInspiralChooseFDWaveformSequence(0.0,
              1.4 * lal.MSUN_SI,
              1.4 * lal.MSUN_SI,
              0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 30.0, 1.0, 0.0,
               None, lalsimulation.TaylorF2, b)



hp, hc = lalsimulation.SimInspiralChooseFDWaveform(
    1.4 * lal.MSUN_SI,
    1.4 * lal.MSUN_SI,
    0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
    1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
    1.0, 30., 1054., 30., None, lalsimulation.TaylorF2
)
ff = numpy.arange(hp.data.length) * hp.deltaF


plt.figure()
plt.plot(b.data[:], numpy.abs(hpseq.data.data), label='Seq')
plt.plot(ff, numpy.abs(hp.data.data), label='FDWave', ls='--')
plt.xscale('log')
plt.yscale('log')
plt.show()

Merge request reports

Loading