manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

DDsmu and DDsmu_mocks give different results #273

Closed pribamello closed 2 years ago

pribamello commented 2 years ago

General information

Issue description

When using "DDsmu" and "DDsmu_mocks" to compute counts on the same set of particles, but with different coordinate systems, results are different.

Minimal failing example

https://github.com/pribamello/Correlation-Function

manodeep commented 2 years ago

Hey @pribamello - thanks for using Corrfunc and for reporting the issue.

In order to use x, y, z in the inputs to DDtheta_mocks, you have to pass x, y, z and also set is_comoving_dist=True. Looks like you are setting is_comoving_dist but passing ra, dec, cz (instead of x, y, z).

My expectation is to get similar results when passing x, y, z to both theory/DDsmu (periodic=False) and mocks/DDsmu_mocks (is_comoving_dist=True). Note that the line of sight is fixed along the Cartesian z-axis for all particle pairs for theory/DDsmu whereas the line-of-sight changes for every particle pair considered for mocks/DDsmu_mocks.

pribamello commented 2 years ago

Hi @manodeep - thank you for the response. In the documentation page for DDsu_mocks, the arguments are passed as (r, ra, dec). When I try to pass (x, y, z) instead, an error is raised.

manodeep commented 2 years ago

You are totally right - oops!

Just to be clear - those two results would still not be identical anyway - the projections are defined in a different manner. I am curious - is this related to any Science use-case that you have?

pribamello commented 2 years ago

Makes sense, considering the diferences in projection. Yes! For now, I'm trying to recover the multipoles from a set of mock simulations from Pinocchio code.