|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
5.6.1 Making Deconvolution Regions from an Image (boxit)
The boxit task creates “cleanbox” deconvolution regions automatically from an image. It searches the image to find “islands”: all contiguous sets of pixels above the given threshold. The extreme x- and y-pixels of the island are used to determine the corners of a rectangular box that covers each island. The set of boxes are written out into a single region file with extension .rgn. Boxit works on single-plane images as well as multi-channel images: in the latter case, the thresholding and boxing is done separately in each plane of the image. The output region file from boxit can be used as the mask input parameter for the clean task (§ 5.3).
The parameter inputs for boxit are:
imagename = ’’ # Name of image to threshold
regionfile = ’’ # Output region file
threshold = ’0.0mJy’ # Threshold value. Must include units.
minsize = 2 # Minimum number of pixels for a boxable island
diag = False # Count diagonal connections?
boxstretch = 1 # Increase box sizes by this many pixels beyond thresholded pixels.
overwrite = False # Overwrite existing region file?
async = False # If true the taskname must be started using boxit(...)
The regionfile parameter specifies the root name of the region file. It will automatically be given .rgn as the file extension. The minsize parameter specifies the smallest island that qualifies to be boxed. It refers to the total number of pixels in the island. To include pixels connected only on the diagonal as being part of the same island, set the diag parameter to True. The boxstretch parameter increases the size of the boxes beyond the extent of the island, and can range from -1 to 5. For a value of 1 (the default), the box is stretched by one pixel in each outward direction; therefore, each side of the box lengthens by two pixels. Finally, the parameter overwrite specifies whether an existing region file can be overwritten.
ALERT: The boxit task is a prototype under active development and coded in Python. Eventually we will add functionality to deal with the creation of non-rectangular regions and with multi-plane masks, as well as efficiency improvements.
More information about CASA may be found at the
CASA web page
Copyright © 2010 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search