astropy / astropy/halotools

sign_pbc and SubhaloPhaseSpace

Open
#900 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
120
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.