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.

ages

The age of each stellar particle/bin (particle/parametric).

Type:

Quantity

metallicities

The metallicity of each stellar particle/bin (particle/parametric).

Type:

Quantity

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

Parametric Young Stars Example

Parametric Young Stars Example

Photometry example

Photometry example

Plot spectra example

Plot spectra example

Image addition example

Image addition example

Create image example

Create image example

Plot delta_lambda for a grid.

Plot delta_lambda for a grid.

Demonstrate the dense basis approach for describing the SFZH

Demonstrate the dense basis approach for describing the SFZH

Plot equivalent width for UV indices

Plot equivalent width for UV indices

Generating Lines from a Parametric Galaxy

Generating Lines from a Parametric Galaxy

Generate parametric observed SED

Generate parametric observed SED

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

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

Generate parametric galaxy SED

Generate parametric galaxy SED

Compare SPS grid assignment methods

Compare SPS grid assignment methods

Compare parametric and particle SEDs

Compare parametric and particle SEDs

Create sampled SED

Create sampled SED

Plot line of sight optical depth calculations

Plot line of sight optical depth calculations

Plot line of sight diagnostics

Plot line of sight diagnostics

Rotating particle distributions

Rotating particle distributions

Compare Single star particle to instantaneous SFZH

Compare Single star particle to instantaneous SFZH