manodeep / Corrfunc

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

cz vs z check and fixing by speed of light on comoving distances #274

Closed misharash closed 2 years ago

misharash commented 2 years ago

General information

but I'm pretty sure the issue is general.

Issue description

I am using Corrfunc.mocks.DDsmu_mocks.DDsmu_mocks in python with is_comoving_dist=True.

Expected behavior

No cz vs z check and no multiplication by speed of light when is_comoving_dist=True.

Actual behavior

I am getting warnings like

check_ra_dec_cz_s_mu_double> Out of range values found for cz. Expected input to be `cz' but found `z' instead. max_cz (found in input) = 4.190300 threshold = 10.000000

I wondered how the code doesn't fail, traced it down to this message and found that then multiplication by speed of light occurs to "fix" the data, which doesn't make sense with distances.

P.S.

With distances in Mpc/h, such small maximum values are also a problem for me, but the fixing procedure for cz/z is not applicable, and the threshold of 10 might not be the best too.

manodeep commented 2 years ago

Good catch! Wonder if this is related to #273?

A similar "feature" should also exist for DDrppi_mocks - do you mind applying the fix there as well?

misharash commented 2 years ago

Sure. Indeed DDrppi_mocks was pretty much the same. Correction for that is now also included in #275.

273 doesn't seem related - distance values in example there are all large so correction shouldn't be invoked.