# 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.

vegaspecSourceSpectrum

Vega spectrum that must be provided for conversions involving VEGAMAG, otherwise it is not needed. For instance, it can be obtained from from_vega().

Returns
out_fluxQuantity

Converted flux values.

Raises
astropy.units.core.UnitsError

Conversion failed.

synphot.exceptions.SynphotError

Area or Vega spectrum is not given when needed.