pynbody.halo#
Support for halo and group catalogues.
Halo catalogues act like a dictionary, mapping from halo numbers to a Halo objects. The halo number is typically determined by the halo finder, and is often (but not always) the same as the halo index which is the zero-based offset within the catalogue.
If you have a supported halo catalogue on disk or a halo finder installed and correctly configured, you can access a
halo catalogue through f.halos()
where f
is a SimSnap.
See the halo catalogue tutorial for introductory information and guidance.
Changed in version 2.0: Backwards-incompatible changes to the halo catalogue system
For version 2.0, the halo catalogue loading system was substantially rewritten. The new system is more robust and
more consistent across different halo finders. However, this means that some defaults have changed, most significantly
in the AHF halo numbering. Backward-compatibility can be achieved by passing halo_numbers='v1'
to the
AHFCatalogue
constructor. For more information, read the documentation for that class.
Furthermore, older versions of pynbody (i.e. v1.x) could be configured to create a halo catalogue if one was not found, using AHF. This is no longer the case, as creating a halo catalogue requires choosing a halo finder and its parameters carefully for the task in hand and it was not possible to provide a one-size-fits-all solution.
Finally, options to write .stat
files and .grp
files have been removed. However it is still possible to
generate a .grp
file by calling get_group_array()
and writing out the resulting
array of integers using a tool like numpy.savetxt
.
By paring back the less-used functionality of the halo catalogue system, the remaining functionality is more consistent, robust, and extensible to new halo finders.
Supported halo-finder formats#
The currently-supported formats are:
Adaptahop (
AdaptaHOPCatalogue
);AHF (
AHFCatalogue
);HBT+ (
HBTPlusCatalogue
);HOP (
HOPCatalogue
);Rockstar (
RockstarCatalogue
);Subfind (old format
SubfindCatalogue
, or various HDF5 variants asSubfindHDFCatalogue
);VELOCIraptor (
VelociraptorCatalogue
).
In addition, generic halo finders which output a list of halo numbers for each particle are supported via
HaloNumberCatalogue
.
Note
The principal development of pynbody
took place in the UK, and the spelling of “catalogue” is British English.
However, since much code is written in American English, v2.0.0 introduced aliases such that all
classes can be accessed with the American spelling HaloCatalog
, AdaptaHOPCatalog
etc.
Classes
Methods |
|
|
Represents a single halo from a halo catalogue. |
alias of |
|
|
Generic halo catalogue object. |
Modules
AHF (Amiga Halo Finder) support |
|
HBT+ halo catalogue support. |
|
Support for generic halo catalogues based on an array of halo numbers for each particle. |
|
Support for the Rockstar halo finder |
|
Support for the SubFind halo finder |
|
Support for the SubFind halo finder, in the HDF5 format used by Gadget3, 4 and Arepo. |
|
Support for subhalo catalogues, which are effectively views on a parent halo catalogue |
|
Support for the Velociraptor halo finder. |