Produced by IDL 7.1.1
User Documentation

./guide
xshift.pro

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

xshift

function xshift(accumnum, [buffer=integer])

This function returns a value that, when given as the argument to gshift, will shift the primary data container such that it is aligned in the current displayed x-axis with the data in the 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.

You can use an alternate data container by setting buffer. You can use an alternate global accumulation buffer by setting accumnum.

Returns
shift, in channels, to be used as argument to shift. Returns 0.0 on failure.
Examples
Accumulate several PS scans
 sclear          ; clear the accumulation
 getps, 31       ; get the first scan
 freeze          ; turn off auto-update of the plotter

 ; at this point, set the X-axis units using the plotter GUI

 accum           ; add the first spectrum to the accumulator
 getps, 32       ; get the next scan, plotter is not auto-updated
 gshift,xshift() ; shift to align the spectrum to the accum'ed spectrum
 accum           ; and add it to the accum buffer
 unfreeze
 ave
 
Uses
dcvshift
Version
$Id$

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

Keywords
buffer
in, optional
integer (def. 0)
The data container that will eventually be shifted. Defaults to the primary data container (0).


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