; Given type (string, e.g, "O"), subtype (float, e.g. 3) ; and class (integer), return R-I from ; AQ 4th ed ; function aq_ri, type, subtype, class functionname = 'aq_ri' CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin x = [5,9] & y = [-0.32, -0.32] end 'B': begin x = [0,2,5,8] & y = [-0.29, -0.22, -0.16, -0.10] end 'A': begin x = [0,2,5] & y = [-0.02, 0.01, 0.06] end 'F': begin x = [0,2,5,8] & y = [0.17, 0.20, 0.24, 0.29] end 'G': begin x = [0,2,5,8] & y = [0.31, 0.33, 0.35, 0.38] end 'K': begin x = [0,2,5] & y = [0.42, 0.48, 0.63] end 'M': begin x = [0,2,5] & y = [0.91, 1.19, 1.67] end ENDCASE end 3: begin ; giants. Teff for O-F are from xx CASE type OF 'G': begin x = [5,8] & y = [0.48, 0.48] end 'K': begin x = [0,2,5] & y = [0.53, 0.58, 0.90] end 'M': begin x = [0,2,5] & y = [0.94, 1.10, 1.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 = [2,5,8] y = [-0.15, -0.07, 0.00] end 'A': begin x = [0,2,5] & y = [0.05, 0.07, 0.13] end 'F': begin x = [0,2,5,8] & y = [0.20, 0.21, 0.23, 0.27] end 'G': begin x = [0,2,5,8] & y = [0.33, 0.40, 0.44, 0.46] end 'K': begin x = [0,2,5] & y = [0.48, 0.55, 0.90] end 'M': begin x = [0,2,5] & y = [0.94, 1.10, 1.96] 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) return, color end