;+ ; Average the records listed in the stack. ; ; @keyword noclear {in}{optional}{type=boolean} If this is set, the ; accum buffer is not cleared prior to averaging the records ; ; @examples ; add index number 25, 30 through 39, and the odd indexes from 41 ; through 51 to the stack, and average them. ;
;    addstack, 25
;    addstack, 30, 39
;    addstack, 41, 51, 2
;    avgstack
; 
; ; @version $Id: avgstack.pro,v 1.1 2004/12/13 17:05:35 jbraatz Exp $ ;- pro avgstack,noclear=noclear compile_opt idl2 if not keyword_set(noclear) then sclear for i = 0,(!g.acount-1) do begin getrec,astack(i) accum endfor ave end