cbc_template_fir.py: corrected bug in sigmasq to make it horizon distance calculation in LR consistent
This MR improves the sigmasq calculation in cbc_template_fir.py
, and makes the horizon distance (and horizon factor) calculation in LR self-consistent.
Sigmasqs are used to compute horizon factors, which are used to compute horizon distances in the LR calculations.
Prior to this MR, sigmasq
in cbc_template_fir.py
is computed by using the norm, data sampling rate, and length of the templates.
In this MR, psd.HorizonDistance
at snr = 1 is used to obtain sigmasqs.
The details of the derivation are in the paragraph below eq 4.4 in this paper.
This MR also adds flexibility for the waveform approximant that psd.HorizonDistance
uses. (Prior to this MR, the waveform approximant for psd.HorizonDistance
was hardcoded to be "IMRPhenomD".)
The figures attached show the horizon distances computed from the "prior-to-MR version of sigmasq calculation" (referred to as "prior" in the figures) and the horizon distances computed from the "MR version of sigmasq calculation. Here, horizon distances are computed as sigmasq**.5/snr where snr = 8. The "prior" method assigns largely varying sigmasqs to nearby templates whereas the "after" method doesn't. In addition, the "prior" method has a group of templates that have outstanding horizon distances (i.e. sigmasq values) compared to its surrounding templates, whereas the "after" method doesn't. Therefore, when comparing the two methods, the "after" method gives sigmasq values that do not vary among nearby templates as compared to the "prior" method, which would be more physically consistent (assuming that the nearby templates are similar).