Produced by IDL 6.1
User Documentation

./guide
ave.pro

Last modification date:
Thu Jun 2 23:56:08 2005

ave

procedure ave, accumnum, [/noclear], [/quiet]

Get the average from an ongoing accumulation. The result is then put into !g.s[0]. The contents of the accum buffer are cleared as a consequence of calling ave, unless the noclear keyword is set.

Examples
average some data
   sclear
   get,index=1
   accum
   get,index=2
   accum
   ave 
 

Average some data using another accum buffer

 sclear, 2 
 get,index=1
 accum, 2
 get,index=2
 accum, 2
 ave, 2
 

average some data, look at an intermediate result

   sclear
   get,index=1
   accum
   get,index=2
   accum
   ave,/noclear  ; accum buffer is NOT clear here
   get,index=3
   accum
   ave     ; accum buffer IS clear here
 
Uses
accumave accumclear set_data_container set_data_container
Version
$Id: ave.pro,v 1.8 2005/05/24 20:38:35 bgarwood Exp $

Parameters
accumnum
in
integer (def. 0)
Use this accum buffer. Defaults to the primary buffer, 0. There are 4 buffers total so this value must be between 0 and 3, inclusive.

Keywords
noclear
in, optional
boolean (def. F)
When set, the contents of the accum buffer are not cleared. This is useful when you want to see what the current average is but also plan on continuing to add data to that average. If this is not set, you would need to restart the accumulation to average more data.
quiet
in, optional
boolean (def. F)
Normally, ave announces how many spectra were averaged. Setting this turns that announcement off. This is especially useful when multiple accum buffers are used within a procedure.

Note: It is a good idea to use sclear to clear the accum buffer before using it the first time so that you can be certain it is starting from a cleared (empty) state.


Produced by IDLdoc 1.6 on Thu Jun 2 23:56:46 2005