Skip to content

Importing properties from old pynbody handlers might be incomplete #188

@Martin-Rey

Description

@Martin-Rey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions