Skip to content
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

#162 Fix a bug in linear binning which could cause very bad results for certain use cases. #176

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

rmjarvis
Copy link
Owner

@rmjarvis rmjarvis commented Oct 17, 2024

@vduret and @akritiasto reported some very poor accuracy in NN correlations with linear binning, which this PR fixes.

The bug was actually present for any Linear binning if the separations are given in angular units other than radians. The underlying bug was that the b parameter (used internally to determine when to split pairs of cells being considered for accumulation) did not have the angular units applied to it.

So if the separations are given in say arcsec, then it was missing a factor of Pi/(180 x 60 x 60) = 5.e-6. That's a big factor.

@rmjarvis rmjarvis merged commit 592bc19 into releases/5.0 Oct 18, 2024
13 checks passed
@rmjarvis rmjarvis deleted the #162 branch October 18, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant