; Given type (string, e.g, "O"), subtype (float, e.g. 3) ; and class (integer), return Mv from ; AQ 4th ed ; function aq_mv, type, subtype, class functionname = 'aq_mv' CASE class OF 5: begin ; Main sequence CASE type OF 'O': begin x = [5,9] & y = [-5.7, -4.5] end 'B': begin x = [0,2,5,8] & y = [-4.0, -2.45, -1.2, -0.25] end 'A': begin x = [0,2,5] & y = [0.65, 1.3, 1.95] end 'F': begin x = [0,2,5,8] & y = [2.7, 3.6, 3.5, 4.0] end 'G': begin x = [0,2,5,8] & y = [4.4, 4.7, 5.1, 5.5] end 'K': begin x = [0,2,5] & y = [5.9, 6.4, 7.35] end 'M': begin x = [0,2,5] & y = [8.8, 9.9, 12.3] end ENDCASE end 3: begin ; giants. Teff for O-F are from xx CASE type OF 'G': begin x = [5,8] & y = [0.9, 0.8] end 'K': begin x = [0,2,5] & y = [0.7, 0.5, -0.2] end 'M': begin x = [0,2,5] & y = [-0.4, -0.6, -0.3] 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 = [-6.4, -6.2, -6.2] end 'A': begin x = [0,2,5] & y = [-6.3, -6.5, -6.6] end 'F': begin x = [0,2,5,8] & y = [-6.6, -6.6, -6.6, -6.5] end 'G': begin x = [0,2,5,8] & y = [-6.4, -6.3, -6.2, -6.1] end 'K': begin x = [0,2,5] & y = [-6.0, -5.9, -5.8] end 'M': begin x = [0,2,5] & y = [-5.6, -5.6, -5.6] 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) mv = poly(subtype,res) return, mv end