IDP3 Region of Interest
On this page:
The ROI window allows a subsection of the work area to be examined in greater detail. The ROI rectangle is fixed to the main screen and the images may move around under it. The data in the ROI is updated whenever the data is redisplayed. The initial zoom factor of the ROI can be set in the user preferences file.
Auto Region and Auto Zoom
If you know that the size of the ROI you want to work with will be the same every time, you can set the size of the box in both the idp3_preferences file and in the File/Edit Preferences from the Main Display Window.
If you left click on the image in the Main Display Window, a ROI of the given size will be formed, centered around where you clicked.
You can also adjust the size of the ROI using the Adjust Coordinates feature in the Adjust ROI Menu.
When a ROI is created, the default zoom is 1. This can be changed in the idp3_preferences file with the "roi_default_zoom_factor" preference.
Region of Disinterest
When using the ROI window, a ROD mask may be created using the 'annotate' widget. Regions of the ROI that are masked are displayed as blank areas and are referred to as the 'Region of Disinterest'. The ROI window provides tools for saving, reading, and moving these RODs. When the "Define ROD" menu item is pressed, the annotate widget pops up and the user may draw circles, lines, rectangles, and ellipses on the ROI window to define the mask. Remember that each shape must be saved before the next shape can be drawn. Also, remember that each shape must be filled, not just outlined before it is saved. When the mask is finished, the user must save a bitmap in TIFF format using the default name, "annotate.tif", before exiting the annotate widget. This is accomplished by pulling down from the 'file' menu in the annotate widget and selecting 'export bitmap -> TIF'. When the "Please Select a File for Writing" window comes up, just press "OK". Then the user can exit the annotate widget "File -> Exit" and the ROD will be displayed on the ROI window.
NOTE: Polygons and binary masks are preferable to using the ROD.
Masks in the ROI
Binary masks where the value of a good pixel is set by the value of mask_good_value in the preferences file may be read as fits, hdf, or tiff files for use in the roi. Masked pixels are excluded when computing radial profiles, noise profiles, and polygon statistics.
Mouse Buttons
Activities with the mouse buttons are controlled by the mouse mode selection made at the top of the roi widget. There is no distinction between which mouse button was used.
An important note about cursor readback:
Cursor readback is available in the ROI window. Cursor position is shown in main window pixels. It is very important to remember that FRACTIONAL POSITIONS ARE GIVEN TO THE RESOLUTION OF THE ROI ZOOM! That is, if the ROI zoom is 4, the cursor position is reported to the nearest 1/4 pixel. Therefore, positions of image features MAY BE REPORTED SLIGHTLY DIFFERENTLY AT DIFFERENT ROI ZOOM FACTORS! The user should experiment with this to convince himself or herself that he or she understands how this works before attempting to locate object positions to fractional pixels.
File Menu
- Load
- Print
- Save
- Close
Adjust ROI Menu
- Adjust Display
Allows the user to see and modify the display minimum and maximum for both the main and ROI windows. If flux is conserved the minimum and maximum for the main display are divided by the square of the zoom factor to set the limits for the ROI display.
- Adjust Coordinates
Allows the user to adjust the coordinates of the ROI by changing the start, stop, center, or length for the x and y axes. The user may also use the centroid solution to center the ROI.
This is useful when defining a very small region of interest because it is sometimes difficult to pull out the exact region desired from the main viewing window.
Zoom Menu
- 1 - 64
Powers of 2 zoom steps for the ROI window. When pressed, window redraws itself at new zoom.
See note on Other Info page about Interpolation Methods.
Align Menu
- Centroid by Reference WCS
If each image that is "ON" has a valid World Coordinate System
each may be centroided relative to the reference image using the
WCS for a first guess of the centroid center. Before using this
routine a centroid must be fit to the desired object in the
reference image to determine its right ascension and declination
of that object. The Radial Profile Widget must be also be active.
The reference CD Matrix and the CRVALs for each image are used to
determine the first guess of the centroid center. The advantage
of this method (as opposed to Aligning by WCS and Realigning by
Centroids - see below) is that the individual images are not
shifted, hence no resampling errors, before the centroid solution
that might bias the result.
- Centroid by Individual WCS
If each image that is "ON" has a valid World Coordinate System
each may be centroided relative to the reference image using the
WCS for a first guess of the centroid center. Before using this
routine a centroid must be fit to the desired object in the
reference image to determine its right ascension and declination
of that object. The Radial Profile Widget must be also be active.
The CD Matrix and the CRVALs for each image are used to determine
the first guess of the centroid center. The advantage of this
method (as opposed to Aligning by WCS and Realigning by Centroids
- see below) is that the individual images are not shifted, hence
no resampling errors, before the centroid solution that might bias
the result.
- Align by WCS
All "ON" images may be aligned by comparing each WCS to that of
the reference image.
- Align by Centroids
All "ON" images may be aligned by comparing their centroid solutions
to that of the reference image.
- Realign by Centroids
When an object in all images that are "ON" is already aligned within
1.5 pixels (previously invoking Align by WCS or data taken with very
small dithers) the alignment may be refined with Realign by Centroids.
- Align by X/Y Positions
When each image is loaded the header is checked for target position
keywords and a WCS. If the keywords, 'RA_TARG' or 'RA_REF' and
'DEC_TARG' or 'DEC_REF', are found as well as a WCS, the x/y position
of the target in the image is computed. The user may align all of
the "ON" images to the reference image based on these x/y positions.
- Undo Alignment
X/Y offsets for all "ON" images are set to 0. to undo any alignment.
Mask Menu
- Move ROI Mask
Pops up a widget allowing the user to move the mask around in the ROI both horizontally and vertically.
- Invert ROI Mask
Sets all bad pixels in the currently defined mask to good and vice versa.
- Remove ROI Mask
Allows the user to discard the previously loaded mask.
Masks are loaded and saved from the File Menu. Masks are turned
ON and OFF via a button in the ROI Display.
- Define ROD
Allows the user to create a "region of disinterest" with the
Annotate Widget.
- Move ROD
Pops up a widget allowing the user to flip the ROD vertically, horizontally, or the move the ROD around.
- Remove ROD
Allows the user to discard the "region of disinterest".
ROD's are loaded and saved from the File Menu. ROD's do not have
the option to be turned off and on.
Plot Menu
- Radial Profile
- Polygon
See also Polygon Page.
- Surface Plots
- Noise Profile
Allows user to enter parameters for the noise profile statistics: x and y centers, beginning and ending annulus radii, annulus width, increment between annuli, and x and y pixel scales.
Noise profile
results may be saved and printed. For more details see help for
Noise Profile in Noise Profile Widget.
- Collapse 1D
Computes the row or column mean or median of data in the ROI.
The result may be saved to disk and/or memory. See help for
ROI 1D Collapse for more details.
- Histogram
Displays a histogram of data in the roi. The number of bins in the histogram is determined by the value of hist_bins in the preferences file or under the Edit Preference menu on the Main Display Window.
The user can also click with the left mouse button on the left side of the plot or with the right mouse button on the right side of the plot to clip the range of the histogram.
The Full button returns the histogram to the full range.
- Contour Map
Pops up contour map of data in the ROI. Options include number of levels, logarithmic spacing of levels, and to overlay contours on image.
- Toggle Cursor
Toggle between standard cursor and a full width cross-hair cursor.
Stats Menu
- Spreadsheet
Pops up a spreadsheet showing all the values of the pixels in the ROI. Automatically updates. Also, if the user clicks on a cell or pulls out a range of cells, a box is drawn around those pixels in the ROI.
- Statistics
Pops up a widget showing the mean, variance, total, min, and max of
the data in the ROI. Automatically updates.
- Aperture Photometry
Computes photometry of a circular or square aperture defined by
the center position and the target radius. Also background flux
may be calculated for the annulus defined by the background inner
and outer radii. Values are printed in the photometry window and
may be saved to a text file. For more details about aperture
photometry see help in Aperture Photometry Widget or the Aperture Photometry Page .
- Asymmetry
Allows the user to measure the asymmetry and concentration
parameter of galaxies and save results to an output file. For
more details about galactic asymmetry see help in the Galactic
Asymmetry Widget.
- Set Color Menu
Allows user to set the desired color for each of the ROI graphics:
radial profile circle, inner and outer noise profile circles,
cross section lines, and polygons.
Select Mouse Mode
- None
Movement of the cursor in the roi window causes the x and y coordinates of the pixel plus its value to be printed at the bottom of the display. Clicking any mouse button has no effect. This is the default mode.
- Cross Section
Define an image cross section by pressing one of the mouse buttons at the beginning of the cross section, dragging to the end of the cross section, and releasing the mouse button.
See Cross Section Page for more details.
- Radial Profile
Define a radial profile by pressing one of the mouse buttons at the center of the radial profile, dragging to the outside edge of the radial profile circle, and releasing the mouse button.
See Radial Profile Page for more details.
- Polygon
Define a polygon by pressing one of the mouse buttons at the points in the image that define the polygon shape. There must be at least 3 points in the polygon. The polygon is automatically closed when a point is double clicked. Do not close the polygon by clicking again at the polygon origin.
See Polygon Page for more details.
- MovePolygon
The polygon shape may be maintained but moved to a different area of the roi with the move polygon option. Press one of the mouse buttons somewhere in the interior of the polygon, drag the polygon to the desired location, and release the mouse button. Since the polygon cannot go outside the roi, it is truncated when it collides with an edge. New polygon image statistics are computed when the mouse button is released. The polygon movement may be undone by the Undo option in the Plot/Polygon menu.
- EditPolygon
The polygon shape may be edited by dynamically adjusting any of its points. Press one of the mouse buttons at the point that is to be modified, drag to the desired location, and release the mouse button. New polygon image statistics are computed when the mouse button is released. The editing may be undone by the Undo option in the Plot/Polygon menu.
Return to main page.