New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shotnoise estimation of weighted to_mesh() calls. #545

merged 4 commits into from Dec 30, 2018


None yet
1 participant
Copy link

rainwoodman commented Dec 30, 2018

Before this PR we used a simple formula 1 / nbar, which is incorrect if the data is weighted.
@martinjameswhite suggested an alternative formula:

V / (sum w**2 / (sum w)**2)

It reverts to V/N when w is unweighted. This expression is also consistent with the shotnoise combination equation in MultipleSpeciesCatalog.

I strongly suspect this was a regression. But anyhow here is the fix.
A test case is added to make sure it does not break again.


This comment has been minimized.

Copy link
Member Author

rainwoodman commented Dec 30, 2018

@rainwoodman rainwoodman merged commit 26374d1 into bccp:master Dec 30, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.004%) to 94.7%

@rainwoodman rainwoodman deleted the rainwoodman:shotnoise-fix branch Jan 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment