Additional VEGA unit

Vega unit core module

This package defines Vega-based magnitude systems, and a units equivalency function for converting to/from flux density.

To use these units in the top-level astropy.units namespace, you need to import the module:

>>> import astropy.units as u
>>> import qmostetc.units
>>> u.Unit('mag(VEGA)')
Unit("mag(VEGA)")
qmostetc.units.spectral_density(wfb)

Flux density equivalencies, extended for Vega-based magnitude systems.

This uses the default Vega spectrum that comes for 4MOST in the Instrument Control Repository (ICR).

Vega is assumed to have an apparent magnitude of 0 in the VEGAmag system.

See https://github.com/astropy/astropy/issues/10821 for a discussion about using u.spectral_density instead.

Parameters:
wfbastropy.units.Quantity

Wavelength, of the corresponding flux density being converted.

Returns:
list

List of equivalencies.

Examples

Monochromatic flux density:

>>> import astropy.units as u
>>> from qmostetc import spectral_density, VEGAmag
>>> m = 10 * VEGAmag
>>> fluxd = m.to('erg/(s cm² nm)', spectral_density(5557.5*u.AA))
>>> print(f'{fluxd:.3e}')
3.461e-12 erg / (nm s cm2)
>>> fluxd = m.to('ph/(s cm² nm)', spectral_density(5557.5*u.AA))
>>> print(f'{fluxd:.4f}')
0.9682 ph / (nm s cm2)