>  Docs Center  >  Libraries  >  Buie  >  SSHIFT
Libraries

SSHIFT

SSHIFT

Name


sshift

Purpose (one Line)


Shift data using a damped sinc function for fractional part.

Description



This function will shift an array of data pointed to by x and
extending for n points. The amount of the shift is given by shift.
The result of the operation is placed at xp. A shift that is within
0.0001 of a whole number is treated to be that of the whole number. If
the shift is by an integral number of pixels then the shift involves
reindexing the data, no interpolation is done. If the shift is some
non-integral amount then the data is resampled using a damped sinc
function.
The sense of the shift is as follows: think of the array plotted on a
fixed scale. A shift of 1 corresponds to shifting the data by one data
point to the right relative to the fixed scale, ie. x[3]=xp[4].
The data will fall off one end or another of the output vector as a
result of the shift. However, this is not as significant as the edge
effect, the convolution is not complete for any data point within 10
points of the edge, so those points cannot be trusted. The missing
points in the convolution are assumed to be equal to the end points.

Category


      Numerical

Calling Sequence


xp = sshift(x,shift)

Inputs


x - Input data array to be shifted.
shift - Amount to shift (negative to left).

Optional Input Parameters


Keyword Parameters


Outputs


Return value is the shifted array.

Common Blocks


Side Effects


Restrictions


The input and output arrays cannot be the same.

Procedure


Modification History


Adapted from Zodiac routine: shiftc/sshift
Marc W. Buie, Lowell Observatory, 1992 October 2



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us