synthesizer.load_data.utils¶
Utilities for data loading methods
Functions
- synthesizer.load_data.utils.age_lookup_table(cosmo, redshift=0.0, delta_a=0.001, low_lim=0.0001)[source]¶
Create a look-up table for age as a function of scale factor.
Defaults to start at the lower resolution limit (delta_a), and proceeds in steps of delta-a until the scale factor given by the input redshift minus the low_lim.
- Parameters:
cosmo (astropy.cosmology) – astropy cosmology object
redshift (float) – redshift of the snapshot
delta_a (int) – scale factor resolution to approximate
low_lim (float) – lower limit of scale factor
- Returns:
- scale_factor (array)
array of scale factors
- age (array)
array of ages (Gyr)
Examples using synthesizer.load_data.utils.age_lookup_table
¶
- synthesizer.load_data.utils.get_len(Length)[source]¶
Find the beginning and ending indices from a length array
- Parameters:
Length (array) – array of number of particles
- Returns:
- begin (array)
beginning indices
- end (array)
ending indices
- synthesizer.load_data.utils.lookup_age(scale_factor, scale_factors, ages)[source]¶
Look up the age given a scale factor
- Parameters:
scale_factor (array.float) – scale factors to convert to ages
scale_factors (array) – array of lookup scale factors
ages (array) – array of lookup ages
- Returns:
- age (float)
age of galaxy