% @(#)match_mosa.hlq 17.1.1.1 (ESO-SDAG) 01/25/02 17:48:53] %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %.COPYRIGHT (c) 1995 European Southern Observatory %.IDENT match_mosa.hlq %.AUTHOR RHW, IPG/ESO %.KEYWORDS MIDAS, ccd package, MATCH/CCD %.PURPOSE On-line help file for the command: MATCH/CCD %.VERSION 950724 RHW created %--------------------------------------------------------------------- \se SECTION./MOSAIC \es\co MATCH/MOSAIC 24-Jul-1995 RHW \oc\su MATCH/MOSAIC in_frm in_tab out_frm method,data [match] [nxrsub,nyrsub] [xref,yref] [x_size,y_size] Align and match the elements of the mosaiced frame \up\sy\us\pu Purpose: Align and match the elements of the mosaiced frame \up\sy Syntax: MATCH/MOSAIC in_frm in_tab out_frm method,data [match] [xref,yref] [xoff,yoff] [x_size,y_size] \ys\pa in_frm= The mosaiced frame to be aligned. This frame must have been produced by the CREATE/MOSAIC command. \ap\pa in_tab= The database table from the CREATE/MOSAIC task. This table contains all relevant information about the subrasters and the way the mosaic is built. \ap\pa out_frm= The aligned output frame produced by the command. \ap\pa method,data= Method to compute the matching intensities in the overlap regions. Three inputs are possible: a) S(hift),xshift,yshift. In this case the shift is assumed to be constant with respect to its neighbour in x (xshift) and in y (yshift). b) C(oord),table. In this case, the table is assumed to contain the coordinates of objects in the input frame, one object per line in the following format: \\ 1) the x and y coordinates of the object in the first subraster;\\ 2) the x and y coordinates of the same object in the second subraster; 3) the x and y coordinates of the next object in the first subraster; etc.\\ b) (R)eference,table. The table is assumed to contain the x and y shifts in columns 1 and 2 respectively for each input subraster relative to the reference subraster. The most common use of this option is to make fine adjustments by hand to the output of ALIGN/MOSAIC by editing the computed shifts slightly and rerunning the command with the new shifts. \ap\pa match= Match intensities using the overlap region between adjacent subrasters. The median intensity is computed in the overlap region and the intensity scale of the current subraster is scaled to that of the previous subraster. Intensities are matched in two dimensions, first in the order in which they were placed in the output image and then in the orthogonal dimension. The default is "*", i.e. match everything. Those subrasters to be matched must be listed by number. For example to match intensities for subrasters 1 to 5, 10 and 20 set match = "1:5,10,20". To match all the subrasters set match = "*". \ap\pa nxrsub,nyrsub= The column and row index of the reference subraster. This will default to the central subraster. \ap\pa xref,yref= The x and y offset of the destination in the output frame of the reference subraster. By default the reference subraster occupies the same position in the output frame that it does in the input frame. \ap\pa nocols,norows= The number of columns and lines in the output frame. The defaults are the number of columns and lines in the input frame. \ap\no Note: The command MOSAIC/MOSAIC is controlled by the input parameters and an additional number of CCD keywords: \\ MO_TRIM - the number of columns or rows to trim off each edge of each input subraster before inserting it in the output frame. The default is to trim 1 column or row at each edge.\\ MO_INTER - The type of interpolant use to shift the subraster. Possible options area : nearest, linear, poly3, poly5, and spline3.\\ MO_BLANK - to define the pixel intensity in undefined regions.\\ \\ MATCH/MOSAIC takes the mosaiced frame (in_frm), the database file (in_tab) generated by CREATE/MOSAIC, and a list of coordinates (method) and computes an output frame (out_frm) in which all the individual subrasters are aligned. If method="coords", MATCH/MOSAIC accumulates the relative shifts between adjacent subrasters from the table into a total shift for each subraster with respect to the reference subraster.\\ \\ Shifts which do not correspond to adjacent subrasters are ignored. For subrasters which have no direct shift information, MATCH/MOSAIC makes a best guess at the x and y shift based on the shifts of nearby subrasters which do have direct shift information. If the x and y shifts are sufficiently uniform over the whole input frame the user may set the method parameter to "shifts" and supply values for the xshift and yshift. Alternatively ,the shifts may be read from a table file using the method="file".\\ \\ Coordinate tables may be generated interactively using the command SHIFT/MOSAIC command and using the display cursor.\\ \\ The subrasters are inserted into the output frame using the interpolation scheme defined by the CCD keyword MO_INTER, and aligned with reference to the subraster defined by the parameter nxrsub and nyrsub, using the shifts defined by the coordinates in a table or defined by xshift and yshift parameters. Subrasters are inserted into the output frame in the order they were placed in the original mosaic with pixels in the most recently placed subrasters replacing those in earlier placed ones in the overlap regions.Undefined pixels in the output frame are given the value stored in the keyword CCD_NUL.\\ \\ The position of the reference subraster in the output frame may be adjusted by setting the offset parameters xref and yref. The edges of each subraster may be trimmed before insertion into the output frame by setting the CCD keyword MO_TRIM. \on\see See also: SET/CCD, SHOW/CCD, CREATE/MOSAIC, SHIFT/MOSAIC, ALIGN/MOSAIC, FIT/MOSAIC \ees\exs Examples: \ex MATCH/MOSAIC mosin mosout mosdb coords,coordtab 6,5 Align and match the mosin frame with respect to subraster 6, 5 \xe\ex SET/CCD MO_TRIM=2,2,2,2 MATCH/MOSAIC mosin mosout mosdb coords,coordtab 6,5 The same as above but trim 2 rows and columns off of each input image before inserting into the output frame. \xe \sxe