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

sign_pbc and SubhaloPhaseSpace #900

Open
johannesulf opened this issue Apr 23, 2018 · 0 comments
Open

sign_pbc and SubhaloPhaseSpace #900

johannesulf opened this issue Apr 23, 2018 · 0 comments

Comments

@johannesulf
Copy link
Contributor

I'm not 100% sure this is a bug, but let's discuss that. SubhaloPhaseSpace uses sign_pbc (or it's internal version _sign_pbc) to calculate relative phase-space positions between subhalos and host halos. sign_pbc throws an assertion error if any phase-space coordinate of a subhalo or host halo meets or exceeds the periodic boundary conditions.

assert np.all(x1 < period)
assert np.all(x2 < period)

In some cases, this behaviour might be undesired. In my case, some (a handful) of halos have coordinates lying on the periodic boundary conditions. This should in principle not happen but is unavoidable due to rounding errors. (I downloaded a halo catalog from cosmosim.org which has less accuracy than the original ROCKSTAR catalogs.)

Would it make sense to change the above lines?

assert np.all(x1 <= period)
assert np.all(x2 <= period)
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

1 participant