[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


MAG2FLUX Source code in mag2flux.pro

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 = ] )
Input Parameters
       mag - scalar or vector of magnitudes
Optional Input Parameters
       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.
Keyword Parameters
     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 Parameters
       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

Last modified by pro2html on 2001 April 26 at 03:11 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically