Add ValueError when improper starting frequency used with `to_pycbc()`
Created by: dethodav
This PR ensures that a ValueError
is returned when the user attempts to use frequencyseries.FrequencySeries.to_pycbc()
in cases when the starting frequency is not 0 Hz
. When a PyCBC frequency series is created with f0 != 0 Hz
, the PyCBC frequencies are not correct (They are offset by f0
).
Here is an example of code that now returns a ValueError
since the starting frequency is 10 Hz
:
from gwpy.frequencyseries import FrequencySeries
psd = (FrequencySeries.read('O3-H1-C01_CLEAN_SUB60HZ-1262197260.0_sensitivity_strain_asd.txt')).to_pycbc()
print(psd.sample_frequencies)
The above example uses this file: https://dcc.ligo.org/public/0174/G2100674/001/O3-H1-C01_CLEAN_SUB60HZ-1262197260.0_sensitivity_strain_asd.txt