Viewing contents of file '../idllib/uit/pro/ccrtwarp.pro'
pro ccrtwarp,ch,chref,oldim,refim,newim,x,y,xref,yref, $
fwhm=fwhm,missing=missing,degree=degree,fast=fast
;+
; NAME:
; CCRTWARP
; PURPOSE:
; Warps an image to match a reference image. Prompts the user to pick
; out corresponding sources on two display channels using cursor.
; Neighborhood of cursor is searched for centroid in the image array.
; POLY_2D used to do real work a couple of layers down.
; CALLING SEQUENCE:
; ccrtwarp,ch,chref,oldim,refim,newim[,x,y,xref,yref],$
; fwhm=fwhm,missing=missing,degree=degree,fast=fast
; INPUT PARAMETERS:
; ch = channel number with display of image to be warped
; chref = channel number with display of reference image
; oldim = image to be warped
; refim = image to which the warped image will conform
; fwhm [keyword] passed ultimately to CNTRD (centroid) routine.
; Default is set by CWARPLIST routine.
; missing [keyword] = missing keyword of poly_2d
; degree [keyword] = degree of polynomical to be fit; default is 1
; fast [keyword] = flag for nearest-neighbor transformation;
; default is bilinear interpolation
; OUTPUT PARAMETERS:
; newim = output image
; x, y, xref, yref [optional] = coordinates of corresponding sources
; COMMON BLOCKS:
; none
; SIDE EFFECTS:
; none
; PROCEDURE:
; Calls cwarplist and imwarp. Latter calls POLY_2D.
; MODIFICATION HISTORY:
; Written by R. S. Hill, ST Systems Corp., 10 April 1991
; Degree keyword added. RSH, STX, 15 April 1991
; Fast keyword added. RSH, STX, 16 April 1991
; CRTWARP changed to CCRTWARP for centroiding from actual image.
; RSH, STX, 17 April 1991
; fwhm keyword substituted for boxrad. RSH, STX, 2 May 1991.
;-
if n_params(0) le 0 then begin
print,'ccrtwarp,ch,chref,oldim,refim,newim, $'
print,' [x,y,xref,yref,]fwhm=fwhm,missing=missing, $'
print,' degree=degree,fast=fast'
retall
endif
cwarplist,ch,chref,oldim,refim,x,y,xref,yref,fwhm=fwhm
print,'*** Done getting sources; image transformation in progress ***'
imwarp,oldim,newim,x,y,xref,yref,missing=missing,degree=degree,fast=fast
return
end