>  Docs Center  >  Libraries  >  ASTROLIB  >  MAG2FLUX
Libraries

MAG2FLUX

MAG2FLUX

Name


MAG2FLUX

Purpose


Convert from magnitudes to flux (ergs/s/cm^2/A).

Explanation


Use FLUX2MAG() for the opposite direction.

Calling Sequence


flux = mag2flux( mag, [ zero_pt, ABwave = ] )

Inputs


mag - scalar or vector of magnitudes

Optional Input


zero_pt - scalar giving the zero point level of the magnitude.
If not supplied then zero_pt = 21.1 (Code et al. 1976)
              Ignored if the ABwave keyword is set.

Optional Keyword Input


    ABwave - wavelength scalar or vector in Angstroms. If supplied, then
              the input vector, mag, is assumed to contain Oke AB magnitudes
              (Oke & Gunn 1983, ApJ, 266, 713)

Output


flux - scalar or vector flux vector, in erg cm-2 s-1 A-1
              If the ABwave keyword is set, then the flux is given by
              f = 10^(-0.4*(mag +2.406 + 4*alog10(ABwave)))
              Otherwise the flux is given by
              f = 10^(-0.4*(mag + zero_pt))

Example


      Suppose one is given vectors of wavelengths and AB magnitudes, w (in
      Angstroms) and mag. Plot the spectrum in erg cm-2 s-1 A-1
      IDL> plot, w, mag2flux(mag,ABwave = w)

Revision History


Written J. Hill STX Co. 1988
Converted to IDL V5.0 W. Landsman September 1997
      Added ABwave keyword, W. Landsman September 1998



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us