Skip to content
Snippets Groups Projects
Commit b3cb81f4 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'master' into 'master'

fix td waveform epoch

See merge request !736
parents ce2a4047 3ec61a40
No related branches found
No related tags found
1 merge request!736fix td waveform epoch
Pipeline #107112 passed
......@@ -396,6 +396,13 @@ def _base_lal_cbc_fd_waveform(
h_plus *= frequency_bounds
h_cross *= frequency_bounds
if wf_func == lalsim_SimInspiralFD:
dt = 1. / delta_frequency - (hplus.epoch.gpsSeconds + hplus.epoch.gpsNanoSeconds * 1e-9)
h_plus *= np.exp(
-1j * 2 * np.pi * dt * frequency_array)
h_cross *= np.exp(
-1j * 2 * np.pi * dt * frequency_array)
return dict(plus=h_plus, cross=h_cross)
......
  • Roberto Cotesta @roberto.cotesta ·
    Reporter

    It has to be dt = 1. / delta_frequency + (hplus.epoch.gpsSeconds + hplus.epoch.gpsNanoSeconds * 1e-9) or dt = 1. / delta_frequency - np.abs(hplus.epoch.gpsSeconds + hplus.epoch.gpsNanoSeconds * 1e-9) as it was before I believe

  • Roberto Cotesta @roberto.cotesta ·
    Reporter
  • Roberto Cotesta @roberto.cotesta ·
    Reporter

    Just to give more informations, myself and Serguei did the test here on a branch with this modification: dt = (T - abs(hplus.epoch.gpsSeconds+hplus.epoch.gpsNanoSeconds*1e-9)). Epoch is a quantity always defined as negative because is the first element of the time array assuming that t = 0 is the peak of the 22 mode (for only 22 mode waveforms) and an invariant amplitude for multipolar waveforms. The peak of this invariant amplitude is anyway close to the peak of the 22 mode. So either you use the abs or you change the - sign with +. I've just made a modification to my branch of bilby to test this. I'll show later today a comparison on a run.

    Edited by Roberto Cotesta
  • Rory Smith @rory-smith ·
    Developer

    Oh no! Does this affect any of the on going runs?

  • Roberto Cotesta @roberto.cotesta ·
    Reporter

    Yes, see here. I think it can be fixed in postprocessing, but I'd rather have it correct.

  • Roberto Cotesta @roberto.cotesta ·
    Reporter

    @rory-smith @gregory.ashton The patch that I made produce the correct result, I guess you guys can correct this typo in the merge request. As reference with my patch (i.e. dt = 1. / delta_frequency + (hplus.epoch.gpsSeconds + hplus.epoch.gpsNanoSeconds * 1e-9)) I can match the tc in a @serguei.ossokine run. That run matched LI results (see here). I apologize that I didn't bother to compare directly the run with my patch with the LI ones. I'm lazy and it's quite late here :) In principle I can open a merge request myself, in practice I believe that it's easier if you fix this since it's just a sign. I hope that what I've just written is understandable

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment