galsbi.ucat_sps package
Subpackages
- galsbi.ucat_sps.config package
- galsbi.ucat_sps.galaxy_population_models package
- Submodules
- galsbi.ucat_sps.galaxy_population_models.galaxy_agn module
- galsbi.ucat_sps.galaxy_population_models.galaxy_dust_attenuation module
- galsbi.ucat_sps.galaxy_population_models.galaxy_dust_emission module
- galsbi.ucat_sps.galaxy_population_models.galaxy_gas_ionization module
- galsbi.ucat_sps.galaxy_population_models.light_profile module
- galsbi.ucat_sps.galaxy_population_models.galaxy_metallicity_history module
- galsbi.ucat_sps.galaxy_population_models.galaxy_size module
- galsbi.ucat_sps.galaxy_population_models.galaxy_star_formation_history module
- galsbi.ucat_sps.galaxy_population_models.galaxy_stellar_mass_function module
NumGalCalculatorRedshiftSMSamplerStellarMassFunctiondouble_stellar_mass_function_parametrisation()find_closest_ind()initialize_stellar_mass_functions()maximum_redshift()single_stellar_mass_function_parametrisation()stellar_mass_function_m_star()stellar_mass_function_phi_star()upper_inc_gamma()
- galsbi.ucat_sps.galaxy_population_models.galaxy_velocity_dispersion module
- Module contents
- galsbi.ucat_sps.plugins package
Submodules
galsbi.ucat_sps.spectrum_util_sps module
- galsbi.ucat_sps.spectrum_util_sps.apply_extinction(spectra, observed_wavelengths, excess_b_v, extinction_spline)[source]
This function applies Milky Way extinction to galaxy spectra.
- Parameters:
spectra – (array_like[n_gal, n_lambda]) input spectra.
observed_wavelengths – (array_like[n_gal, n_lambda]) observed- frame wavelengths array.
excess_b_v – (array_like[n_gal,]) E(B-V) Milky Way extinction.
extinction_spline – (obj) scipy InterpolatedUnivariateSpline object.
- Return ext_spectra:
(array_like[n_gal, n_lambda]) extincted spectra.
- galsbi.ucat_sps.spectrum_util_sps.apply_velocity_broadening(spectra, lam, sigma_smooth, min_wave=3000, max_wave=20000)[source]
This function applies velocity broadening to the spectra based on the velocity dispersion sampled from GalSBI.
- Parameters:
spectra – (array_like[n_gal, n_lambda]) input spectra.
lam – (array_like[n_lambda,]) rest-frame wavelength array.
sigma_smooth – (array_like[n_gal,]) Velocity dispersions in km/s.
min_wave – (float) Minimum wavelength.
max_wave – (float) Maximum wavelength.
- Return vel_disp_smooth_spectra:
(array_like[n_gal, n_lambda]) Velocity dispersion smoothed spectra.
- galsbi.ucat_sps.spectrum_util_sps.compute_Temple21_AGN_contributions(par, rest_frame_fluxes_erg_s_A, rest_frame_wave_A, fagn, redshift)[source]
This function computes the quasar spectra from the Temple+21 AGN templates. As specified in the paper and through private communication, we compute the AGN bolometric luminosity as fraction fagn of the galaxy bolometric luminosity and apply simple prescription to compute the luminosity at 3000 Å and the absolute magnitude in the i-band. These quantities are needed for qsogen package to work.
- Parameters:
par – (obj) par objects containing the Ucat parameters.
rest_frame_fluxes_erg_s_A – (array_like[n_gal, n_lambda]) galaxy rest-frame flux in erg/s/Å from ProSpect.
rest_frame_wave_A – (array_like[n_lambda,]) rest-frame wavelength array in Ångstrom.
fagn – (array_like[n_gal,]) fraction of AGN luminosity sampled from GalSBI-SPS.
redshift – (array_like[n_gal,]) galaxy redshift.
- Return quasar_fluxes_erg_s_cm2_A:
(array_like[n_gal, n_lambda]) quasar observed-frame flux in erg/s/cm2/Å.
galsbi.ucat_sps.sps_sed_generator module
- class galsbi.ucat_sps.sps_sed_generator.MagnitudeGenerator(par)[source]
Bases:
objectClass to generate magnitudes using SPS models.
It will contain ProSpect, magnitude emulator and spectra emulator.
- galsbi.ucat_sps.sps_sed_generator.compute_ab_magnitudes(par, obs_frame_waves_A, obs_frame_fluxes_erg_s_cm2_A)[source]
This function computes AB magnitudes by integrating galaxy observed- frame SEDs in units of erg/s/cm2/Å.
- Parameters:
par – (obj) par objects containing the Ucat parameters.
obs_frame_waves_A – (array_like[n_gal, n_lambda]) observed- frame wavelengths array in Ångstrom.
obs_frame_fluxes_erg_s_cm2_A – (array_like[n_gal, n_lambda]) observed-frame fluxes array in erg/s/cm2/Å.
- Return obs_mags:
(array_like[n_gal, n_bands]) observed-frame AB magnitudes.
- galsbi.ucat_sps.sps_sed_generator.get_magnitudes_with_ProSpect(par, z, mSFR, mpeak, mperiod, mskew, Zgas_final, logU, fagn, dust_attenuation_params, excess_b_v, dust_emission_params=None, vel_disp=None, ssp_library_filepath=None, filter_names=None, cosmology=None, log10_stellar_mass=None)[source]
This function returns AB magnitudes for the galaxies sampled in GalSBI- SPS. It computes rest-frame SEDs with ProSpect, applies velocity broadening, adds the AGN component, applies Milky Way extinction, and integrates in the filter bands.
- Parameters:
par – (obj) par objects containing the Ucat parameters.
z – (array_like[n_gal,]) galaxy redshift.
mSFR – (array_like[n_gal, ]) mSFR parameter for the massfunc_snorm_trunc function in ProSpect in Msun/yr.
mpeak – (array_like[n_gal, ]) mpeak parameter for the massfunc_snorm_trunc function in ProSpect in Gyr.
mperiod – (array_like[n_gal, ]) mperiod parameter for the massfunc_snorm_trunc function in ProSpect.
mskew – (array_like[n_gal, ]) mskew parameter for the massfunc_snorm_trunc function in ProSpect.
Zgas_final – (array_like[n_gal, ]) gas-phase metallicity at the time of observation.
logU – (array_like[n_gal, ]) gas ionisation parameter.
vel_disp – (array_like[n_gal, ]) velocity dispersion in km/s.
fagn – (array_like[n_gal, ]) fraction of AGN luminosity sampled from GalSBI-SPS.
dust_attenuation_params – (array_like[n_gal,3]) dust attenuation parameters for the tau_birth and tau_screen parameters in ProSpect.
excess_b_v – (array_like[n_gal, ]) E(B-V) Milky Way extinction.
dust_emission_params – (array_like[n_gal,2]) dust emission parameters for the alpha_SF_birth and alpha_SF_screen parameters in ProSpect.
ssp_library_filepath – (str) Filepath to the SSP library generated with ProGeny.
filter_names – (list) filter names recognized by ProSpect.
cosmology – (obj) PyCosmo cosmology object.
log10_stellar_mass – (array_like[n_gal, ]) log10 stellar mass. Not used in this function, but needed for emulator.
- Return rest_mags:
(array_like[n_gal, n_bands]) rest-frame AB magnitudes.
- Return obs_mags:
(array_like[n_gal, n_bands]) observed-frame AB magnitudes.
- galsbi.ucat_sps.sps_sed_generator.get_magnitudes_with_emulator(par, z, mSFR, mpeak, mperiod, mskew, Zgas_final, logU, fagn, dust_attenuation_params, excess_b_v, dust_emission_params=None, vel_disp=None, ssp_library_filepath=None, filter_names=None, cosmology=None, log10_stellar_mass=None)[source]
This function returns AB observed-frame and rest-frame magnitudes using the ProMage emulator trained on ProSpect outputs. Rest-frame magnitudes refer to the host galaxy only, without AGN contribution.
- Parameters:
par – (obj) par objects containing the Ucat parameters.
z – (array_like[n_gal,]) galaxy redshift.
mSFR – (array_like[n_gal,]) mSFR parameter for the massfunc_snorm_trunc function in ProSpect in Msun/yr.
mpeak – (array_like[n_gal,]) mpeak parameter for the massfunc_snorm_trunc function in ProSpect in Gyr.
mperiod – (array_like[n_gal,]) mperiod parameter for the massfunc_snorm_trunc function in ProSpect.
mskew – (array_like[n_gal,]) mskew parameter for the massfunc_snorm_trunc function in ProSpect.
Zgas_final – (array_like[n_gal,]) gas-phase metallicity at the time of observation.
logU – (array_like[n_gal,]) gas ionisation parameter.
fagn – (array_like[n_gal,]) fraction of AGN luminosity sampled from GalSBI-SPS.
dust_attenuation_params – (array_like[n_gal,3]) dust attenuation parameters for the tau_birth and tau_screen parameters in ProSpect.
excess_b_v – (array_like[n_gal,]) E(B-V) Milky Way extinction.
dust_emission_params – (array_like[n_gal,2]) dust emission parameters for the alpha_SF_birth and alpha_SF_screen parameters in ProSpect.
vel_disp – (array_like[n_gal,]) velocity dispersion in km/s. Not needed in this function, but used in ProSpect.
ssp_library_filepath – (str) Filepath to the SSP library generated with ProGeny. Not needed in this function, but used in ProSpect.
filter_names – (list) filter names recognized by ProSpect. Not needed in this function, but used in ProSpect.
cosmology – (obj) PyCosmo cosmology object. Not needed in this function, but used in ProSpect.
log10_stellar_mass – (array_like[n_gal,]) log10 stellar mass.
- Return rest_mags:
(array_like[n_gal,n_bands]) emulated rest-frame AB magnitudes.
- Return obs_mags:
(array_like[n_gal,n_bands]) emulated observed-frame AB magnitudes.