rail.creation.engines.fsps_sed_modeler module
- class rail.creation.engines.fsps_sed_modeler.FSPSSedModeler
Bases:
ModelerDerived class of Modeler for creating a single galaxy rest-frame SED model using FSPS (Conroy08).
Only the most important parameters are provided via config_options. The remaining ones from FSPS can be provided when creating the rest-frame SED model.
Install FSPS with the following commands:
pip uninstall fsps git clone --recursive https://github.com/dfm/python-fsps.git cd python-fsps python -m pip install . export SPS_HOME=$(pwd)/src/fsps/libfsps
- 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.
chunk_size (int] (default=10000))
hdf5_groupname (str] (default=photometry))
compute_vega_mags ([bool] default=False) – True uses Vega magnitudes versus AB magnitudes
vactoair_flag ([bool] default=False) – If True, output wavelengths in air (rather than vac)
zcontinuous ([int] default=1) – Flag for interpolation in metallicity of SSP before CSP
add_agb_dust_model ([bool] default=True) – Turn on/off adding AGB circumstellar dust contribution to SED
add_dust_emission ([bool] default=True) – Turn on/off adding dust emission contribution to SED
add_igm_absorption ([bool] default=False) – Turn on/off adding IGM absorption contribution to SED
add_neb_emission ([bool] default=False) – Turn on/off nebular emission model based on Cloudy
add_neb_continuum ([bool] default=False) – Turn on/off nebular continuum component
add_stellar_remnants ([bool] default=True) – Turn on/off adding stellar remnants contribution to stellar mass
compute_light_ages ([bool] default=False) – If True then the returned spectra are actually light-weighted ages (in Gyr)
nebemlineinspec ([bool] default=False) – True to include emission line fluxes in spectrum
smooth_velocity ([bool] default=True) – True/False for smoothing in velocity/wavelength space
smooth_lsf ([bool] default=False) – True/False for smoothing SSPs by a wavelength dependent line spread function
cloudy_dust ([bool] default=False) – Switch to include dust in the Cloudy tables
agb_dust ([float] default=1.0) – Scales the circumstellar AGB dust emission
tpagb_norm_type ([int] default=2) – Flag for TP-AGB normalization scheme, default Villaume, Conroy, Johnson 2015 normalization
dell ([float] default=0.0) – Shift in log(L_bol) of the TP-AGB isochrones
delt ([float] default=0.0) – Shift in log(T_eff) of the TP-AGB isochrones
redgb ([float] default=1.0) – Modify weight given to RGB. Only available with BaSTI isochrone set
agb ([float] default=1.0) – Modify weight given to TP-AGB
fcstar ([float] default=1.0) – Fraction of stars that the Padova isochrones identify as Carbon stars
sbss ([float] default=0.0) – Specific frequency of blue straggler stars
fbhb ([float] default=0.0) – Fraction of horizontal branch stars that are blue
pagb ([float] default=1.0) – Weight given to the post–AGB phase
redshifts_key ([str] default=redshifts) – galaxy redshift, dataset keyword name
Z_met_key ([str] default=zmet) – The metallicity is specified as an integer ranging between 1 and nz. If zcontinuous > 0 then this parameter is ignored, dataset keyword name
stellar_metallicities_key ([str] default=stellar_metallicity) – galaxy stellar metallicities (log10(Z / Zsun)) dataset keyword name, to be used with zcontinuous > 0,dataset keyword name
pmetals_key ([str] default=pmetals) – The power for the metallicty distribution function,only used if zcontinous=2, dataset keyword name
imf_type ([int] default=1) – IMF type, see FSPS manual, default Chabrier IMF
imf_upper_limit ([float] default=120.0) – The upper limit of the IMF in solar masses
imf_lower_limit ([float] default=0.08) – The lower limit of the IMF in solar masses
imf1 ([float] default=1.3) – log slope of IMF in 0.08<M/Msun<0.5, if imf_type=2
imf2 ([float] default=2.3) – log slope of IMF in 0.5<M/Msun<1, if imf_type=2
imf3 ([float] default=2.3) – log slope of IMF in M/Msun>1, if imf_type=2
vdmc ([float] default=0.08) – IMF parameter defined in van Dokkum (2008). Only used if imf_type=3
mdave ([float] default=0.5) – IMF parameter defined in Dave (2008). Only used if imf_type=4.
evtype ([int] default=-1) – Compute SSPs for only the given evolutionary type. All phases used when set to -1.
use_wr_spectra ([int] default=1) – Turn on/off the WR spectral library
logt_wmb_hot ([float] default=0.0) – Use the Eldridge (2017) WMBasic hot star library above this value of log(T_eff) or 25,000K,whichever is larger
masscut ([float] default=150.0) – Truncate the IMF above this value
velocity_dispersions_key ([str] default=stellar_velocity_dispersion) – stellar velocity dispersions (km/s), dataset keyword name
min_wavelength (float] (default=250.0))
max_wavelength (float] (default=12000.0))
gas_ionizations_key ([str] default=gas_ionization) – gas ionization values dataset keyword name
gas_metallicities_key ([str] default=gas_metallicity) – gas metallicities (log10(Zgas / Zsun)) dataset keyword name
igm_factor ([float] default=1.0) – Factor used to scale the IGM optical depth
sfh_type ([int] default=0) – star-formation history type, see FSPS manual, default SSP
tau_key ([str] default=tau) – Defines e-folding time for the SFH, in Gyr. Only used if sfh=1 or sfh=4, dataset keyword name
const_key ([str] default=const) – Defines the constant component of the SFH, Only used if sfh=1 or sfh=4, dataset keyword name
sf_start_key ([str] default=sf_start) – Start time of the SFH, in Gyr. Only used if sfh=1 or sfh=4 or sfh=5, dataset keyword name
sf_trunc_key ([str] default=sf_trunc) – Truncation time of the SFH, in Gyr. Only used if sfh=1 or sfh=4 or sfh=5, dataset keyword name
stellar_ages_key ([str] default=stellar_age) – galaxy stellar ages (Gyr),dataset keyword name
fburst_key ([str] default=fburst) – Defines the fraction of mass formed in an instantaneous burst of star formation. Only used if sfh=1 or sfh=4,dataset keyword name
tburst_key ([str] default=tburst) – Defines the age of the Universe when the burst occurs. If tburst > tage then there is no burst. Only used if sfh=1 or sfh=4, dataset keyword name
sf_slope_key ([str] default=sf_slope) – For sfh=5, this is the slope of the SFR after time sf_trunc, dataset keyword name
dust_type ([int] default=2) – attenuation curve for dust type, see FSPS manual, default Calzetti
dust_tesc ([float] default=7.0) – Stars younger than dust_tesc are attenuated by both dust1 and dust2, while stars older are attenuated by dust2 only. Units are log(yrs)
dust_birth_cloud_key ([str] default=dust1_birth_cloud) – dust parameter describing young stellar light attenuation (dust1 in FSPS), dataset keyword name
dust_diffuse_key ([str] default=dust2_diffuse) – dust parameters describing old stellar light attenuation (dust2 in FSPS) dataset keyword name
dust_clumps ([int] default=-99) – Dust parameter describing the dispersion of a Gaussian PDF density distribution for the old dust. Setting this value to -99.0 sets the distribution to a uniform screen, values other than -99 are no longer supported
frac_nodust ([float] default=0.0) – Fraction of starlight that is not attenuated by the diffuse dust component
frac_obrun ([float] default=0.0) – Fraction of the young stars (age < dust_tesc) that are not attenuated by dust1 and that do not contribute to any nebular emission, representing runaway OB stars or escaping ionizing radiation. These stars are still attenuated by dust2.
dust_index_key ([str] default=dust_index) – Power law index of the attenuation curve. Only used when dust_type=0, dataset keyword name
dust_powerlaw_modifier_key ([str] default=dust_calzetti_modifier) – power-law modifiers to the shape of the Calzetti et al. (2000) attenuation curve (dust1_index),dataset keyword name
mwr_key ([str] default=mwr) – The ratio of total to selective absorption which characterizes the MW extinction curve: RV=AV/E(B-V), used when dust_type=1,dataset keyword name
uvb_key ([str] default=uvb) – Parameter characterizing the strength of the 2175A extinction feature with respect to the standard Cardelli et al. determination for the MW. Only used when dust_type=1,dataset keyword name
wgp1_key ([str] default=wgp1) – Integer specifying the optical depth in the Witt & Gordon (2000) models. Values range from 1 − 18, used only whendust_type=3, dataset keyword name
wgp2 ([int] default=1) – Integer specifying the type of large-scale geometry and extinction curve. Values range from 1-6, used only when dust_type=3
wgp3 ([int] default=1) – Integer specifying the local geometry for the Witt & Gordon (2000) dust models, used only when dust_type=3
dust_emission_gamma_key ([str] default=dust_gamma) – Relative contributions of dust heated at Umin, parameter of Draine and Li (2007) dust emission modeldataset keyword name
dust_emission_umin_key ([str] default=dust_umin) – Minimum radiation field strengths, parameter of Draine and Li (2007) dust emission model, dataset keyword name
dust_emission_qpah_key ([str] default=dust_qpah) – Grain size distributions in mass in PAHs, parameter of Draine and Li (2007) dust emission model,dataset keyword name
fraction_agn_bol_lum_key ([str] default=f_agn) – Fractional contributions of AGN wrt stellar bolometric luminosity, dataset keyword name
agn_torus_opt_depth_key ([str] default=tau_agn) – Optical depths of the AGN dust torii dataset keyword name
tabulated_sfh_key ([str] default=tabulated_sfh) – tabulated SFH dataset keyword name
tabulated_lsf_key ([str] default=tabulated_lsf) – tabulated LSF dataset keyword name
physical_units ([bool] default=False) – False (True) for rest-frame spectra in units ofLsun/Hz (erg/s/Hz)
restframe_wave_key ([str] default=restframe_wavelengths) – Rest-frame wavelength keyword name of the output hdf5 dataset
restframe_sed_key ([str] default=restframe_seds) – Rest-frame SED keyword name of the output hdf5 dataset
input (Hdf5Handle (INPUT))
model (Hdf5Handle (OUTPUT))
- __init__(args, **kwargs)
This function initializes the FSPSSedModeler class and checks that the provided parameters are within the allowed ranges.
- Parameters:
args
comm
- entrypoint_function: str | None = 'fit_model'
- fit_model(input_data, **kwargs)
This function creates rest-frame SED models from an input galaxy population catalog.
- Parameters:
input_data (Hdf5Handle) – This is the input catalog in the form of an Hdf5Handle.
- Returns:
ModelHandle storing the rest-frame SED models
- Return type:
- inputs = [('input', <class 'rail.core.data.Hdf5Handle'>)]
- interactive_function: str | None = 'fsps_sed_modeler'
- name = 'FSPSSedModeler'
- outputs = [('model', <class 'rail.core.data.Hdf5Handle'>)]
- run()
Run method. It Calls StellarPopulation from FSPS to create a galaxy rest-frame SED. Thanks to Josue de Santiago, this function is able to run in parallel via mpi by splitting the full sample in chunks of user-defined size.