SHIFT: Shift an Image



SHIFT will translate the coordinate system of the 'source' image by the amount specified in pixels.

The simplest use of SHIFT is to specify the amount of translation along each axis using the DR and/or DC keywords. The routine first rounds the desired shift to the nearest pixel, and adjusts the variables specifying the image's origin. The routine then uses a flux conserving Lagrangian interpolation scheme (unless SINC or BILINEAR is specified in which case the sinc or bilinear interpolation option is activated) to move the image the remaining fraction of a pixel in the specified row and column directions.

The NORM keyword is used to conserve counts in the shifted image when sinc- interpolation is used. BEWARE! This may not operate they way you think (or want)! If there is substantial noise in your data it will be trying to normalize the noise and will hence be multiplying by a rather arbitrary constant.

The RMODEL= (or CMODEL=) keyword specifies a spectrum buffer which is used as a model for the row (or column) shift as a function of column (or row) number. This allows more flexible shifts to be performed, and allows, for instance, the rectification of cross-dispersed spectral data. Note that if you use SPECTROID or FINDPEAK to build the shift model, you must multiply the output of these routines by -1 in order to straighten it. The complete interpolation is done, and the starting row and column of the image are not changed, when models are used. Also, the MEAN keyword will force the mean shift to be zero, so that you don't risk shifting your data completely off of the image.

Examples:

Warning: SHIFT can be used to shift an image so that its starting row or column is negative. On some older routines this might lead to errors or crashes. After shifting an image, you may want to IMMEDIATELY window the image or reset the coordinates (see WINDOW and FIXHEAD, respectively), so that the starting row and column are greater than or equal to zero!