;+ ; This procedure adds a data container to the accum buffer, in ; preparation for averaging. The PDC (!g.s[0]) is used by default ; but an alternate data container can be specified using the 'dc' keyword. ; ;
The first data container accum'ed in each buffer is used as a template ; for that buffer and subsequent data containers accum'ed to that buffer ; must match in number of channels and frequency range. ; ;
There are four accum buffers available to that the user can ; average polarizations simultaneously, but separately, if it is ; desired to do so. ; ;
See: accum.pro ; ; @param accumnum {in}{optional}{type=integer}{default=0} accum buffer. ; Defaults to the primary buffer (accumnum = 0). There are 4 buffers ; total so this value must be between 0 and 3, inclusive. ; ; @keyword weight {in}{optional}{type=float} The weight to use for ; averaging this data. If not set, a weight of exposure/Tsys^2 is used. ; ; @keyword dc {in}{optional}{type=spectrum or integer} The data container to ; accum. If not supplied, use !g.s[0]. If this is an integer, then ; use the data container at that index number in !g.s. ; ; @examples ; A simple averaging operation: ;
; sclear ; getrec,1 ; accum ; getrec,2 ; accum ; ave ;;
Average two polarizations separately for some position switched scans ;
; sclear ; clears accum buffer 0 ; sclear, 1 ; clears accum buffers 1 ; getps,32,plnum=0 ; accum, 0 ; getps,32,plnum=1 ; accum, 1 ; getps,34,plnum=0 ; accum, 0 ; getps,34,plnum=1 ; accum, 1 ; ave,1 ; Average plnum=1 data and store ; ; the result in the PDC ; copy,0,1 ; Copy the result to DC 1 ; ave, 0 ; Average plnum=0 data ; oshow, 1 ; Overplot the plnum=1 average ;; ; @uses dcaccum ; ;