Correct glitch amplitude prior denominator
draw_glitch_amplitude
samples an amplitude from a wavelet's glitch amplitude prior. To do so, the function computes a probability density multiple times. In some instances, it multiplies the density's denominator by an extra factor of 2. Those instances are here:
Meanwhile the prior is correctly computed without the factor of 2 here:
This issue seems to have arisen because the variable SNRsq
has a factor of 2 inside of it. The incorrect prior calculations assume that SNRsq
does not contain that factor of 2. Notice that in the similar draw_signal_amplitude
function, SNRsq
has a factor of 4, and none of the SNR computations contain an extra 4 in their denominators:
This merge request removes the extra factors of 2 from lines 69 and 95.