`fill_value=0` for interpolating calibration errors can cause large likelihood errors when ROQ is used with a narrower frequency range
Currently by default of bilby.gw.calibration.CubicSpline
, the calibration factor outside the frequency range of an interferometer object is fixed to unity if requested. This effectively introduces a discreteness in waveforms when ROQ basis is used with a narrower frequency range than the range over which the basis is constructed.
Let's consider a case where the basis is constructed over 20-1024Hz while the 30-1024Hz is analyzed. If the calibration amplitude error is +10% at 30Hz, the basis needs to model waveforms which discretely get larger by 10% at 30Hz. Since the basis is not trained against such discrete waveforms, it can cause large likelihood errors. See also an attached figure, which shows likelihood errors of 4s Pv2 basis for various low-frequency cutoffs.
One possible workaround of this problem is to use fill_value="extrapolate"
as an interpolation option. With this simple change the likelihood errors of 4s Pv2 basis are significantly reduced (See the scatter plots labeled (Extrapolate)
). Possible options for implementing this is:
- Use
fill_value="extrapolate"
by default. - Enable user to chose which option should be used for
fill_value
inCubicSpline. get_calibration_factor
and usefill_value="extrapolate"
when it is called by ROQ likelihood.