; Given type (string, eg.g, "O"), subtype (float, e.g. 3) ; and class (integer), return Teff and g from ; AQ 4th ed ; ; Modified Jan 22, 2004 (LAY) to avoid calling poly_fit ; on two-element arrays pro aq_teff, type, subtype, class, teff, logg, teff_err, logg_err gsun = 4.4377 ; from the defined g in the Kurucz frid for T=5770 CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin xt = [5,9] & yt = [42000.,34000.] xg = [3,5,6,8] & yg = [-0.3,-0.4,-0.45,-0.5]+gsun end 'B': begin xt = [0,2,5,8] & yt = [30000,20900,25200,11400] xg = [0,3,5,8] & yg = [-0.5,-0.5,-0.4,-0.4]+gsun end 'A': begin xt = [0,2,5] & yt = [9790,9000,8180] xg = [0,5] & yg = [-0.3,-0.15]+gsun end 'F': begin xt = [0,2,5] & yt = [7300,7000,6650] xg = [0,5] & yg = [-0.1,-0.1]+gsun end 'G': begin xt = [0,2,5,8] & yt = [5940,5790,5560,5310] xg = [0,5] & yg = [-0.05,+0.05]+gsun end 'K': begin xt = [0,2,5] & yt = [5150,4830,4410] xg = [0,5] & yg = [+0.05,+0.1]+gsun end 'M': begin xt = [0,2,5] & yt = [3840,3520,3170] xg = [0,2,5,8] & yg = [+0.15,+0.2,+0.5,+0.5]+gsun end ENDCASE end 3: begin ; giants. Teff for O-F are from Humphreys & McElroy 1984 CASE type OF 'O': begin xt = [3,4,5,5.5,6,7,7.5,8,8.5,9,9.5] yt = [47000,43500,42000,40200,39300,37400,35400,34500, $ 33600,32800,31900] xg = [10,15] & yg = [-1.1,-0.95]+gsun end 'B': begin if subtype le 2 then begin xt = [0,0.2,0.5,0.7,1,1.5,2] yt = [30300,27300,25900,23400,21100,20000,18000] endif else begin xt = [3,4,5,7,8,9,9.5] yt = [17100,16700,16300,13200,12550,11400,10550] end xg = [0,5] & yg = [-1.1,-0.95]+gsun end 'A': begin if subtype le 4 then begin xt = [0,1,2,3,4] yt = [10000,9570,9000,8500,8200] endif else begin xt = [4,8] yt = [8200,7800] end xg = [-5,18] & yg = [-0.95,-1.5]+gsun end 'F': begin xt = [0,5] & yt = [7000,6500] xg = [-15,8] & yg = [-0.95,-1.5]+gsun end 'G': begin xt = [5,8] & yt = [5050,4800] xg = [0,5] & yg = [-1.5,-1.9]+gsun end 'K': begin xt = [0,2,5] & yt = [4660,4390,4050] xg = [0,5] & yg = [-2.3,-2.7]+gsun end 'M': begin xt = [0,2,5] & yt = [3690,3540,3380] xg = [0,2] & yg = [-3.1,-3.3]+gsun end ENDCASE end 1: begin ; super giants. Teff for O-B2 are from Humphreys & McElroy 184 CASE type OF 'O': begin xt = [3,4,5,5.5,6,7,7.5,8,8.5,9,9.5] yt = [48700,45000,43500,41800,40500,37500,$ 37000,36250,35000,34000,32750] xg = [5,6,8] & yg = [-1.1,-1.2,-1.2]+gsun end 'B': begin if subtype le 2 then begin xt = [0,.2,0.5,1,1.5,2] yt = [29600,28100,25400,24150,21800,19700] endif else begin xt = [2,5,8] yt = [17600,13600,11100] end xg = [0,5] & yg = [-1.6,-2.0]+gsun end 'A': begin xt = [0,2,5] & yt = [9980,9380,8610] xg = [0,5] & yg = [-2.3,-2.4]+gsun end 'F': begin xt = [0,2,5,8] & yt = [7460,7030,6370,5750] xg = [0,5] & yg = [-2.7,-3.0]+gsun end 'G': begin xt = [0,2,5,8] & yt = [5370,5190,4930,4700] xg = [0,5] & yg = [-3.1,-3.3]+gsun end 'K': begin xt = [0,2,5] & yt = [4550,4310,3990] xg = [0,5] & yg = [-3.5,-4.1]+gsun end 'M': begin xt = [0,2,5] & yt = [3620,3370,2880] xg = [0,2] & yg = [-4.3,-4.5]+gsun end ENDCASE end ELSE: begin ; out of bounds! print, 'aq_teff: spectral type out of bounds' return end ENDCASE if n_elements(xt) gt 2 then begin res = linfit(xt, yt) teff = poly(subtype,res) end else begin teff = yt[0] + (subtype-xt[0])*(yt[1]-yt[0])/(xt[1]-xt[0]) end teff_err = 250 if n_elements(xg) gt 2 then begin res = linfit(xg, yg) logg = poly(subtype,res) end else begin logg = yg[0] + (subtype-xg[0])*(yg[1]-yg[0])/(xg[1]-xg[0]) end logg_err = 0.1 end