-
Notifications
You must be signed in to change notification settings - Fork 37
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
Computing NN correlation from simulated catalogues without a random catalogue #124
Comments
You can do whatever you want with the NN pair counts. The |
Ah, I see. I had to dig into the details of the
Would something like this (admittedly very basic) functionality be something worth including within the official |
If it's really onerous, I can think about adding something to TreeCorr to do this for you. But (a) it feels fairly trivial to me, and (b) the code you posted is currently hard-coded to your particular scenario (periodic metric, 3D coords), so I'd have to generalize that if this were going to be a regular feature. Also, you didn't post your
I'll leave this issue open in case any other users want to weigh in on how useful it would be. If there is enough interest, I'll consider it. |
My function does exactly what I need it to do now, so this certainly doesn't need to be added to I can't think how to generalise it beyond a periodic metric since I think you need no mask for this to work... I guess you could make it work for a full curved sky simulation easily enough. The 2D-periodic case is straightforward, but I don't know how to assess the 'dimension' from the PS. My |
FYI, a recent paper has formulae generalizing this to non-periodic geometries, so apparently other people have been thinking along these lines as well. https://arxiv.org/abs/2107.06918 If there is enough interest, I could implement these in TreeCorr. I'm imagining an API along the lines of:
This would be done in lieu of running on a random catalog for cases where the geometry is simple enough that the analytic formulae are accurate. Then you would follow this with the normal I don't think it's generally possible to do this when there are weights or non-trivial masks. But I suppose there are enough use cases where people run on simulated data with simple geometries, or where an approximate value of the random is sufficient, that it could be useful. |
I've been using
treecorr
to compute the halo-halo correlation function from haloes identified in an N-body simulation. I am working in periodic 3D, with x, y and z positions of haloes. I am interested in auto correlations, as well as cross correlations between haloes in different mass bins. If I understandtreecorr
correctly, then I also have to generate some random catalogues (e.g., https://rmjarvis.github.io/TreeCorr/_build/html/guide.html#using-random-catalogs) to form the estimator.However, I feel that if I am using simulated data with no masks etc. then I shouldn't need to generate a random catalogue, since in this case I know exactly what RR, DR, RD (https://rmjarvis.github.io/TreeCorr/_build/html/nn.html#treecorr.NNCorrelation.calculateXi) are in this case, since the background density should be completely uniform on average. Is there a way to bypass the need for a random catalogue in this case? Or am I misunderstanding something?
The text was updated successfully, but these errors were encountered: