; Given type (string, e.g, "O"), subtype (float, e.g. 3) ; and class (integer), return V-R from ; AQ 4th ed ; function aq_vr, type, subtype, class functionname = 'aq_vr' CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin x = [5,9] & y = [-0.15, -0.15] end 'B': begin x = [0,2,5,8] & y = [-0.13, -0.10, -0.06, -0.02] end 'A': begin x = [0,2,5] & y = [0.02, 0.08, 0.16] end 'F': begin x = [0,2,5,8] & y = [0.30, 0.35, 0.40, 0.47] end 'G': begin x = [0,2,5,8] & y = [0.50, 0.53, 0.54, 0.58] end 'K': begin x = [0,2,5] & y = [0.64, 0.74, 0.99] end 'M': begin x = [0,2,5] & y = [1.28, 1.50, 1.80] end ENDCASE end 3: begin ; giants. Teff for O-F are from xx CASE type OF 'G': begin x = [5,8] & y = [0.69, 0.70] end 'K': begin x = [0,2,5] & y = [0.77, 0.84, 1.20] end 'M': begin x = [0,2,5] & y = [1.23, 1.34, 2.18] 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.05, 0.02, 0.02] end 'A': begin x = [0,2,5] & y = [0.03, 0.07, 0.12] end 'F': begin x = [0,2,5,8] & y = [0.21, 0.26, 0.35, 0.45] end 'G': begin x = [0,2,5,8] & y = [0.51, 0.58, 0.67, 0.69] end 'K': begin x = [0,2,5] & y = [0.76, 0.85, 1.20] end 'M': begin x = [0,2,5] & y = [1.23, 1.34, 2.18] 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