convert_flux¶
- synphot.units.convert_flux(wavelengths, fluxes, out_flux_unit, **kwargs)[source]¶
Perform conversion for supported flux units.
- Parameters:
- wavelengthsarray-like or
Quantity
Wavelength values. If not a Quantity, assumed to be in Angstrom.
- fluxesarray-like or
Quantity
Flux values. If not a Quantity, assumed to be in PHOTLAM.
- out_flux_unitstr or
Unit
Output flux unit.
- areafloat or
Quantity
Area that fluxes cover. If not a Quantity, assumed to be in \(cm^{2}\). This value must be provided for conversions involving OBMAG and count, otherwise it is not needed.
- vegaspec
SourceSpectrum
Vega spectrum that must be provided for conversions involving VEGAMAG, otherwise it is not needed. For instance, it can be obtained from
from_vega()
.
- wavelengthsarray-like or
- Returns:
- out_flux
Quantity
Converted flux values.
- out_flux
- Raises:
- astropy.units.UnitsError
Conversion failed.
- synphot.exceptions.SynphotError
Area or Vega spectrum is not given when needed.