Skip to content

Removing Unneeded checks for phenomD and phenomD_NRTidal

These checks actually means that you cannot use these approximants with LALInference on master currently. These checks are unneeded for phenomD and phenomD_NRTidal.

Internally phenomD/phenomD_NRTidal internally modify the PNSpinOrder away from the default value which means the second time you call phenomD/PhenomD_NRTidal check that XLALSimInspiralWaveformParamsFlagsAreDefault causes the code to fail.

The line where phenD internally modifies the SpinOrder is here: https://git.ligo.org/lscsoft/lalsuite/blob/master/lalsimulation/src/LALSimIMRPhenomD.c#L348

The modified spin order term gets parsed to extraParams which is the LALDict that contains the extra parameters. This extraParams pointer doesn't get free'd. I don't think it's supposed to. But this means that the modified SpinOrder variable is persistent so the next time phenomD is called in say Parameter Estimation the value for SpinOrder is not the default value and the code exits with an error such as:

XLAL Error - XLALSimInspiralChooseFDWaveform: Non-default flags given, but this approximant does not support this case.
XLAL Error - LALInferenceTemplateXLALSimInspiralChooseWaveform (LALInferenceTemplate.c:871): LALInferenceTemplateXLALSimInspiralChooseWaveform: Template generation failed in XLALSimInspiralChooseFDWaveformFromCache:
XLALSimInspiralChooseFDWaveformFromCache(&hptilde, &hctilde, 4.05369, 0.25, 5.87216e+32, 5.17991e+32, 0, 0, 0.831705, 0, 0, -0.763413, 1.25, 127.75, 5, 1.3132e+23, 0.243618, ,model->LALpars,model->waveformCache)

Unhandled error in template generation - exiting!
XLALError: 22, Invalid argument

I believe these changes are correct and do not impact anything else but reviewers of this patch should be (to make an incomplete list) @frank-ohme , @riccardo-sturani and @vivien

Merge request reports

Loading