synthesizer.parametric.sf_hist¶
A module for creating and manipulating star formation histories.
- NOTE: This module is imported as SFH in parametric.__init__ enabling the syntax
shown below.
Example usage:
from synthesizer.parametric import SFH
print(SFH.parametrisations)
sfh = SFH.Constant(…) sfh = SFH.Exponential(…) sfh = SFH.LogNormal(…)
sfh.calculate_sfh()
Classes
- class synthesizer.parametric.sf_hist.Common(name, **kwargs)[source]¶
The parent class for all SFH parametrisations.
- name¶
The name of this SFH. This is set by the child and encodes the type of the SFH. Possible values are defined in parametrisations above.
- Type:
string
- parameters¶
A dictionary containing the parameters of the model.
- Type:
dict
- calculate_mean_age(t_range=(0, 10000000000), dt=1000000)[source]¶
Calcualte the median age of a given star formation history.
- Parameters:
t_range (tuple, float) – The age limits over which to calculate the SFH.
dt (float) – The interval between age bins.
- Returns:
- t (array-like, float)
The age bins.
- sfh (array-like, float)
The SFH.
- calculate_median_age(t_range=(0, 10000000000), dt=1000000)[source]¶
Calcualte the median age of a given star formation history.
- Parameters:
t_range (tuple, float) – The age limits over which to calculate the SFH.
dt (float) – The interval between age bins.
- Returns:
- t (array-like, float)
The age bins.
- sfh (array-like, float)
The SFH.
- calculate_sfh(t_range=(0, 10000000000), dt=1000000)[source]¶
Calcualte the age of a given star formation history.
- Parameters:
t_range (tuple, float) – The age limits over which to calculate the SFH.
dt (float) – The interval between age bins.
- Returns:
- t (array-like, float)
The age bins.
- sfh (array-like, float)
The SFH in units of 1 / yr.
Examples using synthesizer.parametric.sf_hist.Common
¶
![](../_images/sphx_glr_plot_scale_by_luminosity_thumb.png)
An example showing how to scale a galaxy’s mass by luminosity/flux.
Examples using synthesizer.parametric.sf_hist.Constant
¶
![](../_images/sphx_glr_plot_scale_by_luminosity_thumb.png)
An example showing how to scale a galaxy’s mass by luminosity/flux.
- class synthesizer.parametric.sf_hist.DelayedExponentiallyDeclining(initial_age, tau)[source]¶
A delayed exponentially declining star formation history.
This is effectively the same as ExponentiallyDeclining with an overloaded _sfr method.
- tau¶
The “stretch” parameter of the exponential.
- Type:
float
- initial_age¶
The “start age” of the exponential, i.e. the age where star formation is maximal.
- Type:
unyt_quantity
- class synthesizer.parametric.sf_hist.DoublePowerLaw(tau, alpha, beta)[source]¶
A double power law star formation history.
- tau¶
The normalisation of age before raising to the powers.
- Type:
float
- alpha¶
The first power.
- Type:
float
- beta¶
The second power.
- Type:
float
- class synthesizer.parametric.sf_hist.Exponential(tau)[source]¶
An exponential star formation history.
- tau¶
The “stretch” parameter of the exponential.
- Type:
float
- class synthesizer.parametric.sf_hist.ExponentiallyDeclining(initial_age, tau, name=None)[source]¶
An exponentially declining star formation history
- tau¶
The “stretch” parameter of the exponential.
- Type:
float
- initial_age¶
The “start age” of the exponential, i.e. the age where star formation is maximal.
- Type:
unyt_quantity
- class synthesizer.parametric.sf_hist.LogNormal(tau, peak_age, max_age)[source]¶
A log-normal star formation history.
- tau¶
The dimensionless “width” of the log normal distribution.
- Type:
float
- peak_age¶
The peak of the log normal distribution.
- Type:
float
- max_age¶
The maximum age of the log normal distribution.
- Type:
float
- class synthesizer.parametric.sf_hist.TruncatedExponential(tau, max_age)[source]¶
A truncated exponential star formation history.
- tau¶
The “stretch” parameter of the exponential.
- Type:
unyt_quantity
- max_age¶
The age at which the exponential is truncated. Above this age the SFR is 0.
- Type:
unyt_quantity