rail.creation.engines.fsps_photometry_creator module
- class rail.creation.engines.fsps_photometry_creator.FSPSPhotometryCreator
Bases:
CreatorDerived class of Creator that generate synthetic photometric fsps_default_data from the rest-frame SED model generated with the FSPSSedModeler class. The user is required to provide galaxy redshifts and filter information in an .npy format for the code to run. The restframe SEDs are stored in a pickle file or passed as ModelHandle. Details of what each file should contain are explicited in config_options. The output is a Fits table containing magnitudes.
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
redshift_key ([str] default=redshifts) – Redshift keyword name of the hdf5 dataset containing rest-frame SEDs
restframe_sed_key ([str] default=restframe_seds) – Rest-frame SED keyword name of the hdf5 dataset containing rest-frame SEDs
restframe_wave_key ([str] default=wavelength) – Rest-frame wavelengths keyword name of thehdf5 dataset containing rest-frame SEDs
apparent_mags_key ([str] default=apparent_mags) – Apparent magnitudes keyword name of the output hdf5 dataset
filter_folder ([str] default=/home/docs/checkouts/readthedocs.org/user_builds/rail-hub/conda/stable/lib/python3.14/site-packages/rail/examples_data/creation_data/data/fsps_default_data/filters) – Folder containing filter transmissions
instrument_name ([str] default=lsst) – Instrument name as prefix to filter transmission files
wavebands ([str] default=u,g,r,i,z,y) – Comma-separated list of wavebands
filter_wave_key ([str] default=wave)
filter_transm_key: [str] default=transmission
- Om0: [float] default=0.3
Omega matter at current time
- Ode0: [float] default=0.7
Omega dark energy at current time
- w0: [float] default=-1
Dark energy equation-of-state parameter at current time
- wa: [float] default=0.0
Slope dark energy equation-of-state evolution with scale factor
- h: [float] default=0.7
Dimensionless hubble constant
- use_planck_cosmology: [bool] default=False
True to overwrite the cosmological parameters to their Planck2015 values
- physical_units: [bool] default=False
A parameter
msg: str] (default=False (True) for rest-frame spectra in units ofLsun/Hz (erg/s/Hz))
model: Hdf5Handle (INPUT)
output: Hdf5Handle (OUTPUT)
- __init__(args, **kwargs)
Initialize class. The _b and _c tuples for jax are composed of None or 0, depending on whether you don’t or do want the array axis to map over for all arguments. :param args: :param comm:
- default_files_folder = '/home/docs/checkouts/readthedocs.org/user_builds/rail-hub/conda/stable/lib/python3.14/site-packages/rail/examples_data/creation_data/data/fsps_default_data'
- entrypoint_function: str | None = 'sample'
- inputs = [('model', <class 'rail.core.data.Hdf5Handle'>)]
- interactive_function: str | None = 'fsps_photometry_creator'
- name = 'FSPSPhotometryCreator'
- outputs = [('output', <class 'rail.core.data.Hdf5Handle'>)]
- run()
This function computes apparent AB magnitudes in the provided wavebands for all the galaxies in the population having rest-frame SEDs computed by FSPS. It then stores apparent magnitudes, redshifts and running indices into an Hdf5Handle.
- sample(input_data, seed=None, **kwargs)
Creates observed magnitudes for the population of galaxies and stores them into an Hdf5Handle.
- Parameters:
input_data (Hdf5Handle) – Hdf5Handle containing the rest-frame SED models.
seed (int | None, optional) – The random seed to control sampling, by default None
- Returns:
Hdf5Handle storing the apparent magnitudes and redshifts of galaxies.
- Return type:
Notes
This method puts seed into the stage configuration data, which makes them available to other methods. It then calls the run method. Finally, the Hdf5Handle associated to the output tag is returned.