rubix package#
Subpackages#
- rubix.core package
- rubix.cosmology package- Submodules
- rubix.cosmology.base module- BaseCosmology- BaseCosmology.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
Submodules#
rubix.debug module#
rubix.logger module#
rubix.paths module#
rubix.utils module#
- rubix.utils.SFTtoAge(a)[source]#
- Convert scale factor to age in Gyr. - The lookback time is calculated as the difference between current age of the universe and the age at redshift z=1/a - 1. - This hence gives the age of the star formed at redshift z=1/a - 1. - Parameters:
- a (float) – scale factor 
- Returns:
- Age in Gyr. 
 
- rubix.utils.convert_values_to_physical(value, a, a_scale_exponent, hubble_param, hubble_scale_exponent, CGS_conversion_factor)[source]#
- Convert values from cosmological simulations to physical units Source: https://kateharborne.github.io/SimSpin/examples/generating_hdf5.html#attributes - 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 
 
- 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)[source]#
- Get the configuration of the pipeline with the given name. - Parameters:
- name (str) – The name of the pipeline 
- Returns:
- The configuration of the pipeline as a dictionary. 
 
- rubix.utils.load_galaxy_data(path_to_file: str)[source]#
- load_galaxy_data Load galaxy data from a file - Parameters:
- path_to_file (str) – path to the file to load 
- Raises:
- RuntimeError – When an error occurs during loading 
- Returns:
- Either the loaded galaxy data, or an empty dictionary if an error occured. 
 - Example - >>> from rubix.utils import load_galaxy_data >>> galaxy_data = load_galaxy_data("path/to/file.hdf5") 
