Produced by IDL 6.1
User Documentation

./toolbox
accumave.pro

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

accumave

procedure accumave, accumbuf, dc, [/noclear], [/quiet]

Get the average from an ongoing accumulation. The dc argument will contain the result. The contents of the accum buffer are cleared as a consequence of calling ave, unless the noclear keyword is set.

Note: It is a good idea to use accumclear 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.

Examples
 a = {accum_struct}
 accumclear, a  ; not necessary here, but good practice
 get,index=1
 dcaccum, a, !g.s[0]
 get,index=2
 dcaccum, a, !g.s[0]
 accumave, a, myavg
 show, myavg
 data_free, myavg ; be sure and clean up when done
 

Note: the accum_struct structure used here has internal pointers. Use sclear to clear them, either implicitly (by use of accumave) or explicitly.

Uses
accumclear data_copy
Version
$Id: accumave.pro,v 1.2 2005/05/19 20:43:56 bgarwood Exp $

Parameters
accumbuf
in/out, required
variable
The accumulation buffer to use.
dc
out, required
variable
The resulting average.

Keywords
noclear
in, optional
boolean (def. F)
When set, the contents of the global 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, accumave 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.


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