Add a new parameter to avoid cuspy PhenomPv2 waveforms
PhenomPv2 waveform has an artificial cusp when the z-component of total angular momentum J_z
gets negative at a certain frequency (See Sec. 4 of this technical note for the detail). This cusp significantly increases the size of ROQ basis, or can break down rapid likelihood evaluation techniques assuming smoothness of waveforms.
It happens when the minimum of J_z
over the analyzed frequency range is negative,
J_{z, \mathrm{min}} = L_{\mathrm{min}} + \frac{m^2_1 \chi_{1, z} + m^2_2 \chi_{2, z}}{(m_1 + m_2)^2} < 0,
where L_{\mathrm{min}}
is the minimum orbital angular momentum given by
L_{\mathrm{min}} = \frac{\eta}{v} \left(1 + \left(\frac{3}{2} + \frac{\eta}{6}\right) v^2 + \left(\frac{27}{8} - \frac{19 \eta}{8} - \frac{\eta^2}{24}\right) v^4 \right), ~~~~~v = \min\left[\sqrt{\frac{2 (9 + \eta - \sqrt{1539 - 1008 \eta - 17 \eta^2})}{3 (-81 + 57 \eta + \eta^2)}}, \left(\frac{\pi G m_{\mathrm{tot}} f_{\mathrm{high}}}{c^3}\right)^{\frac{1}{3}}\right].
One possible workaround of this problem is to implement J_{z, \mathrm{min}}
in bilby's conversion function and constrain it to be positive for sampling or drawing injections. This parameter can also be used to switch ROQ bases, one of which is constructed for smooth waveforms, and the other of which is constructed for non-smooth waveforms.
An initial implementation of this parameter is available here.