synthesizer.parametric.metal_dist

A module for creating and manipulating metallicity distributions.

NOTE: This module is imported as ZDist in parametric.__init__ enabling the

syntax shown below.

Example usage:

from synthesizer.parametric import ZDist

print(ZDist.parametrisations)

metal_dist = ZDist.DeltaConstant(…) metal_dist = ZDist.Normal(…)

metal_dist.get_dist_weight(metals)

Classes

class synthesizer.parametric.metal_dist.Common(name, **kwargs)[source]

The parent class for all ZDist parametrisations.

name

The name of this ZDist. This is set by the child and encodes the type of the metallicity distribution. Possible values are defined in parametrisations above.

Type:

string

parameters

A dictionary containing the parameters of the model.

Type:

dict

get_dist_weight(metal)[source]

Return the weight of the bin/s defined by metal.

Parameters:

metal (float/array-like, float) – The metallicity bin/s to evaluate.

Returns:

float

The weight at metal or each value in metal.

Examples using synthesizer.parametric.metal_dist.Common

Plot spectra example

Plot spectra example

Photometry example

Photometry example

Demonstrate the dense basis approach for describing the SFZH

Demonstrate the dense basis approach for describing the SFZH

Plot delta_lambda for a grid.

Plot delta_lambda for a grid.

Create image example

Create image example

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

Plot equivalent width for UV indices

Plot equivalent width for UV indices

Create sampled SED

Create sampled SED

Compare parametric and particle SEDs

Compare parametric and particle SEDs

Compare SPS grid assignment methods

Compare SPS grid assignment methods

Plot line of sight diagnostics

Plot line of sight diagnostics

Plot line of sight optical depth calculations

Plot line of sight optical depth calculations
class synthesizer.parametric.metal_dist.DeltaConstant(metallicity=None, log10metallicity=None)[source]

A single metallicity “distribution”.

metallicity_

The single (linear) metallicity for all stellar mass in the distribution.

Type:

float

log10metallicity_

The log base 10 of metallicity.

Type:

float

get_log10_metallicity(*args)[source]

Return the log base 10 of the single metallicity.

NOTE: DeltaConstant is a special case where get_dist_weight is not applicable because a single metallicity must always be rather than a weight.

Returns:

float

The log10(metallicity).

get_metallicity(*args)[source]

Return the single metallicity.

NOTE: DeltaConstant is a special case where get_dist_weight is not applicable because a single metallicity must always be rather than a weight.

Returns:

float

The metallicity.

Examples using synthesizer.parametric.metal_dist.DeltaConstant

Plot spectra example

Plot spectra example

Photometry example

Photometry example

Demonstrate the dense basis approach for describing the SFZH

Demonstrate the dense basis approach for describing the SFZH

Plot delta_lambda for a grid.

Plot delta_lambda for a grid.

Create image example

Create image example

Generating Lines from a Parametric Galaxy

Generating Lines from a Parametric Galaxy

Generate parametric observed SED

Generate parametric observed SED

Generate parametric galaxy SED

Generate parametric galaxy SED

Plot equivalent width for UV indices

Plot equivalent width for UV indices

Create sampled SED

Create sampled SED

Compare parametric and particle SEDs

Compare parametric and particle SEDs

Compare SPS grid assignment methods

Compare SPS grid assignment methods

Plot line of sight diagnostics

Plot line of sight diagnostics

Plot line of sight optical depth calculations

Plot line of sight optical depth calculations
class synthesizer.parametric.metal_dist.Normal(mean, sigma)[source]

A normally distributed metallicity distribution.

mean

The mean of the normal distribution.

Type:

float

sigma

The standard deviation of the normal distribution.

Type:

float

Examples using synthesizer.parametric.metal_dist.Normal

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.