[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


FLUX2MAG Source code in flux2mag.pro

FLUX2MAG

Name
     FLUX2MAG
Purpose
     Convert from flux (ergs/s/cm^2/A) to magnitudes.
Explanation
     Use MAG2FLUX() for the opposite direction.
Calling Sequence
     mag = flux2mag( flux, [ zero_pt, ABwave=  ] )
Input Parameters
     flux - scalar or vector flux vector, in erg cm-2 s-1 A-1
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 supplied
Keyword Parameters
     ABwave - wavelength scalar or vector in Angstroms.   If supplied, then
           FLUX2MAG() returns Oke AB magnitudes (Oke & Gunn 1983, ApJ, 266,
           713).
Output Parameters
     mag - magnitude vector.   If the ABwave keyword is set then mag
           is given by the expression
           ABMAG = -2.5*alog10(f) - 5*alog10(ABwave) - 2.406
           Otherwise, mag is given by the expression
           mag = -2.5*alog10(flux) - zero_pt
Example
       Suppose one is given wavelength and flux vectors, w (in Angstroms) and
       f (in erg cm-2 s-1 A-1).   Plot the spectrum in AB magnitudes
       IDL> plot, w, flux2mag(f,ABwave = w), /nozero
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:10 UTC

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

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