rmarkerx -- Interactively adjust reseau positions.
rmarkerx inres entry outres
This task lets the user interactively modify a reseau grid. We expect that in a given image format, the reseau will tend to move slightly between images in a continuous way---rotating, stretching, or shifting. Individual points, especially at the edges of the image, may have other strange movement.
Start with a reseau table containing positions of all the reseau marks that are likely to be seen---in fact, you can include many marks lying outside the actual image area. These positions can be modified to get better approximate positions for another set of images or to use as input for rfindx.
The user can move the reseau positions, either as a whole grid by specifying new positions for 1, 2, or 4 points, or by changing the positions of individual points. The new grid can then be displayed, and additional changes can be made. The choice of points can be refined by automatically selecting the lowest-valued pixel near each selected point (if an input image was specified). When you are satisfied with the reseau positions, type "q" to exit interactive mode and write the data to the output reseau table.
This task supports all cursor-mode keystrokes (i.e. the upper-case keys), together with the following task-specific commands. Commands are entered using a single, lower-case keystroke, except for those commands that change parameters, which are entered by preceding the command with a colon (:). When the task prompts "where should this be?" for a new reseau position, the position may be given by moving the cursor to the location and hitting a lowercase key or return, or by typing a colon followed by the X and Y pixel coordinates. The following commands include this option: "a", "p", "o", "t", "f".
- List these keystroke commands.
- Assign coordinates to a reseau position. This is similar to "p", except that with "p" the initial position is specified by the cursor location, and the initial position must be defined (i.e. not INDEF). With "a" the position is specified by the column and row indices, rather than by pixel coordinates or cursor position, and the coordinates at that position may be INDEF. The "w" (where) command may be helpful in this context, as it may be used to print the indices of nearby reseau positions that are not INDEF.
- Go back to the original template positions. If you make a mistake in positioning reseau marks, this command can be used to cancel all your changes. See also "s" and "u".
- Delete the reseau mark nearest to the cursor position by setting the pixel coordinates to INDEF. The column and row indices of the mark are printed in square brackets, and the previous X and Y pixel coordinates are printed in parentheses.
- Specify four sets of reseau marks and their new locations.
Bilinear interpolation is then used to calculate new positions for
the other reseau marks.
Position the cursor near the first reseau mark to be moved and type "f"; the reseau mark nearest the cursor will be selected. An asterisk will appear indicating the selected reseau mark. Move the cursor to the reseau mark's new position. Type any lowercase key or the return key, or type a colon followed by the X and Y pixel coordinates. A box will be drawn around the chosen point. If you need to see the plot more closely, type "Z" to zoom. Follow this same procedure for the second, third, and fourth marks.
- Lock on to the reseau by finding the lowest-valued pixel in a box of size xsearch by ysearch, centered at each approximate location. This may be done immediately on entering the interactive stage, or after some adjustment of the positions. In order to use this command, an input image must be available; that is, you must have specified an image name as the value of the image parameter.
- Specify a new location for one reseau mark. New positions for the other marks are calculated by a simple translation. See the instructions for the "f" command for more information.
- Move one point without affecting other points. See the instructions for the "f" keystroke command for more information.
- Quit. Exits the interactive rmarkerx task after writing new positions to the output reseau table.
- Replot all points. Use this keystroke command when the screen gets too cluttered.
- Save the current reseau positions. If positions are subsequently modified, the "u" command may be used to restore the positions to where they were when "s" was given.
- Specify two reseau marks and their new locations. The other mark locations are calculated assuming a simple linear coordinate change. This should only be used with caution, as a transformation based on two points may be very different from what you expect. Use "u" to undo, then "r" to replot the positions. See the instructions for the "f" keystroke command for more information.
- Undo all position changes that occurred after the last "s" command.
- Where are we? This command prints the column and row indices and the X and Y pixel coordinates of the non-INDEF reseau position closest to the cursor. Before using "w" the cursor should be positioned so that it is obviously closer to one reseau mark than to any other, because the task does not mark the closest reseau in any way. This command will not directly show the location of a reseau position that has INDEF coordinates, but you can use "w" to find the indices of a nearby non-INDEF position. This is especially useful before using the "a" command.
Colon commands are used to change parameter values. These commands are issued by typing a colon (:) followed by the command and its new value. Typing the command without a new value will display the current value. After changing the viewport, type "r" to redraw with the new viewport. The following are valid colon commands:
Command Data Type Description ======= ========= =========== :show List parameters. :xsearch integer X side of box used to search for minimum pixel. :ysearch integer Y side of box used to search for minimum pixel. :x1 real Alter viewport by changing the lower X coordinate. :x2 real Alter viewport by changing the upper X coordiante. :y1 real Alter viewport by changing the lower Y coordinate. :y2 real Alter viewport by changing the upper Y coordinate.
- inres [file name]
- Input reseau table containing initial positions of reseau marks. See also entry.
- entry [string]
- Entry name in the reseau table inres for initial reseau positions. Wildcard characters are permitted, but only the first match is used.
- outres [file name]
- Output reseau table for the modified positions produced by rmarkerx. If this table exists, it will be modified in-place. This parameter can have the same value as inres, in which case the modified reseau entries are appended to the file, and newentry should be given a different value from entry so that the old and new entries can be easily distinguished.
- (newentry) [string]
- Entry name to be used in writing the modified positions to outres. If newentry is blank, then the entry name from inres is used.
- (x= 0.0) [real]
- Lower limit for plotting along the X axis, (i.e., set the viewport coordinates along the X axis).
- (x= 1024.0) [real]
- Upper limit for plotting along the X axis.
- (y= 0.0) [real]
- Lower limit for plotting along Y axis.
- (y= 1024.0) [real]
- Upper limit for plotting along Y axis.
- (image) [file name]
- Name of image. This is only used for the l cursor command, so it may be left null if that command is not to be used.
- (xsearch = 5) [integer, min=1, max=50]
- How far in along the X axis should rmarkerx start searching for minimum pixel values? This should be given an odd number. In order to use this you must specify a value for input
- (ysearch = 5) [integer, min=1, max=50]
- How far along the Y axis should rmarkerx start searching for minimum pixel values? This parameter should be given an odd number. In order to use this you must specify a value for input
- (device = stdgraph) [string]
- Graphics output device to be used.
- (logfile) [file name]
- If logfile is specified,
information about each command will be written to this file.
When the task begins, the file will be opened in append mode.
A # sign and the current time and date will be written to the file,
then the input and output table and entry names will be written.
For most commands a one-line entry of the following form will be written:
'o' [3,2] (504.22,505.59) --> (480.95,475.57)
The o is the cursor key for the command. The integers in square brackets are the column and row indices of the reseau mark. The first set of numbers in parentheses are the X and Y pixel coordinates before being modified by the command, and the second set (following the arrow) are the new coordinates.
- (cursor) [file name]
- Graphics cursor input (type "help cursor" for more information on the IRAF cursor facility).
1. Process reseau table "restemplate.tab", entry "handmade". The output will be written to the table "newapprox" with entry name "fixed".
fo> rmarkerx restemplate handmade newapprox newentry="fixed"
2. Process reseau table "restemplate.tab", entry "handmade". The output will be written to the table "newapprox" with the same entry name. The image "focim.d0h" is used for the l cursor command.
fo> rmarkerx restemplate handmade newapprox newentry="" image="focim.d0h"
This task was written by David Giaretta.
Type "help reseau" for a description of reseau table.
Type "help cursor" for a description of the IRAF cursor facility.