The interactive determination of the offsets is accomplished by identifying common sources in the images in the database mosaic and requires an IRAF image display tool (e.g., ximtool). Since registration of grids of images with minimal overlap between adjacent images (taken to cover large area) and heavily overlapped images which share a common overlap region (taken to reach faint magnitudes) require different strategies, there are two sets of tools to accomplish this task:
1) The cspmark and cspmate tools are best suited for
dataset grids.
2) The cspmatch task is best suited for multiply-overlapped
datasets.
These tools produce a common database which can be used by subsequent
steps in the registration process. In addition, the cspmerge
task, discussed below, allows you to merge databases from both types
of data into a common database (e.g., to bring the second members of
dithered pairs for grid data in registration with the first members of
the pair).
Grid data are most easily handled using the cspmark task. To
use this task, the images must be ordered in the cspmosaic
image so that overlapping images are adjacent to one another. A
typical ``epar'' listing for cspmark is shown below:
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspmark
mosfile = imagemos Mosaic filename
(append = yes) Append to existing coordinate file?
(zscale = yes) Autoscale display?
(z1 = INDEF) Minimum level to be displayed
(z2 = INDEF) Maximum level to be displayed
(mark = circle) Type of mark
(size = 5.) Size of mark
(label = yes) Label each mark?
(cbox = 7.) Size of centering box
(verbose= yes) Verbose output?
(coolist= )
(mode = ql)
Enter the cspmark task by typing:
cspmark imagemos
Using the image cursor successively mark images which appear in adjacent frames: the data must be paired such that each member of the pair corresponds to the position of the selected object in an adjacent frame. The overall order in which the object pairs are selected is unimportant. Avoid very bright stars (which might be saturated) and stars at the edge of the subrasters (whose position can be influenced by the one pixel gap between adjacent sub-rasters). Hopefully, all edge pairs contain at least one object within their common overlap region. If not, subsequent tasks may estimate the offset from other pairs in the same column or row, or from other rows or columns (if desperate!).
The cursor file produced by cspmark is the basis file for the
cspmate task, which collects and averages the spatial offsets
between adjacent frames and links them into a common map. Enter the
cspmate task by typing:
cspmate imagemos
The cspmate task employs many of the conventions of the
iralign/irmatch1(2)d IRAF tasks. A typical ``epar'' listing
for cspmate is shown below:
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspmate
mosfile = imagemos Mosaic filename
(link = no) Read linkage paths from .lnk file?
(nxrsub = INDEF) Index of X reference subraster
(nyrsub = INDEF) Index of Y reference subraster
(guess = yes) Guess missing links from average values?
(new_ori= yes) Move origin to lower left corner?
(trimlim= [0:0,0:0]) Trim limits for input subrasters
(tran = no) GEOTRAN subrasters before IMCOMBINE?
(db_tran= ) Name of database file output by GEOMAP
(geom_tr= linear) GEOTRAN transformation geometry
(max_tra= yes) Offset GEOTRAN to save maximum image?
(interp_= linear) GEOTRAN interpolant
(bound_t= nearest) GEOTRAN boundary
(const_t= 0.) GEOTRAN constant boundary extension value
(flux_tr= yes) Conserve flux during GEOTRAN?
(shift_i= linear) IMSHIFT interpolant
(verbose= yes) Verbose output?
(mode = ql)
mosfile is the name of the cspmosaic mosaic image to be
registered. By default (link=no), the linkage path for each
subraster is computed along two orthogonal paths and the average
linkage is used: one path proceeds along the row to the reference
subraster row, then along the column; the other path proceeds along
the column and then along the row. If link=yes is specified, a
linkage file (called imagemos.lnk in this example) is used to
determine the linkage paths for each subraster. Since arbitrary
linkage paths are allowed, one can accommodate problem images which
are not linked on sufficient sides. You need to walk each piece to
the same final link (one path per line), giving the path position of
each image you trespass on the way from each subraster to the number
of the reference subraster declared by nxrsub and nyrsub.
Here are three sample formats for cspmate link files for the
mosaic in the cspmosaic example above and
nxrsub=2 and nyrsub=2:
Tile order: 9 10 11 12
5 6 7 8
1 2 3 4
File1: File2: File3:
1 2 6 1 5 6 1 2 6
2 6 2 6 2 6
3 2 6 3 7 6 3 2 6
4 3 2 6 4 8 7 6 4 8 7 6
5 6 5 6 5 6
6 6 6
7 6 7 6 7 6
8 7 6 8 7 6 8 7 6
9 10 6 9 5 6 9 10 6
10 6 10 6 10 6
11 10 6 11 7 6 11 7 6
12 11 10 6 12 8 7 6 12 8 7 6
File1 proceeds along the row to the reference subraster row, then along the column; File2 proceeds along the column, then along the row; File3 contains a variety of linkages to avoid missing links.
nxrsub and nyrsub are the column and row indices,
respectively, of the reference subraster. These default to the
central subraster if set to INDEF. If guess=yes, links which
are absent from the database are estimated on the basis of the average
value for the link along the row or column where the link is missing.
Setting guess = no prevents the use of average links when none
exists. Setting new_origin=yes tells the task to find the size
of the combined image in the database and shift the implied origin of
the database to include all of the images by putting the database
origin in the lower left corner of the dataset. new_origin=no
does not reset the origin from wherever it happens to be.
trimlimits specifies in section notation ([left:right,top:bottom])
the number of columns or rows to trim off each edge of each input
subraster before inserting it in the output image. The default is to
trim 1 column or line at each edge. The input images are not touched;
rather the database is marked to exclude these edge regions from the
final image. Setting tran=yes requests that the task transform
the database coordinates according to the geotran conventions
and to mark the database so that the images will be geotransformed
during the combination process. Setting tran=no leaves things
alone. db_tran, geom_tran, max_tran,
interp_tran, bound_tran, const_tran, flux_tran
are parameters employed by geotran and should be left at their
default values. They are ignored when tran=no.
shift_interp specifies the type of interpolant used to shift the
subrasters. This uses the imshift conventions (linear,
nearest, poly3, poly5, and spline3 are
allowed); linear is the perferred choice.
As the XY offset data are being collected, cspmate signals the
presence of mis-matched object pairs as follows:
#Note: non-adjacent pair:482.06 212.9 514. 218.
If you see this message (which generally means that one of a pair of
positions is missing), the linkage will be flawed. You need to
examine your mosaic file at the reported coordinate location, fix the
problem (by editing out the bad position or inserting a missing
position from a pair with cspmark), and rerun cspmate.
During linkage operation cspmate signals missing links and the
action taken:
#DBL Note: no data for link | r 2,3 | #DBL Note: using row_ave para_laps 3 for link | r 2,3 | #DBL Note: no data for link | c 2,1 | #DBL Note: using row_ave perp_laps 1 for link | c 2,1 | #DBL Note: no data for link | c 2,2 | #DBL Note: using row_ave perp_laps 2 for link | c 2,2 | #DBL Note: null links not used in pairs
Note: cspmate, which uses the output from the cspmark
task is set up to operate on mosaics no larger than 10 in X or Y.
(IRAF scripts do not handle arrays well and larger arrays eat up too
much space on the stack.)