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

Distance units in mocks #202

Open
Christopher-Bradshaw opened this issue Oct 18, 2019 · 5 comments
Open

Distance units in mocks #202

Christopher-Bradshaw opened this issue Oct 18, 2019 · 5 comments

Comments

@Christopher-Bradshaw
Copy link
Contributor

Christopher-Bradshaw commented Oct 18, 2019

Hey, a couple of questions about the distance units in the mocks package (particularly DDrppi_mocks).

From a couple of tests it looks like both the pi and r distances in which pairs are found are comoving distances? Where (assuming a flat cosmology) the r distance is the comoving distance * angle?

It also looks like those distances are assumed to be in comoving Mpc/h if is_comoving_dist isn't set? (

const double Dh = SPEED_OF_LIGHT*0.01/smallh ;// c/(100) -> in units of little h^-1 Mpc
though this says Mpc
fprintf(stderr,"%s> tabulated redshift: %g to %g (distance: %g to %g Mpc)\n", __FUNCTION__, zc[0], zc[i-1], dc[0], dc[i-1]) ;
)

I'm guessing though if is_comoving_dist is set, and the CZ are passed in as Mpc that r/pi are also then assumed to be in units of comoving Mpc.

If this is right so far, is there any way to pass a physical bin size? E.g. if we want counts within 10 physical Mpc over a large redshift range?

Thanks for all your help! I'm also happy to help put some of this in the docs if it is right and you think it would help others.

@manodeep
Copy link
Owner

@Christopher-Bradshaw Thanks for opening the issue. Assuming is_comoving_dist is not set, the velocity units for cz is assumed to be km/s and the distance units for the bins (in both r_p and pi) are all assumed to be in Mpc/h. I am fairly certain that the fprintf statement is a bug and should read Mpc/h instead of Mpc.

If is_comoving_dist is set, then the units for the bins are assumed to be self-consistent and could be in arbitrary units (similar to how the theory pair-counters operate).

@Christopher-Bradshaw For the second question, do you want all pairs within r_p = 10 Mpc (i.e., a single r_p bin) or do you mean all pairs within pi = 10 Mpc?

@Christopher-Bradshaw
Copy link
Contributor Author

Thanks for the response, that makes sense.

For the second question, both. I want all pairs within a single r_p bin (lets say of 1Mpc) and a single pi bin (lets say 10 Mpc). But I want those to be physical Mpc rather than comoving (i.e. the comoving distances will change as a function of redshift).

@manodeep
Copy link
Owner

@Christopher-Bradshaw I am still not sure I understand. Are you proposing to calculate physical separations between arbitrary points within the kernel?

@patogallardo
Copy link

Related to this question.

If you go to the link below in the docs, the first parenthesis states: (speed of light times redshift, in Mpc/h).

Is this a mistake? I think it should read "speed of light in km/s times z", based in the discussion above.

Thank you!

https://corrfunc.readthedocs.io/en/master/python-interface.html?highlight=cz#calculating-2-d-pair-counts-corrfunc-mocks-ddsmu-mocks

@manodeep
Copy link
Owner

@patogallardo Took me a while to get to but looks like the documentation is correct - these lines do the distance calculation. Particularly, these two lines effectively multiply the integral with c/H0, and that produces d in co-moving Mpc/h units.

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

No branches or pull requests

3 participants