Cursor Regions in SAOimage
There are two classes of regions; include and exclude. When used by the PROS software, an include region indicates an area of interest for analysis (e.g. for counts within a region). An exclude region indicates areas or pixels to be excluded from analysis (e.g. bad pixels or areas affected by other phenomena such as an adjacent source).
CIRCLE(624,75,15) # gsc 4383.1127 EX(688,703,21) # gsc 4383.0574 DIAMOND(852,504,21) # gsc 4383.0434 CROSS(770,879,21) # gsc 4383.0308 SQUARE(297,529,21) # gsc 4383.0565
Saved regions are normally drawn and labeled. On color workstations, include regions are drawn in yellow, while exclude regions are drawn in red. The label usually has three parts: the coordinates of the center, a line from the center to the edge along the region's positive Y axis, and the length of the radius along that line. The radius is followed by a "+" for include regions or a "-" to indicate an exlude region. Only the center coordinate is given for a point (followed by a "+" or "-"). The point is at the left edge of the label and on a line along the bottom of the label characters. Polygons have no labels.
In the region submenu, the "label" button suppresses labeling of the regions. The "view" button completely suppresses display of the regions. These buttons are both toggle buttons which are turned on or off when pressed.
The "cycle" button makes the cursor an exact copy of a region (recalling the cursor). The center of that region and its sequence number are displayed in the magnifier window. Repeatedly pressing "cycle", copies each region in turn (cycles through the regions). The cycled cursor is a normal cursor and can be manipulated. The copied region is unaffected by "cycle", however, the just copied region can be deleted by pressing the "omit" button. The "omit" button only works if the cursor has just been cycled to that region. Once you alter the cursor "omit" is disabled. To adjust a region, "cycle" the cursor to that region, "omit" the original region, adjust the cursor, and then save the cursor as a new region.
The "reset" button clears the memory of all regions (deletes all regions).
The "read" and "write" buttons read and write ascii descriptions of regions to or from a disk file.
A PROS region consists of a leading space (include) or "-" sign (exclude) followed by the name of the region type, its center coordinates in file pixels, and then its radius on its X axis, its radius on its Y axis, and its angle in degrees (counter clockwise from straight up as per astronomical convention). Some regions don't have angles (or the angle 0 is not given), circles have only 1 radius, and points have no radii. Polygons are represented by pairs of coordinates (X,Y,X,Y,...). See the PROS region documentation for a full explanation.
# images/m51.fits # Mon Jan 16 16:09:43 1989 # shape x, y, [x dimension, y dimension], [angle] BOX(135.67,213.00,18.00,10.67) BOX(504.00,538.00,16.96,106.53,290.714) CIRCLE(129.00,306.67,9.89) -ELLIPSE(486.00,468.00,36.53,44.08,329.036) -POINT(83.00,349.00) POLYGON(131.00,245.00,120.67,280.33,165.00,245.00,140.00,234.67)Annuli of boxes and ellipses are not supported basic PROS region types. They are implemented as logical combinations of the basic PROS types.
BOX(149.67,205.00,10.00,4.00) BOX(149.67,205.00,20.00,8.00) & !BOX(149.67,205.00,10.00,4.00) BOX(149.67,205.00,30.00,12.00) & !BOX(149.67,205.00,20.00,8.00)The above example has two concentric rings and the center area.
When "write" is pressed, a popup window appears to prompt the user for the file name. The window may be initialized to a default, or the previously given file name. To select a different name name, edit the name in the window (see the Keyboard section). If the named file already exists, another popup window appears with the options to overwrite the existing file ('o'), append to the existing file ('a'), or quit without writing anything ('q').
PROS format files which were previously written can be read back in. Press the "read" button and give the name of the file. Reading does not support the full PROS region syntax (i.e. PIE slices are not supported), but much of the syntax is supported, including any syntax used by the "write". Regions read from disk are added to any regions already stored.
The output as an Imtool list, equivalent to the first example, would look like the following:
# images/m51.fits # Fri Jan 20 13:35:36 1989 # (x, y) 136 213 504 538 129 307 486 468 83 349 131 245 149 205If your environment has been properly initialized as for an IRAF Imtool user, the default list output filename will follow standard IRAF conventions. When read, the list coordinates are all read as exclude points.