synthesizer.load_data.load_simba¶
A submodule for loading Simba data into Synthesizer.
Load Simba galaxy data from a caesar file and snapshot.
Method for loading galaxy and particle data for the [Simba](http://simba.roe.ac.uk/) simulation
Functions
- synthesizer.load_data.load_simba.load_Simba(directory='.', snap_name='snap_033.hdf5', caesar_name='fof_subhalo_tab_033.hdf5', caesar_directory=None, object_indexes=False, load_halo=False, age_lookup=True, age_lookup_delta_a=0.0001)[source]¶
Load Simba galaxy data from a caesar file and snapshot.
This function can load all objects or a specific subset based on their indices. It uses the slist and glist datasets from the Caesar file to correctly map particles to their host galaxies/halos.
- Parameters:
directory (string) – Data location.
snap_name (string) – Snapshot filename.
caesar_name (string) – Caesar file name.
caesar_directory (string) – Optional path to the Caesar file if it’s in a different directory from the snapshot.
object_indexes (list or bool) – List of object indices to load. If False, all objects are loaded.
load_halo (bool) – If True, loads halo objects instead of galaxy objects.
age_lookup (bool) – If True, creates and uses a lookup table for stellar ages for faster age calculation.
age_lookup_delta_a (float) – The resolution of the age lookup table in terms of scale factor.
- Returns:
A list of synthesizer.particle.galaxy.Galaxy objects.
- Return type:
galaxies (list)
- synthesizer.load_data.load_simba.load_Simba_slab(directory='.', snap_name='snap_033.hdf5', bounds=None, load_stars=True, load_gas=True, load_dark_matter=False, age_lookup=True, age_lookup_delta_a=0.0001)[source]¶
Load a cuboid region of Simba simulation data into a Galaxy object.
This function loads all particles within a specified cuboid region from a Simba snapshot, regardless of which galaxy they belong to, and creates a single Galaxy object containing all particles in that region.
- Parameters:
directory (string) – Data location.
snap_name (string) – Snapshot filename.
bounds (array-like) – Cuboid bounds as [[xmin, xmax], [ymin, ymax], [zmin, zmax]] in physical Mpc units.
load_stars (bool) – If True, loads stellar particles (PartType4).
load_gas (bool) – If True, loads gas particles (PartType0).
load_dark_matter (bool) – If True, loads dark matter particles (PartType1).
age_lookup (bool) – If True, creates and uses a lookup table for stellar ages for faster age calculation.
age_lookup_delta_a (float) – The resolution of the age lookup table in terms of scale factor.
- Returns:
A Galaxy object containing all particles in the specified region.
- Return type:
galaxy (synthesizer.particle.galaxy.Galaxy)