pynbody.halo.hbtplus#
HBT+ halo catalogue support.
HBT+ and parent groups#
HBT+ identifies halos, not the parent groups (using the SubFind terminology). As a result, it may be used alongside a parent group catalogue. The pynbody reader can present a unified interface to the combined hierarchy, presenting groups from the parent catalogue as the top-level objects, with the HBT+ halos as children of these groups, and HBT+ subhalos as children of the HBT+ halos.
For example:
In [1]: import pynbody
In [2]: s = pynbody.load('testdata/gadget4_subfind_HBT/snapshot_034.hdf5')
In [3]: hbtplus_halos = s.halos(priority=["HBTPlusCatalogue"])
In [4]: subfind_groups = s.halos(priority=["Gadget4SubfindHDFCatalogue"])
In [5]: combined_catalogue = hbtplus_halos.with_groups_from(subfind_groups)
In [6]: combined_catalogue[0]
Out[6]: <SimSnap "testdata/gadget4_subfind_HBT/snapshot_034.hdf5:halo_0" len=307386>
We can tell that this is actually a SubFind group by inspecting its properties:
In [7]: combined_catalogue[0].properties['GroupMass'] # <-- a SubFind property
Out[7]: Unit("7.80e+44 g h**-1")
In [8]: subfind_groups[0].properties['GroupMass'] # <-- the same property accessed directly from SubFind
Out[8]: Unit("7.80e+44 g h**-1")
The subhalos
attribute of each halo in the combined_catalogue
will return the HBT+ subhalos that are children of
the corresponding SubFind group:
In [9]: combined_catalogue[0].subhalos[0].properties['TrackId'] # <-- an HBT+ property
Out[9]: 54
Naturally, not only the properties but the particle information is available in the combined catalogue.
Classes
alias of |
|
alias of |
|
|
A class to represent a HBT+ halo catalogue. |
|
A class to represent a HBT+ halo catalogue with parent groups from another finder. |