pynbody.snapshot.soap#
Implements reading SOAP halo catalogues, as produced from SWIFT simulations (e.g. FLAMINGO, COLIBRE).
SOAP (Spherical Overdensity and Aperture Processor) catalogues are tables of properties, one row per subhalo, computed
in a number of ways: for example the bound subhalo (BoundSubhalo/...), spheres of fixed overdensity
(SO/200_crit/...), and fixed apertures (ExclusiveSphere/50kpc/...). They can be opened without the snapshot
from which they were computed, so pynbody presents them as a snapshot whose “particles” are the subhalos, all in the
family halo:
>>> cat = pynbody.load("halo_properties_0077.hdf5")
>>> cat.halo
<FamilySubSnap "halo_properties_0077.hdf5::halo" len=952>
>>> cat['SO/200_crit/TotalMass'].in_units('Msol')
SimArray([4.155e+12, 1.8475e+12, ...], dtype=float32, 'Msol')
All properties are available under their path in the HDF5 file. Those named in the config.ini section
[soap-name-mapping] are also available under a pynbody name. By default, only pos is mapped, to the halo
centre (InputHalos/HaloCentre), which SOAP uses as the reference for all its apertures, and which allows spatial
filters, centring etc. to work. Other quantities have no single natural choice (there are many masses, for example),
so are left for you to map in your own configuration if you wish, e.g. SO/200_crit/TotalMass: mass. Note that
an array loaded under both names is loaded twice, so that (for example) translating the catalogue changes pos,
but leaves InputHalos/HaloCentre as stored in the file.
The subhalos are given in the order they appear in the file, so that the indices stored in SOAP/HostHaloIndex
remain valid (unless only part of the catalogue is loaded).
Note that SOAP computes some properties (such as those in SO/...) only for central subhalos, giving zero for
satellites; InputHalos/IsCentral says which is which.
As for SWIFT snapshots, take_region loads only the subhalos in cells (of the catalogue’s spatial index) that
overlap a region; and remote_dir reads a catalogue from an hdfstream server.
Added in version 2.8.0.
Classes
|
|
|
Reads a SOAP halo catalogue, in which each "particle" is a subhalo, in the family |