; Given type (string, e.g, "O"), subtype (float, e.g. 3) ; and class (integer), return U-B from ; AQ 4th ed ; function aq_ub, type, subtype, class functionname = 'aq_ub' CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin x = [5,9] & y = [-1.19, -1.12] end 'B': begin x = [0,2,5,8] & y = [-1.08,-0.84, -0.58, -0.34] end 'A': begin x = [0,2,5] & y = [-0.02,0.05,0.10] end 'F': begin x = [0,2,5, 8] & y = [0.03, 0.00, -0.02, 0.02] end 'G': begin x = [0,2,5,8] & y = [0.06, 0.12, 0.20, 0.30] end 'K': begin x = [0,2,5] & y = [0.45, 0.64, 1.08] end 'M': begin x = [0,2,5] & y = [1.22, 1.18, 1.24] end ENDCASE end 3: begin ; giants. Teff for O-F are from xx CASE type OF 'G': begin x = [5,8] & y = [0.56, 0.70] end 'K': begin x = [0,2,5] & y = [0.84, 1.16, 1.81] end 'M': begin x = [0,2,5] & y = [1.87, 1.89, 1.58] 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.93, -0.72, -0.55] end 'A': begin x = [0,2,5] & y = [-0.38, -0.25, -0.08] end 'F': begin x = [0,2,5,8] & y = [0.15, 0.18, 0.27, 0.41] end 'G': begin x = [0,2,5,8] & y = [0.52, 0.63, 0.83, 1.07] end 'K': begin x = [0,2,5] & y = [1.17, 1.32, 1.80] end 'M': begin x = [0,2,5] & y = [1.90, 1.95, 1.60] 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