skypy.galaxies.spectrum.dirichlet_coefficients(redshift, alpha0, alpha1, z1=1.0, weight=None)[source] [edit on github]

Dirichlet-distributed SED coefficients.

Spectral coefficients to calculate the rest-frame spectral energy

distribution of a galaxy following the Herbel et al. model in [1].

redshift(nz,) array_like

The redshift values of the galaxies for which the coefficients want to be sampled.

alpha0, alpha1(nc,) array_like

Factors parameterising the Dirichlet distribution according to Equation (3.9) in [1].

z1float or scalar, optional

Reference redshift at which alpha = alpha1. The default value is 1.0.

weight(nc,) array_like, optional

Different weights for each component.

coefficients(nz, nc) ndarray

The spectral coefficients of the galaxies. The shape is (n, nc) with nz the number of redshifts and nc the number of coefficients.


One example is the rest-frame spectral energy distribution of galaxies which can be written as a linear combination of the five kcorrect [2] template spectra \(f_i\) (see [1])

\[f(\lambda) = \sum_{i=1}^5 c_i f_i(\lambda) \;,\]

where the coefficients \(c_i\) were shown to follow a Dirichlet distribution of order 5. The five parameters describing the Dirichlet distribution are given by

\[\alpha_i(z) = (\alpha_{i,0})^{1-z/z_1} \cdot (\alpha_{i,1})^{z/z_1} \;.\]

Here, \(\alpha_{i,0}\) describes the galaxy population at redshift \(z=0\) and \(\alpha_{i,1}\) the population at \(z=z_1 > 0\). These parameters depend on the galaxy type and we chose \(z_1=1\).

Beside this example, this code works for a general number of templates.



Herbel J., Kacprzak T., Amara A. et al., 2017, Journal of Cosmology and Astroparticle Physics, Issue 08, article id. 035 (2017)


Blanton M. R., Roweis S., 2007, The Astronomical Journal, Volume 133, Page 734