![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaDocument | |||
Access and analysis of images
Description
This module contains functionality to access, create, and analyze CASA images. It offers both basic services and higher-level packaged tools.
The available tools in this module are
Images
We refer to a CASA image file when we are referring to the actual data stored on disk. The name that you give a CASA image file is actually the name of a directory containing a collection of CASA tables which together constitute the image file. But you only need to refer to the directory name and you can think of it as one logical file. Some images don’t have an associated disk file. These are called “virtual” images (e.g. an image that is temporary and entirely in memory). Whenever we use the word “image”, we are just using it in a generic sense.
Images are manipulated with an Image tool.
Pixel mask
A pixel mask specifies which pixels are to be considered good (mask value T) or bad (mask value F). For example, you may have imported a FITS file which has blanked pixels in it. These will be converted into pixel mask elements whose values are bad (F). Or you may have made an error analysis of an image and computed via a statistical test that certain pixels should be masked out for future analysis.
An image file may contain zero, one, or more pixel masks. However, only one mask will be designated as the default mask and be applied to the data.
For more details, see the Image tool.
Region-of-interest
A region-of-interest or simply, region, designates which pixels of the image you are interested in for some (generally) astrophysical reason. This complements the pixel mask which specifies which pixels are good or bad (for statistical reasons). Regions-of-interest are generated and manipulated with the Regionmanager tool.
Briefly, a region-of-interest may be either a simple shape such as a multi-dimensional box, or a 2-D polygon, or some compound combination of regions-of-interest. For example, a 2-D polygon defined in the X and Y axes extended along the Z axis, or perhaps a union or intersection of regions.
See the Regionmanager documentation for more details on regions.
Coordinates
We will often refer to (absolute) pixel coordinates. Consider a 2-D image with shape [10,20]. Then our model is that the centre of the bottom-left corner pixel has pixel coordinate [X,Y] = [0,0]. The centre of the top-right corner pixel has pixel coordinate [X,Y] = [9,19].
When a physical Coordinate System (e.g. an RA/DEC direction coordinate) is attached to an image, then we can convert pixel coordinates to a world (or physical) coordinate.
The Coordsys tool is available for manipulating Coordinate Systems. You can recover the Coordinate System from an image into a Coordsys tool via the Image function coordsys.
For more details, see the Image and Coordsys tools.
Lattice Expression Language (LEL)
This allows you to manipulate expressions involving images. For example, add this image to that image, or multiply the miniumum value of that image by the square root of this image. The LEL syntax is quite rich and is described in detail in note 223.
LEL is used in several of the Image tool functions.
Example Here is a simple example to give you the flavour of using the image module. Suppose we have an image FITS disk file; we would like to convert it to a CASA image file (store the image in a CASA table), look at the header information and store it in a record for future use, work out some statistics and then close the image.
"""
# print "\t----\t Module Ex 1 \t----" pathname=os.environ.get("AIPSPATH") pathname=pathname.split()[0] datapath=pathname+"/data/demo/Images/imagetestimage.fits" ia.fromfits(outfile=’testimage.im’, infile=datapath, overwrite=T) # 1 hdr = ia.summary() # 2 ia.statistics() # 3 ia.close() # 4 print "Last example! Exiting..." exit() # """ |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2007 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
Updated daily during alpha development.