IMRPhenomXPHM segfaults with certain parameters
Description of problem
IMRPhenomXPHM appears to segfault when the starting frequency is too close to the merger/final frequency.
% ipython
Python 3.9.5 (default, May 18 2021, 12:31:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.29.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import pycbc
PyCBC.libutils: pkg-config call failed, setting NO_PKGCONFIG=1
In [2]: pycbc.__version__
Out[2]: '0.0a8350'
In [3]: import lalsimulation
In [4]: lalsimulation.__version__
Out[4]: '3.1.1'
In [5]: from pycbc.waveform import get_fd_waveform
In [6]: get_fd_waveform(approximant='IMRPhenomXPHM', mass1=7675, mass2=7675, f_lower=4, delta_f=0.1)
(fCut = 3.96792 Hz) <= f_min = 4
f_max <= f_min
zsh: segmentation fault ipython
The same parameters work with, for example, IMRPhenomHM:
In [2]: get_fd_waveform(approximant='IMRPhenomHM', mass1=7675, mass2=7675, f_lower=4, delta_f=0.1)
Out[2]:
(<pycbc.types.frequencyseries.FrequencySeries at 0x7fad07b47e80>,
<pycbc.types.frequencyseries.FrequencySeries at 0x7fad07984a60>)
Expected behavior
lalsimulation should raise an exception instead of segfaulting.
Steps to reproduce
See above.
Context/environment
System information
Python: 3.9.5 (default, May 18 2021, 12:31:01)
Operating system: macOS 10.16
Conda info
$ conda info
Conda list
$ conda list
lalapps_version
$ lalapps_version --verbose
Suggested solutions
I suspect the code that is catching the error is not returning the right error value, or not doing whatever it needs to do to tell Python to raise an exception.