; Given type (string, e.g, "O"), subtype (float, e.g. 3) ; and class (integer), return J-H from ; AQ 4th ed ; function aq_jh, type, subtype, class functionname = 'aq_jh' CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin x = [9,9.5] & y = [-0.14,-0.13] end 'B': begin x = [0,1,2,3,4,5,6,7,8,9] y = [-0.12,-0.10,-0.09,-0.08,-0.07,-0.06,-0.05, -0.03,-0.03,-0.01] end 'A': begin x = [0,2,5,7] & y = [0.00,0.02,0.06,0.09] end 'F': begin x = [0,2,5,7] & y = [0.13,0.17,0.23,0.29] end 'G': begin x = [0,2,4,6] & y = [0.31,0.32,0.33,0.37] end 'K': begin x = [0,2,4,5,7] y = [0.45,0.50,0.58,0.61,0.66] end 'M': begin x = [0,1,2,3,4,5,6] y = [0.67,0.66,0.66,0.64,0.62,0.62,0.66] end ENDCASE end 3: begin ; giants. Teff for O-F are from xx CASE type OF 'G': begin x = [0,4,6,8] & y = [0.37,0.47,0.50,0.50] end 'K': begin x = [0,1,2,3,4,5] & y = [0.54,0.58,0.63,0.68,0.73,0.79] end 'M': begin x = [0,1,2,3,4,5,6,7] y = [0.83,0.85,0.87,0.90,0.93,0.95,0.96,0.96] end ELSE: begin ; out of bounds! print, functionname+': spectral type out of bounds' return, -100 end ENDCASE end 1: begin ; super giants. CASE type OF 'B': begin x = [5,6,7,8,9] y = [0.01,0.04,0.06,0.07,0.08] end 'A': begin x = [0,1,2,5] & y = [0.09,0.11,0.12,0.13] end 'F': begin x = [0,2,5,8] & y = [0.15,0.18,0.22,0.28] end 'G': begin x = [0,3,8] & y = [0.33,0.38,0.43] end 'K': begin x = [0,1,2,3,5] & y = [0.46,0.49,0.52,0.59,0.67] end 'M': begin x = [0,1,2,3,4] & y = [0.73,0.73,0.73,0.74,078] end ELSE: begin ; out of bounds! print, functionname+': spectral type out of bounds' return, -100 end ENDCASE end ELSE: begin ; out of bounds! print, functionname+': spectral type out of bounds' return, -100 end ENDCASE ; res = poly_fit(x, y, 1) ; color = poly(subtype,res) color = interpol(y,x,subtype) return, color end