magnitudes_from_templates¶
-
skypy.galaxy.spectrum.magnitudes_from_templates(coefficients, templates, bandpass, redshift=None, resolution=1000, stellar_mass=None, distance_modulus=None)[source] [edit on github]¶ Compute AB magnitudes from template spectra.
This function calculates photometric AB magnitudes for objects whose spectra are modelled as a linear combination of template spectra following [1] and [2].
- Parameters
- coefficients(ng, nt) array_like
Array of spectrum coefficients.
- templatesspectral_data
Template spectra.
- bandpassspectral_data
Bandpass filters.
- redshift(ng,) array_like, optional
Optional array of values for redshifting the source spectrum.
- 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.
- stellar_mass(ng,) array_like, optional
Optional array of stellar masses for each galaxy in template units.
- distance_modulus(ng,) array_like, optional
Optional array of distance moduli for each galaxy.
- Returns
- mag_ab(ng, nb) array_like
The absolute AB magnitude of each object.
References