-
Notifications
You must be signed in to change notification settings - Fork 56
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
Correctly convert counts to cf when doing an autocorr #201
base: master
Are you sure you want to change the base?
Correctly convert counts to cf when doing an autocorr #201
Conversation
Hello @Christopher-Bradshaw! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-10-18 20:38:01 UTC |
Thanks! I think this is consistent with what we're doing in |
Hey @lgarrison I might be missing something (or just looking in entirely the wrong place) but it looks like Corrfunc/theory/xi/countpairs_xi_impl.c.src Line 619 in d8a7958
|
No, you're absolutely right! I was mis-remembering that we also supported the natural estimator in |
@Christopher-Bradshaw Thanks! @lgarrison Since the pair-counts are designed to be the same for an auto-corr of |
@lgarrison Would your gist to demonstrate how to correctly account for pair-counts in a |
It's definitely relevant, as it was designed to show that That's why I was thinking that some kind of consistency check or limit should be possible to ensure that LS and the natural estimator are behaving the same with respect to the |
That gist is actually really useful for what I am doing - I was using The test I had locally that was failing basically just constructed data and randoms with the same clustering and then asserted that the auto-correlation was 0. With this change that is now true. We could maybe just do the same thing for all the places where counts are converted to a cf? Also, just checking that by natural estimator you mean DD/RR? |
|
@Christopher-Bradshaw @lgarrison Does anyone recollect what needs to happen with this PR? |
I think that the current way that Corrfunc converts counts to a correlation function isn't quite right for autocorrelations. I think the normalization is slightly off (see equation 3 in the LS paper).
The effect of this is totally negligible when the number of pairs is high, and very small even when it isn't so this isn't a big deal... But I was confused why things weren't quite as I expected and it seems worth a fix.
Please let me know I am right about this - there's always a good change I've misunderstood something! This change is also pretty rough at the moment - I just wanted to have something to show. I'm happy to clean it up, write tests, etc later but didn't want to do that before checking this made sense!
Thanks!