idlastro / Astronomical Utilities: UVBYBETA

[Source code]

NAME
UVBYBETA
PURPOSE
Derive dereddened colors, metallicity, and Teff from Stromgren colors.
EXPLANATION
Adapted from FORTRAN routine of same name published by T.T. Moon, 
Communications of University of London Observatory, No. 78. Parameters 
can either be input interactively (with /PROMPT keyword) or supplied 
directly.   
CALLING SEQUENCE
uvbybeta, /PROMPT               ;Prompt for all parameters
uvbybeta,by,m1,c1,Hbeta,n        ;Supply inputs, print outputs
uvbybeta, by, m1, c1, Hbeta, n, Te, Mv, Eby, delm0, radius, 
                [ TEXTOUT=, Eby_in =, Name =  ]
INPUTS
by - Stromgren b-y color, scalar or vector
m1 - Stromgren line-blanketing parameter, scalar or vector
c1 - Stromgren Balmer discontinuity parameter, scalar or vector
Hbeta - H-beta line strength index.  Set  Hbeta to 0 if it is not 
     known, and UVBYBETA will estimate a value based on by, m1,and c1.
     Hbeta is not used for stars in group 8.
n -  Integer (1-8), scalar or vector,  giving approximate stellar 
     classification
(1) B0 - A0, classes III - V, 2.59 < Hbeta < 2.88,-0.20 <   c0  < 1.00
(2) B0 - A0, class   Ia     , 2.52 < Hbeta < 2.59,-0.15 <   c0  < 0.40
(3) B0 - A0, class   Ib     , 2.56 < Hbeta < 2.61,-0.10 <   c0  < 0.50
(4) B0 - A0, class   II     , 2.58 < Hbeta < 2.63,-0.10 <   c0  < 0.10
(5) A0 - A3, classes III - V, 2.87 < Hbeta < 2.93,-0.01 < (b-y)o< 0.06
(6) A3 - F0, classes III - V, 2.72 < Hbeta < 2.88, 0.05 < (b-y)o< 0.22
(7) F1 - G2, classes III - V, 2.60 < Hbeta < 2.72, 0.22 < (b-y)o< 0.39
(8) G2 - M2, classes  IV _ V, 0.20 < m0   < 0.76, 0.39 < (b-y)o< 1.00
OPTIONAL INPUT KEYWORD
Eby_in - numeric scalar specifying E(b-y) color to use.   If not
      supplied, then E(b-y) will be estimated from the Stromgren colors
NAME - scalar or vector string giving name(s) of star(s).  Used only 
        when writing to  disk for identification purposes.
/PROMPT - if set, then uvbybeta.pro will prompt for Stromgren indicies
         interactively
TEXTOUT  -  Used to determine output device.  If not present, the
        value of the !TEXTOUT system variable is used (see TEXTOPEN)
        textout=1       Terminal with /MORE (if a tty)
        textout=2       Terminal without /MORE
        textout=3       uvbybeta.prt   (output file)
        textout=4       Laser Printer 
        textout=5       User must open file         
        textout=7       Append to existing uvbybeta.prt file
        textout = filename (default extension of .prt)
PRINT - if set, then force display output information to the device 
        specified by !TEXTOUT.    By default, UVBYBETA does not display
        information if output variables are supplied (and TEXTOUT is
        not set). 
OPTIONAL OUTPUTS
Te - approximate effective temperature
MV - absolute visible magnitude
Eby - Color excess E(b-y)
delm0 - metallicity index, delta m0, (may not be calculable for early
        B stars).
radius - Stellar radius (R/R(solar))
EXAMPLE
Suppose 5 stars have the following Stromgren parameters
by = [-0.001 ,0.403, 0.244, 0.216, 0.394 ]
m1 = [0.105, -0.074, -0.053, 0.167, 0.186 ]
c1 = [0.647, 0.215, 0.051, 0.785, 0.362] 
hbeta = [2.75, 2.552, 2.568, 2.743, 0 ]
nn = [1,2,3,7,8]              ;Processing group number
Determine stellar parameters and write to a file uvbybeta.prt
IDL> uvbybeta, by,m1,c1,hbeta, nn, t=3
     ==> E(b-y) = 0.050    0.414   0.283  0.023  -0.025
         Teff =   13060    14030   18420  7250    5760
         M_V =    -0.27    -6.91   -5.94  2.23    3.94
         radius=  2.71     73.51    39.84 2.02    1.53
SYSTEM VARIABLES
The non-standard system variables !TEXTOUT and !TEXTUNIT will be  
automatically defined if they are not already present.   
DEFSYSV,'!TEXTOUT',1
DEFSYSV,'!TEXTUNIT',0
NOTES
(1) **This procedure underwent a major revision in January 2002
and the new calling sequence may not be compatible with the old** (NAME
is now a keyword rather than a parameter.)
(2) Napiwotzki et al. (1993, A&A, 268, 653) have written a FORTRAN
    program that updates some of the Moon (1985) calibrations.  These
    updates are *not* included in this IDL procedure.
PROCEDURES USED
DEREDD, TEXTOPEN, TEXTCLOSE
REVISION HISTORY
W. Landsman          IDL coding              February, 1988
Keyword textout added, J. Isensee, July, 1990
Made some constants floating point.   W. Landsman    April, 1994
Converted to IDL V5.0   W. Landsman   September 1997
Added Eby_in, /PROMPT keywords, make NAME a keyword and not a parameter
          W. Landsman      January 2002