synthesizer.load_data.load_scsam¶
A submodule for loading SC-SAM data into Synthesizer.
Currently implemented are loading methods for - SC-SAM (using a parametric method) - SC-SAM (using a particle method)
Functions
- synthesizer.load_data.load_scsam.load_SCSAM(fname, method, grid=None, verbose=False, dtype=<class 'numpy.float64'>)[source]¶
Read an SC-SAM star formation data file.
Returns a list of galaxy objects, halo indices, and birth halo IDs. Adapted from code by Aaron Yung.
- Parameters:
fname (str) – The SC-SAM star formation data file to be read.
method (str) – ‘particle’, ‘parametric_NNI’ or ‘parametric_RGI’, depending on how you wish to model your SFZH. ‘particle’ treats each age-Z bin as a particle. ‘parametric_NNI’ uses scipy’s nearest ND interpolator to interpolate the grid for a parametric SFH ‘parametric_RGI’ uses scipy’s regular grid interpolator to interpolate the grid for a parametric SFH.
grid (grid object) – Grid object to extract from (needed for parametric galaxies).
verbose (bool) – Are we talking?
dtype (type) – The numpy dtype to cast all numerical particle arrays to. Defaults to np.float64 to match standard SPS grids. Set to np.float32 (with Grid(use_precision=np.float32)) to reduce memory.