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

Fixing remaining ID inconsistencies in AHF handler #191

Merged
merged 5 commits into from
Jun 15, 2022

Conversation

Martin-Rey
Copy link
Contributor

Hi @apontzen and @cphyc,

We realised with @gandhalij that the mapping between parent haloes and child sub haloes is currently broken by the differences between AHF ID and halo_id explained in #178.

The current implementation assumes that hostHalo encodes the halo_id of the host, whereas it really encodes its ID. This PR fixes this inconsistency, adding a mechanism to map ID and halo_id for the general case in which they are non-trivially related.

Comments welcome!
Martin

Copy link
Contributor

@cphyc cphyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks goot to me. Do you think you could test it somehow?

tangos/input_handlers/pynbody.py Outdated Show resolved Hide resolved
Co-authored-by: Corentin Cadiou <contact@cphyc.me>
@Martin-Rey
Copy link
Contributor Author

I never know how to test specific handlers, most of hem and their features are untested and lack infrastructures to do so (historically, I suspect the rationale was to test the base interface but not its case-by-case implementations)

PS: Could any of you help me fix the pre-commit failing test? I don't really get what's going wrong

@cphyc
Copy link
Contributor

cphyc commented May 12, 2022

pre-commit.ci autofix

2 similar comments
@cphyc
Copy link
Contributor

cphyc commented May 12, 2022

pre-commit.ci autofix

@Martin-Rey
Copy link
Contributor Author

pre-commit.ci autofix

@apontzen apontzen merged commit cbf1ea1 into pynbody:master Jun 15, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants