⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uvbybeta.pro

📁 basic median filter simulation
💻 PRO
📖 第 1 页 / 共 2 页
字号:
pro uvbybeta,xby,xm1,xc1,xHbeta,xn,Te,MV,eby,delm0,radius,TEXTOUT=textout, $    eby_in = eby_in, name = name, prompt=prompt,print=print;+; 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;- npar = N_params() if (npar EQ 0) and ( not keyword_set(PROMPT)) then begin     print,'Syntax - UVBYBETA, by, m1, c1, beta, n,     ;Input parameters'     print,'                   Te,MV,eby,delm0,radius   ;Output parameters'     print,'Input Keywords: Eby_in=, /PROMPT, NAME=, TEXTOUT ='     return endif defsysv,'!textout',exists = i if i EQ 0 then astrolib if not keyword_set( TEXTOUT ) then textout = !TEXTOUT  ;default output dev. do_print =  (npar LT 6) or (TEXTOUT GT 2) or keyword_set(PRINT) Rm1 = -0.33 & Rc1 = 0.19 & Rub = 1.53          ;Parameter values init = 0 READ_PAR:  if keyword_set(PROMPT) then begin   ans = ''  print,'Enter (b-y), m1, c1, and Hbeta in that order ([RETURN] to exit)'  read,ans  if ans eq '' then begin               ;Normal Exit    if ( init EQ 1 ) then textclose, TEXTOUT = textout    return   endif else ans = getopt(ans)  if ( N_elements(ans) NE 4 ) then begin    message, 'INPUT ERROR - Expecting 4 scalar values', /CON    print, 'Enter 0.0 for Hbeta if it is not known: '    goto, READ_PAR   endif else begin    xby = ans[0] & xm1 = ans[1] & xc1 = ans[2]  & xhbeta = ans[3]    endelse endif      nstar  = N_elements(xby) xub = xc1 + 2*(xm1+xby) xflag1 = (xHbeta EQ 0.)  READ_GROUP:  if ( npar LT 5 )then begin   print,' The following group of stars are available'   print, $      '(1) B0 - A0, classes III - V, 2.59 < Hbeta < 2.88,-0.20 <   c0  < 1.00'   print, $     '(2) B0 - A0, class   Ia     , 2.52 < Hbeta < 2.59,-0.15 <   c0  < 0.40'   print, $     '(3) B0 - A0, class   Ib     , 2.56 < Hbeta < 2.61,-0.10 <   c0  < 0.50'   print, $      '(4) B0 - A0, class   II     , 2.58 < Hbeta < 2.63,-0.10 <   c0  < 0.10'   print, $      '(5) A0 - A3, classes III - V, 2.87 < Hbeta < 2.93,-0.01 < (b-y)o< 0.06'   print, $     '(6) A3 - F0, classes III - V, 2.72 < Hbeta < 2.88, 0.05 < (b-y)o< 0.22'   print,$      '(7) F1 - G2, classes III - V, 2.60 < Hbeta < 2.72, 0.22 < (b-y)o< 0.39'   print, $      '(8) G2 - M2, classes  IV _ V, 0.20 < m0   < 0.76, 0.39 < (b-y)o< 1.00'   xn = 0                      read,'Enter group number to which star belongs: ',xn   if N_elements(name) Eq 0 then begin   if (TEXTOUT ne 1) and (npar lt 6) then begin ;Prompt for star name?     name = ''     read,'Enter name of star: ',name   endif   endif endif do_eby = N_elements(eby_in) EQ 0 te = fltarr(nstar) & MV = te & delm0 = te & radius = te if N_elements(name) EQ 0 then name = strtrim( indgen(nstar)+1,2) if not do_eby then eby = replicate(eby_in,nstar) else eby = te for i=0,Nstar -1 do begin   by = xby[i] & m1 = xm1[i] & c1 = xc1[i] & hbeta = xhbeta[i] & n = fix(xn[i])   ub = xub[i] & flag1 = xflag1[i]    flag2 = 0   warn = '' case n of 1: BEGIN;   For group 1, beta is a luminosity indicator and c0 is a temperature;   indicator. (u-b) is also a suitable temperature indicator.;   For dereddening a linear relation between the intrinsic (b-y);   and (u-b) colors is used (Crawford 1978, AJ 83, 48)    if do_eby then Eby[i] = ( 13.608*by-ub+1.467 ) / (13.608-Rub)    DEREDD, Eby[i], by, m1, c1, ub, by0, m0, c0, ub0; If beta is not given it is estimated using a cubic fit to the; c0-beta relation for luminosity class V given in Crawford (1978).    IF flag1 EQ 1 then Hbeta = $                   poly(c0, [2.61033, 0.132557, 0.161463, -0.027352] ); Calculation of the absolute magnitude by applying the calibration; of Balona & Shobbrock (1974, MNRAS 211, 375)      g = ALOG10(Hbeta - 2.515) - 1.6*ALOG10(c0 +0.322)   MV[i] = 3.4994 + 7.2026*ALOG10(Hbeta - 2.515) -2.3192*g + 2.9375*g^3   Te[i] = 5040/(0.2917*c0 + 0.2)  ; The ZAMS value of m0 is calculated from a fit to the data of ; Crawford (1978), modified by Hilditch, Hill & Barnes (1983, ; MNRAS 204, 241)   m0zams = poly(c0, [0.07473, 0.109804, -0.139003, 0.0957758] )   delm0[i] = m0zams - m0   flag2 = 1   END 2: BEGIN    if do_eby then begin; For dereddening the linear relations between c0 and (u-b); determined from Zhang (1983, AJ 88, 825) is used.       Eub = ( 1.5*c1 - ub + 0.035) / (1.5/(Rub/Rc1)-1)       Eby[i] = Eub/Rub    endif    DEREDD, Eby[i], by, m1, c1, ub, by0, m0, c0, ub0    if ( flag1 EQ 1 ) then Hbeta = 0.037*c0 + 2.542    END 3: BEGIN; For dereddening the linear relations between c0 and (u-b); determined from Zhang (1983, AJ 88, 825) is used.    if do_Eby then begin       Eub = (1.36*c1-ub+0.004) / (1.36/(Rub/Rc1)-1)       Eby[i] = Eub/Rub    endif    DEREDD, Eby[i], by, m1, c1, ub, by0, m0, c0, ub0; If beta is not given it is derived from a fit of the c0-beta; relation of Zhang (1983).    if flag1 then Hbeta = 0.047*c0 +2.578    END 4: BEGIN; For dereddening the linear relations between c0 and (u-b); determined from Zhang (1983, AJ 88, 825) is used.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -