CAESAR Module¶
- class main.CAESAR(ds=0, *args, **kwargs)[source]¶
Bases:
object
Master CAESAR class.
CAESAR objects contain all references to halos, galaxies, and clouds for a single snapshot. Its output format is portable and global object statistics can be examined without the raw simulation file.
- Parameters
ds (yt dataset, optional) – A dataset via
ds = yt.load(snapshot)
mass (str, optional) – Mass unit to store data with. Defaults to ‘Msun’.
length (str, optional) – Length unit to store data with. Defaults to ‘kpccm’.
velocity (str, optional) – Velocity unit to store data with. Defaults to ‘km/s’.
time (str, optional) – Time unit to store data with. Defaults to ‘yr’.
temperature (str, optional) – Temperature unit to store data with. Defaults to ‘K’.
Examples
>>> import caesar >>> obj = caesar.CAESAR()
- cloudinfo(top=10)[source]¶
Method to print general info for the most massive clouds identified via CAESAR.
- Parameters
top (int, optional) – Number of results to print. Defaults to 10.
Notes
This prints to terminal, and is meant for use in an interactive session.
- property data_manager¶
On demand DataManager class.
- galinfo(top=10)[source]¶
Method to print general info for the most massive galaxies identified via CAESAR.
- Parameters
top (int, optional) – Number of results to print. Defaults to 10.
Notes
This prints to terminal, and is meant for use in an interactive session.
- haloinfo(top=10)[source]¶
Method to print general info for the most massive halos identified via CAESAR.
- Parameters
top (int, optional) – Number of results to print. Defaults to 10.
Notes
This prints to terminal, and is meant for use in an interactive session.
- member_search(*args, **kwargs)[source]¶
Meat and potatoes of CAESAR.
This method is responsible for loading particle/field data from disk, creating halos, galaxies and clouds, linking objects together, and finally calculating HI/H2 masses if necessary.
- Parameters
unbind_halos (boolean, optional) – Unbind halos? Defaults to False
unbind_galaxies (boolean, optional) – Unbind galaxies? Defaults to False
b_halo (float, optional) – Quantity used in the linking length (LL) for halos. LL = mean_interparticle_separation * b_halo. Defaults to
b_halo = 0.2
.b_galaxy (float, optional) – Quantity used in the linking length (LL) for galaxies. LL = mean_interparticle_separation * b_galaxy. Defaults to
b_galaxy = b_halo * 0.2
.ll_cloud (float, optional) – Quantity used in the linking length (LL) for clouds in comoving kpc (kpccm).
fofclouds (boolean,optional) – Indicates if we’re running 3D fof on clouds. Default is that this is set to false
fof6d (boolean, optional) – Indicates if we’re running galaxy finding with 6D FOF vs the default of 3D FOF
fof6d_LL_factor (float, optional) – Sets linking length for fof6d
fof6d_mingrp (float, optional) – Sets minimum group size for fof6d
fof6d_velLL (float, optional) – Sets linking length for velocity in fof6d
nproc (int, optional) – Sets number of processors for fof6d and progen_rad
blackholes (boolean, optional) – Indicate if blackholes are present in your simulation. This must be toggled on manually as there is no clear cut way to determine if PartType5 is a low-res particle, or a black hole.
dust (boolean, optional) – Indicate if active dust particles are present in your simulation. This must be toggled on manually as there is no clear cut way to determine if PartType3 is a low-res particle, or an active dust particle.
lowres (list, optional) – If you are running
CAESAR
on a Gadget/GIZMO zoom simulation in HDF5 format, you may want to check each halo for low-resolution contamination. By passing in a list of particle types (ex. [2,3,5]) we will check ALL objects for contamination and add thecontamination
attribute to all objects. Search distance defaults to 2.5x radii[‘total’].
Examples
>>> obj.member_search(blackholes=False)
- reset_default_returns(group_type='all')[source]¶
Reset the default returns for object dictionaries.
This function resets the default return quantities for CAESAR halo/galaxy/cloud objects including
mass
,radius
,sigma
,metallicity
, andtemperature
.- Parameters
obj (
main.CAESAR
) – Main CAESAR object.group_type ({'all', 'halo', 'galaxy', 'cloud'}, optional) – Group to reset return values for.
- save(filename)[source]¶
Save CAESAR file.
- Parameters
filename (str) – The name of the output file.
Examples
>>> obj.save('output.hdf5')
- set_default_cloud_returns(category, value)[source]¶
Set the default return quantity for a given cloud attribute.
- Parameters
category (str) – The attribute to redirect to a different quantity.
value (str) – The internal name of the new quantity which must be present in the dictinoary
- set_default_galaxy_returns(category, value)[source]¶
Set the default return quantity for a given galaxy attribute.
- Parameters
category (str) – The attribute to redirect to a different quantity.
value (str) – The internal name of the new quantity which must be present in the dictinoary
- set_default_halo_returns(category, value)[source]¶
Set the default return quantity for a given halo attribute.
- Parameters
category (str) – The attribute to redirect to a different quantity.
value (str) – The internal name of the new quantity which must be present in the dictinoary
- vtk_vis(**kwargs)[source]¶
Method to visualize an entire simulation with VTK.
- Parameters
obj (
main.CAESAR
) – Simulation object to visualize.ptypes (list) – List containing one or more of the following: ‘dm’,’gas’,’star’, which dictates which particles to render.
halo_only (boolean) – If True only render particles belonging to halos.
galaxy_only (boolean) – If True only render particles belonging to galaxies. Note that this overwrites
halo_only
.annotate_halos (boolean, list, int, optional) – Add labels to the render at the location of halos annotating the group ID and total mass. If True then all halos are annotated, if an integer list then halos of those indexes are annotated, and finally if an integer than the most massive N halos are annotated.
annotate_galaxies (boolean, list, int, optional) – Add labels to the render at the location of galaxies annotating the group ID and total mass. If True then all galaxies are annotated, if an integer list then galaxies of those indexes are annotated, and finally if an integer than the most massive N galaxies are annotated.
- property yt_dataset¶
The yt dataset to perform actions on.