Produced by IDL 7.1.1
User Documentation

./toolbox
dcxshift.pro

Last modification date:
Wed Sep 28 13:27:10 2016

dcxshift

function dcxshift(accumbuf, dc)

This function returns a value that, when given as the argument to shift, will shift the given data container such that it is aligned in the current displayed x-axis with the data in the ongoing accumulation buffer. If there is no ongoing accumulation then this function returns 0. The units of the returned value are channels. The primary data container must be shifted that many channels in order to align in the current x-axis with the data in the accumulation buffer.

Returns
shift, in channels, to be used as argument to dcshift. Returns 0.0 on failure.
Examples
Accumulate several PS scans
 a={accum_struct}
 getps,30
 dcaccum, a, !g.s[0]  ; start an accum, no alignment needed yet
 getps,31
 xs = dcxshift(a,!g.s[0]) ; what is the shift to align 31 with 30?
 ; get a copy of data at !g.s[0]
 data_copy,!g.s[0], d
 dcshift, d, xs  ; actually shift the data
 dcaccum, a, d ; and add it in
 getps, 32
 data_copy,!g.s[0], d
 dcshift, d, dcxshift(a, d)  ; all in one line, shift 32 to align with 30
 dcaccum, a, d
 accumave, a, d ; result is in d now
 
Version
$Id$

Parameters
accumbuf
in, required
accum_struct
The ongoing accumulation buffer.
dc
in, required
spectrum
The data container that needs to be shifted to align with the data container template in accumbuf.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:38 2016