Produced by IDL 7.1.1
User Documentation

./guide
gshift.pro

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

gshift

procedure gshift, offset, [buffer=integer], [/wrap], [ftol=floating point], [/linear], [/quadratic], [/lsquadratic], [/spline], [/cubic], [/nowelsh], [/nopad], [ok=variable]

Procedure to shift data in a GUIDE data buffer by a given number of channels.

This uses dcshift. Please read the documentation for that toolbox function for all the details about how shifting of data containers is implemented. This documentation is very thin and is primarily useful as a syntax reminder for the usage procedure.

See fshift or vshift for examples showing how this is used to align spectra prior to averaging.

Examples
   getps, 30
   accum           ; first in, no alignment needed yet
   getps, 31
   fs = fshift()   ; shift to align in frequency
   gshift, fs      ; actually do the shift
   accum           ; now it can be added to the accumulation
   ave
 
Uses
dcshift data_copy set_data_container data_free
Version
$Id$

Parameters
offset
in, required
floating point
The number of channels to shift the data (positive shifts things towards higher channels, negative shifts things towards lower channels).

Keywords
buffer
in, optional
integer
The GUIDE data buffer to shift. All shifting is done in place and so the data in this buffer is modified by this procedure.
wrap
in, optional
boolean
Data shifted off one end of the array appears on the other end of the array (it wraps around as a result of the shift) when this is set. Otherwise, as data is shifted it is blanked (replaced by NaNs) and data shifted off the end is lost.
ftol
in, optional
floating point (def. 0.01)
Fractional shifts (the non-integer portion of offset) are only done when they are larger than ftol. Set this value to >= 1.0 to turn off all fractional shifts.
linear
in, optional
boolean
When set, use the linear interpolation provided by INTERPOL for any fractional shift larger than ftol.
quadratic
in, optional
boolean
When set, use the quadratic interpolation provided by INTERPOL for any fractional shift larger than ftol.
lsquadratic
in, optional
boolean
When set, use the lsquadratic (lest squares quadratic) interpolation provided by INTERPOL for any fractional shift larger than ftol.
spline
in, optional
boolean
When set, use the spline interpolation provided by INTERPOL for any fractional shift larger than ftol.
cubic
in, optional
boolean
When set, use the cubic interpolation provided by INTERPOLATE for any fractional shift larger than ftol. The value of the CUBIC keyword in the INTERPOLATE call is set to -0.5.
nowelsh
in, optional
boolean
When set, the shifted data is NOT windowed using the Welsh function. This is ignored when a non-FFT-based fraction shift is done
nopad
in, optional
boolean
When set, the data is NOT padded with 0s to the next higher power of 2 prior to the FFT and shift. The data are never padded for the non-FFT-based fractional shifts.
ok
out, optional
variable
This is set to 1 on success or 0 on failure (e.g. bad arguments).


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