synthetic_magnitude¶
- nsb2.core.photometry.synthetic_magnitude(wvl, flx, bandpass)[source]¶
Compute the synthetic Vega magnitude of a spectrum in a passband.
- Parameters:
wvl (astropy.units.Quantity) – Wavelength grid, shape
(W,).flx (astropy.units.Quantity) – Spectral flux density, with the wavelength axis last.
bandpass (nsb2.core.spectral.Bandpass) – Passband to integrate over.
- Returns:
Magnitudes on the Vega system, with the wavelength axis removed.
- Return type:
Notes
The integrand is photon-weighted (an extra factor of wavelength), matching the convention of the zeropoint returned by
nsb2.core.spectral.Bandpass.vegazero.