synthesizer.components.stellar¶
A module defining general functionality for particle and parametric stars.
This should never be directly instantiated. Instead it is the parent class for particle.Stars and parametric.Stars and contains attributes and methods common between them. StarsComponent is a child class of Component.
Classes
- class synthesizer.components.stellar.StarsComponent(ages, metallicities, _star_type, fesc, fesc_ly_alpha=None, **kwargs)[source]¶
The parent class for stellar components of a galaxy.
This class contains the attributes and spectra creation methods which are common to both parametric and particle stellar components.
This should never be instantiated directly.
- fesc_ly_alpha¶
The escape fraction of the component for Lyman Alpha photons.
- Type:
float
- get_flux_weighted_age(spectra_type, filter_code)[source]¶
Calculate the flux-weighted age of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- flux_weighted_age (unyt_quantity)
The flux-weighted age of the stellar component.
- get_flux_weighted_metallicity(spectra_type, filter_code)[source]¶
Calculate the flux-weighted metallicity of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- flux_weighted_metallicity (unyt_quantity)
The flux-weighted metallicity of the stellar component.
- get_flux_weighted_optical_depth(spectra_type, filter_code)[source]¶
Calculate the flux-weighted optical depth of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- flux_weighted_tau_v (unyt_quantity)
The flux-weighted optical depth of the stellar component.
- get_lum_weighted_age(spectra_type, filter_code)[source]¶
Calculate the luminosity-weighted age of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- lum_weighted_age (unyt_quantity)
The luminosity-weighted age of the stellar component.
- get_lum_weighted_metallicity(spectra_type, filter_code)[source]¶
Calculate the luminosity-weighted metallicity of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- lum_weighted_metallicity (unyt_quantity)
The luminosity-weighted metallicity of the stellar component.
- get_lum_weighted_optical_depth(spectra_type, filter_code)[source]¶
Calculate the luminosity-weighted optical depth of the stars.
- Parameters:
spectra_type (str) – The type of spectra to use for weighting.
filter_code (str) – The filter code to use for weighting.
- Returns:
- lum_weighted_tau_v (unyt_quantity)
The luminosity-weighted optical depth of the stellar component.
- get_mass_weighted_age()[source]¶
Calculate the mass-weighted age of the stellar component.
- Returns:
- mass_weighted_age (unyt_quantity)
The mass-weighted age of the stellar component.
- get_mass_weighted_metallicity()[source]¶
Calculate the mass-weighted metallicity of the stellar component.
- Returns:
- mass_weighted_metallicity (unyt_quantity)
The mass-weighted metallicity of the stellar component.
- get_mass_weighted_optical_depth()[source]¶
Calculate the mass-weighted optical depth of the stellar component.
- Returns:
- mass_weighted_tau_v (unyt_quantity)
The mass-weighted optical depth of the stellar component.
- property log10ages¶
Return stellar particle ages in log (base 10).
- Returns:
- log10ages (array)
log10 stellar ages
- property log10metallicities¶
Return stellar particle metallicities in log (base 10).
- Returns:
- log10metallicities (array)
log10 stellar metallicities
Examples using synthesizer.components.stellar.StarsComponent
¶

Demonstrate the dense basis approach for describing the SFZH

An example showing how to scale a galaxy’s mass by luminosity/flux.

Compare Single star particle to instantaneous SFZH