gwastro / pycbc

Core package to analyze gravitational-wave data, find signals, and study their parameters. This package was used in the first direct detection of gravitational waves (GW150914), and is used in the ongoing analysis of LIGO/Virgo data.
http://pycbc.org
GNU General Public License v3.0
307 stars 344 forks source link

fix normalization of sky and time marginalization to reduce integral … #4804

Closed ahnitz closed 2 weeks ago

ahnitz commented 2 weeks ago

…uncertainty

This reduces the uncertainty in the monte-carlo integral for time / sky marginalization. I was using a normalization that incorrectly introduced a large sample variance when in fact it was not needed. In testing this means that the likelihood (not log likelihood thankfully) std deviation is ~ 5-10% after 1000 samples and improves with root(N) as expected. For many cases, this is sufficient unless the level of accuracy required is very high.

I've also added some comments for future improvements. The marginalizations implicitly assume a uniform time prior, which should be alleviated in a future pull request.

WuShichao commented 2 weeks ago

Some code climate issues need to be fixed.

ahnitz commented 2 weeks ago

@WuShichao The remaining cc issues can't be resolved and were not introduced in this PR.