|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dcaccum.pro
dcaccum |
Add a data container into an ongoing accumulation in a given accum_struct structure.
If this is the first item to be "accum"ed, it will also be used as a template, stored in accumbuf.template, to be used by dcave.
If the polarization of any items being accumed does not match that of template, the polarization of the template is changed to 'I'.
This combines the UniPOPS functionality of ACCUM and SUM. The SUM name is already in use in IDL.
This is primarily for use inside procedures and functions where it is useful to average several data containers without disturbing the public data containers in the guide structure. Most users will find using accum preferable to using dcaccum.
a = {accum_struct} accumclear,a ; not necessary here, but a good habit to follow ; get several records at once s = !g.lineoutio->get_spectra(index=0) dcaccum,a,s data_free,s ; be sure to clean up, else leaks memory s = !g.lineoutio->get_spectra(index=1) dv = dcvshift, a, s ; align in velocity dcshift, a, dv ; actually do the shift to align dcaccum,a,s data_free, s accumave,a,s show, s data_free, sSee ave for additional examples.
Parameters | |
accumbuf |
The structure containing the accumulation that you want to add to. |
dc |
The data container to accum. |
Keywords | |
weight |
The weight to use for this data. If this is not set, a weight of exposure/Tsys^2 will be used. |