Produced by IDL 6.1
User Documentation

./guide
gshift.pro

Last modification date:
Thu Jun 2 23:56:08 2005

gshift

procedure gshift, offset, [index=integer], [/wrap], [ftol=floating point], [/nowelsh], [/nopad]

Shift the data in data container at index by the given number of channels (which may be a floating point number containing fractional channels) such that data in channel i before the shift is found in channel i+offset after the shift. The data's reference channel is also shifted so that features should remain stationary when displayed except when the x-axis is channels. Shifted data is replaced with zeros unless the /wrap keyword is set in which case the data wraps around as necessary during the shift. Data are first shifted by the nearest integer number of channels and then the result is shifted by the remaining fractional channel if that fraction channel is more than ftol. Currently, fractional shifting is done using an FFT windowed using a Welch function to reduce ringing as a result of the FFT. Set ftol to a number >= 1 to turn off all fractional shifting. Eventually other interpolation methods will be available.

Use one of xshift, vshift, or fshift to calculate the offset to align this data with data in an ongoing accumulation.

Windowing using the Welsh function reduces ringing at the expense of the high-order terms in the FFT. This very slightly broadens features. This can be turned off using the /nowelsh keyword.

The data are padded with 0s to the next higher power of two as an intermediate step (the final result will have the original size of the data). This is done to reduce ringing due to any discontinuities between the two ends of the data. This can be turned off using the /nopad keyword.

Uses
dcshift data_copy set_data_container data_free
Version
$Id: gshift.pro,v 1.4 2005/05/18 19:10:32 bgarwood Exp $

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
index
in, optional
integer
The data container to shift. All shifting is done in place and so this data container 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 replaced by 0s 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.
nowelsh
in, optional
boolean
When set, the shifted data is NOT windowed using the Welsh function.
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.


Produced by IDLdoc 1.6 on Thu Jun 2 23:56:50 2005