SpectrumTemplates

class skypy.utils.photometry.SpectrumTemplates[source] [edit on github]

Bases: object

Base class for composite galaxy spectra from a set of basis templates

Methods Summary

absolute_magnitudes(coefficients, filters[, ...])

Galaxy AB absolute magnitudes from template spectra.

apparent_magnitudes(coefficients, redshift, ...)

Galaxy AB apparent magnitudes from template spectra.

Methods Documentation

absolute_magnitudes(coefficients, filters, stellar_mass=None)[source] [edit on github]

Galaxy AB absolute magnitudes from template spectra.

This function calculates photometric AB absolute magnitudes for galaxies whose spectra are modelled as a linear combination of a set of template spectra.

Parameters:
coefficients(ng, nt) array_like

Array of spectrum coefficients.

filtersstr or list of str

Bandpass filter specification for load_filters.

stellar_mass(ng,) array_like, optional

Optional array of stellar masses for each galaxy in template units.

Returns:
magnitudes(ng, nf) array_like

The absolute AB magnitude of each object in each filter, where nf is the number of loaded filters.

apparent_magnitudes(coefficients, redshift, filters, cosmology, *, stellar_mass=None, resolution=1000)[source] [edit on github]

Galaxy AB apparent magnitudes from template spectra.

This function calculates photometric AB apparent magnitudes for galaxies whose spectra are modelled as a linear combination of a set of template spectra.

Parameters:
coefficients(ng, nt) array_like

Array of spectrum coefficients.

redshifts(ng,) array_like

Array of redshifts for each galaxy used to calculte the distance modulus and k-correction.

filtersstr or list of str

Bandpass filter specification for load_filters.

cosmologyCosmology

Astropy Cosmology object to calculate distance modulus.

stellar_mass(ng,) array_like, optional

Optional array of stellar masses for each galaxy in template units.

resolutioninteger, optional

Redshift resolution for intepolating magnitudes. Default is 1000. If the number of objects is less than resolution their magnitudes are calculated directly without interpolation.

Returns:
magnitudes(ng, nf) array_like

The apparent AB magnitude of each object in each filter, where nf is the number of loaded filters.