rubix package#
Subpackages#
- rubix.core package
- Submodules
- rubix.core.cosmology module
- rubix.core.data module
- rubix.core.ifu module
- rubix.core.lsf module
- rubix.core.noise module
- rubix.core.pipeline module
- rubix.core.psf module
- rubix.core.rotation module
- rubix.core.ssp module
- rubix.core.telescope module
- Module contents
- rubix.cosmology package
- Submodules
- rubix.cosmology.base module
BaseCosmologyBaseCosmology.Om0BaseCosmology.w0BaseCosmology.waBaseCosmology.hBaseCosmology.age_at_z()BaseCosmology.age_at_z0()BaseCosmology.angular_diameter_distance_to_z()BaseCosmology.angular_scale()BaseCosmology.comoving_distance_to_z()BaseCosmology.distance_modulus_to_z()BaseCosmology.lookback_to_z()BaseCosmology.luminosity_distance_to_z()BaseCosmology.scale_factor_to_redshift()
- rubix.cosmology.utils module
- Module contents
- rubix.galaxy package
- rubix.pipeline package
- rubix.spectra package
- rubix.telescope package
- Subpackages
- Submodules
- rubix.telescope.apertures module
- rubix.telescope.base module
BaseTelescopeBaseTelescope.fovBaseTelescope.spatial_resBaseTelescope.wave_rangeBaseTelescope.wave_resBaseTelescope.lsf_fwhmBaseTelescope.signal_to_noiseBaseTelescope.sbinBaseTelescope.aperture_regionBaseTelescope.pixel_typeBaseTelescope.wave_seqBaseTelescope.wave_edgesBaseTelescope.aperture_regionBaseTelescope.fovBaseTelescope.lsf_fwhmBaseTelescope.pixel_typeBaseTelescope.sbinBaseTelescope.signal_to_noiseBaseTelescope.spatial_resBaseTelescope.wave_edgesBaseTelescope.wave_rangeBaseTelescope.wave_resBaseTelescope.wave_seq
- rubix.telescope.factory module
- rubix.telescope.utils module
- Module contents
Submodules#
rubix.debug module#
rubix.logger module#
rubix.paths module#
rubix.utils module#
- rubix.utils.SFTtoAge(a: float) float[source]#
Convert a scale factor to a stellar age in Gyr.
The lookback time is calculated as the difference between the current age of the universe and the age at redshift $z = 1/a - 1$, giving the time since the formation of a star with scale factor $a$.
- Parameters:
a (float) – Scale factor
- Returns:
Age in Gyr
- Return type:
float
- rubix.utils.convert_values_to_physical(value: float, a: float, a_scale_exponent: float, hubble_param: float, hubble_scale_exponent: float, CGS_conversion_factor: float) float[source]#
Convert values from cosmological simulations to physical units Source:
- Parameters:
value (float) – Value from Simulation Parameter to be converted
a (float) – Scale factor, given as 1/(1+z)
a_scale_exponent (float) – Exponent of the scale factor
hubble_param (float) – Hubble parameter
hubble_scale_exponent (float) – Exponent of the Hubble parameter
CGS_conversion_factor (float) – Conversion factor to CGS units
- Returns:
Value in physical units
- Return type:
float
- rubix.utils.get_config(config: str | Dict) Dict[source]#
Get the configuration from a file or a dictionary.
- Parameters:
config (Union[str, Dict]) – The configuration as a file path or a dictionary
- Returns:
The configuration as a dictionary.
- rubix.utils.get_pipeline_config(name: str) Dict[str, Any][source]#
Get the configuration of a pipeline by name.
- Parameters:
name (str) – The name of the pipeline to look up
- Raises:
ValueError – If the requested pipeline is not defined
- Returns:
The configuration dictionary for the pipeline
- Return type:
Dict[str, Any]
- rubix.utils.load_galaxy_data(path_to_file: str) Tuple[Dict[str, Any], Dict[str, Any]][source]#
Load galaxy data and unit metadata from an HDF5 file.
- Parameters:
path_to_file (str) – Path to the HDF5 file to load
- Raises:
FileNotFoundError – If the file cannot be found
- Returns:
Galaxy data and associated units
- Return type:
Tuple[Dict[str, Any], Dict[str, Any]]
Example
>>> from rubix.utils import load_galaxy_data >>> galaxy_data, units = load_galaxy_data("path/to/file.hdf5")