Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image - Tool Up: General Previous: deconvolver.makeprior - Function


images - Module

Postscript file available

Access and analysis of images

include "images.g"


Description

This module contains functionality to access, create, and analyze AIPS++ images. It offers both basic services and higher-level packaged tools.

The available tools in this module are

Images

We refer to an AIPS++ image file when we are referring to the actual data stored on disk. The name that you give an AIPS++ image file is actually the name of a directory containing a collection of AIPS++ 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] = [1,1]. The centre of the top-right corner pixel has pixel coordinate [X,Y] = [10,20].

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 an AIPS++ image file (stores the image in an AIPS++ table), look at the header information and store it in a Glish record for future use, work out some statistics and display the image with the Viewer.

include 'images.g'                                                  # 1
im:=imagefromfits(outfile='data/ne.xyv', infile='$FITS/ne.FITS')    # 2
im.summary()                                                        # 3
im.statistics()                                                     # 4
im.view()                                                           # 5
im.done()                                                           # 6

1.
This gives us access to the Image tool code.
2.
Convert (using the imagefromfits constructor) an image FITS disk file called `ne.FITS' in the directory specified by the environment variable `$FITS' to an AIPS++ image file called `ne.xyv' in the subdirectory called data. The AIPS++ image file is now associated with an image tool called im which was constructed in this process.
3.
This summarises (to the Logger) the basic header information in the image (name, masks, regions, brightness units, coordinates etc).
4.
This tool function evaluates basic statistics from the entire image.
5.
This displays the image with the Viewer.
6.
This destroys the Image tool, but not its associated disk image file.

Tools
coordsys Operations on CoordinateSystems
image Operations on images
imagefitter Fit models to images of the sky
imagepol Polarimetric analysis of images
imageprofilefitter Fit models to 1D profiles from images
imageprofilesupport Plot profiles with axis label conversions
regionmanager Create and manipulate regions of interest

Functions
coordsystest Run test suite for Coordsys tool
coordsystools Find the list of current global Coordsys tools
imagedemo Demonstrate the use of an image
imagedones Done all global or specified Image tools
imagefiles Find the list of image files in the given directory
imagefittertest Run test suite for Imagefitter tool
imagepoltest Run test suite for Imagepol tool
imageprofilesupporttest Run test suite
imagetest Run test suite for Image tool
imagetools Find the list of current global image tools
is_coordsys Is this variable a Coordsys tool ?
is_image Is this variable an image tool ?
is_imagepol Is this variable an imagepol tool ?
is_region Is this a valid region tool?

%




next up previous contents index
Next: image - Tool Up: General Previous: deconvolver.makeprior - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01