Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.547 shift

shift(data [[, axes], dist, blank=blank] [, /translate])

shift, data [[, axes], dist, blank=blank] [, /translate]

Shifts the data in array data over the integer numbers of elements in dist. If blank or /translate are specified, then the data is shifted non-cyclically: values that are shifted beyond an edge of the original array are lost, and the value of blank, or zero by default, is inserted for values that are shifted in from beyond the opposite edge. If neither blank nor /translate are specified, then the data is shifted cyclically: data that shifts beyond one edge will appear at the opposite edge, and no data values are lost. axes specifies along which dimensions must be shifted over the amount given by the corresponding element of dist.

If dist is not specified, then dimen(data)/2 is assumed for it. If axes is not specified, then indgen(dist) is assumed for it.

The function form returns the shifted data; the subroutine form modifies data.

See also: swaphalf, fftshift, shift3