py21cmfast.drivers.lightcone.LightCone¶
- class py21cmfast.drivers.lightcone.LightCone¶
A full Lightcone with all associated evolved data.
- Variables:
lightcone_distances (units.Quantity) – The comoving distance to each cell in the lightcones.
inputs (InputParameters) – The input parameters corresponding to the lightcones.
lightcones (dict[str, np.ndarray]) – Lightcone arrays, each of shape (N, N, Nz).
global_quantities (dict[str, np.ndarray] | None) – Arrays of length node_redshifts containing the mean field across redshift.
photon_nonconservation_data (dict) – Data defining the conservation hack for photons.
_last_completed_node (int) – Since the lightcone is filled up incrementally, this keeps track of the index of the last completed node redshift that has been added to the lightcone.
_last_completed_lcidx (int) – In conjunction with _last_completed_node, this keeps track of the index that has been filled up in the lightcone (recalling that the lightcone has multiple redshifts in between each node redshift). While in principle this can be computed from _last_completed_node, it is much more efficient to keep track of it manually.
- __eq__(other)¶
Determine if this is equal to another object.
- classmethod from_file(path, safe=True, remove_buffer=True)¶
Create a new instance from a saved lightcone on disk.
- Parameters:
path (str | pathlib.Path)
safe (bool)
remove_buffer (bool)
- Return type:
Self
- classmethod get_fields(inputs)¶
Get a list of the names of the available fields in the simulation.
- Parameters:
- Return type:
tuple
- make_checkpoint(path, lcidx, node_index)¶
Write updated lightcone data to file.
- Parameters:
path (str | pathlib.Path)
lcidx (int)
node_index (int)
- save(path, clobber=False, lowz_buffer_pixels=0, highz_buffer_pixels=0)¶
Save the lightcone object to disk.
- Parameters:
path (str | pathlib.Path)
lowz_buffer_pixels (int)
highz_buffer_pixels (int)
- trim(mind, maxd)¶
Create a new lightcone box containing only the desired distances range.
- Parameters:
mind (astropy.units.Quantity)
maxd (astropy.units.Quantity)
- Return type:
Self
- property astro_options¶
Flag Options shared by all datasets.
- property astro_params¶
Astro params shared by all datasets.
- property cell_size: float¶
Cell size [Mpc] of the lightcone voxels.
- Return type:
float
- property cosmo_params¶
Cosmo params shared by all datasets.
- global_quantities: dict[str, numpy.ndarray] | None¶
- property lightcone_coords: tuple[float, float, float]¶
Co-ordinates [Mpc] of each slice along the redshift axis.
- Return type:
tuple[float, float, float]
- property lightcone_dimensions: tuple[float, float, float]¶
Lightcone size over each dimension – tuple of (x,y,z) in Mpc.
- Return type:
tuple[float, float, float]
- lightcone_distances: astropy.units.Quantity¶
- property lightcone_redshifts: numpy.ndarray¶
Redshift of each cell along the redshift axis.
- Return type:
numpy.ndarray
- lightcones: dict[str, numpy.ndarray]¶
- property matter_options¶
Matter flags shared by all datasets.
- property n_slices: int¶
Number of redshift slices in the lightcone.
- Return type:
int
- photon_nonconservation_data: dict¶
- property random_seed¶
Random seed shared by all datasets.
- property shape: tuple[int, int, int]¶
Shape of the lightcone as a 3-tuple.
- Return type:
tuple[int, int, int]
- property simulation_options¶
Matter params shared by all datasets.