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

Importing properties from old pynbody handlers might be incomplete #188

Open
Martin-Rey opened this issue Apr 19, 2022 · 0 comments
Open

Comments

@Martin-Rey
Copy link

Since PR #88, importing properties precomputed by halo finders through

def iterate_object_properties_for_timestep(self, ts_extension, object_typetag, property_names):
"""Iterate through all objects of specified type, providing named pre-computed data.
This is normally data that was calculated and stored by the halo finder such as masses or particle counts.
Each object yields an array with the finder_id followed by values for the requested properties.
:arg ts_extension - the timestep path (relative to the simulation basename)
:arg object_typetag - the type of halo catalogue (e.g. 'halo' or 'group')
:arg property_names - a list of property names to retrieve (depends on catalogue file format)
"""

has changed behaviour, requiring yielding first finder_offset, second finder_id and then the array of properties to be imported.

Documentation has been updated in #178, but all pynbody handlers might not have been retro-fitted with the new behaviour. E.g., GadgetSubfindInputHandler could be missing one halo property during imports

for i in range(len(h)):
all_data = [i]
for k in property_names:
pynbody_properties = h.get_halo_properties(i,with_unit=False)

where all_data should have an additional finder_id inserted before the property enumeration starts.

@Martin-Rey Martin-Rey changed the title Importing properties from old pynbody handlers might be broken Importing properties from old pynbody handlers might be incomplete Apr 19, 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

No branches or pull requests

1 participant