xfshifts: Compute shifts using star finding and centroiding techniques

Package: xdimsum

Usage

xfshifts inlist output shifts hwhmpsf threshold xlag ylag cbox

Parameters

inlist
The list of input sky subtracted images. The input image list must be in order with each image offset from the previous one by approximately xlag pixels in x and ylag pixels in y.
output
The output total offsets file suitable for input to the xnregistar task. Output contains the input image name, the total x offset, the total y offset, and the default exposure time in columns 1 through 4 respectively. The total x and y offsets of image N are defined as the shifts x(N) - x(1) and y(N) - y(1) required to place image N in the same coordinate system as image 1. The default exposure time is 1 time unit.
shifts = ""
The optional relative offsets file. Shifts contains the input image name, the relative x offset and the relative y offset in columns 1 through 3 respectively. The relative offsets of image N are defined as the shifts x(N-1) - x(N) and y(N-1) - y(N) required to register image N to image N-1.
hwhmpsf = 1.25
The approximate half-width at half-maximum of the image PSF in pixels. If the PSF width varies significantly over the sequence hwhmpsf should be set to the average value for the sequence.
threshold = 50.0
The object detection threshold above local background in ADU. Threshold should be set no lower than 4 * sigma where sigma is the standard deviation of the background pixels in ADU.
xlag = 0.0, ylag = 0.0
The approximate relative offsets x(N) - x(N-1) and y(N) - y(N-1) between adjacent images in the input image list.
cbox = 7.0
The centering box size in pixels.
fradius = 2.5 (hwhmpsf)
The fitting radius in units of hwhmpsf. Fradius defines the size of the Gaussian kernel used to compute the density enhancement image and the size of the image region used to do the moment analysis in the object detection step.
sepmin = 5.0 (hwhmpsf)
The minimum separation for detected objects in units of hwhmpsf.
datamin = INDEF, datamax = INDEF
The minimum and maximum good data values in ADU. Datamin and datamax default to the constants -MAX_REAL and MAX_REAL respectively.
roundlo = 0.0, roundhi = 0.5
The minimum and maximum ellipticity values for detected objects, where ellipticity is defined as 1 - b / a, and a and b are the semi-major and semi-minor object axis lengths respectively.
sharplo = 0.5, sharphi = 2.0
The minimum and maximum sharpness values of the detected objects, where sharpness is defined to be the ratio of the object size determined by moments analysis to the hwhmpsf parameter value.
niterate = 3
The maximum number of centroiding iterations.
maxshift = 5.0
The maximum centroiding x and y shifts in pixels.
nxblock = INDEF, nyblock = INDEF
The working block size. If undefined nxblock and nyblock default to the number of columns and rows in the input image respectively.

Description

XFSHIFTS computes total offsets for the images in the input image list inlist and writes the results in a form suitable for input to the xnregistar task to output. If the shifts parameter is defined the relative offsets for adjacent images are written to the file shifts.

XFSHIFTS requires the input image list to be ordered and also requires that the relative offsets between adjacent images are approximately equal to xlag and ylag pixels.

XFSHIFTS computes the relative offsets between adjacent images by first detecting objects in each input image using the STARFIND task, and then centroidiing the object lists in adjacent images and computing relative shifts using the IMCENTROID task.

STARFIND searches the input images for local density maxima with half-widths at half-maxima of ~ hwhmpsf and peak amplitudes greater than threshold counts above the local background, which are brighter than all surrounding objects within a radius of sepmin * hwhmpsf pixels. Data within fradius * hwhmpsf pixels of the detected density maximum and within the good data range defined by the datamin and datamax parameters are used to estimate the object position, shape, and size relative to the PSF. Objects outside the shape and size limits specified by the roundlo, roundhi, sharplo, and sharphi parameters are eliminated from the final object list. By default STARFIND reads the entire input image into memory. If the input images become too large or memory is limited the nyblock parameter can be set. For the sake of efficiency nxblock should be left set to INDEF so that XFSHIFTS always operates on an integral number of image lines. More information on the STARFIND algorithms can be found in the STARFIND task help page.

IMCENTROID computes accurate centers for all the detected objects in adjacent image pairs using a simple centroiding algorithm and a centering box size of cbox. Objects that cannot be centered in niterate or fewer iterations or whose x and y shifts deviate by more than maxshift pixels from the expected shifts in both image are rejected. The remaining objects are used to compute the relative offsets between adjacent images. If adjacent frames contain no objects in common the relative offsets are set to xlag and ylag. Total offsets are computed by summing the relative offsets.

Examples

1. Compute the total offsets for a series of 250 ONIS sky subtracted images which are offset by approximately 50 pixels in x and 0.5 pixels in y. Output both the total and relative offsets. Since the noise in the sky background for these images is around 12 ADU use a detection threshold of 50 ADU.

cl> type simlist
ss_kk07_001
ss_kk07_002
ss_kk07_003
...
...
ss_kk07_249
ss_kk07_250

cl> xfshifts @simlist offsets shifts 1.5 50.0 50.0 0.5 9.0

cl> xnregistar offsets "" "" "" kk07.mosaic kk07.corners

Time requirements

Bugs

See also

xmshifts,xrshifts,xdshifts,starfind,imcentroid