Skip to content

Fix sim inspiral fd

Cecilio Garcia-Quiros requested to merge (removed):fix-SimInspiralFD into master

Description

Hi @maria.haney ,

If one calls SimInspiralFD with fmax=0 there is a division by zero here: https://git.ligo.org/lscsoft/lalsuite/-/blob/master/lalsimulation/lib/LALSimInspiral.c#L2821 and it exists with a quite uninformative error

XLALGPSSetREAL8(): NaNXLAL Error - XLALGPSSetREAL8 (../../../../lalsuite_master/lal/lib/date/XLALTime.c:79): Invalid floating point operation, eg sqrt(-1), 0/0
                                    XLAL Error - XLALGPSAdd (../../../../lalsuite_master/lal/lib/date/XLALTime.c:135): Internal function call failed: Invalid floating point operation, eg sqrt(-1), 0/0

I just added a XLAL_CHECK for fmax>0 and the error now is

XLAL Error - XLALSimInspiralFD (../../../lalsuite_ceci/lalsimulation/lib/LALSimInspiral.c:2796): Maximum frequency must be > 0

XLAL Error - XLALSimInspiralFD (../../../lalsuite_ceci/lalsimulation/lib/LALSimInspiral.c:2796): Input domain error

API Changes and Justification

Backwards Compatible Changes

  • This change introduces no API changes
  • This change adds new API calls

Backwards Incompatible Changes

  • This change modifies an existing API
  • This change removes an existing API

If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.

Review Status

No review neede

Merge request reports