NRAO Home > CASA > CASA Toolkit Reference Manual
How to control imager:

To use imager, one has to construct a imager tool using a MeasurementSet as an argument, for example:

myimager:=imager(’3C273XC1.ms’)

The Glish variable myimager then contains the tool functions that may be used to do various operations on the MeasurementSet 3C273XC1.ms. These tool functions can be broken down into those that set imager up in some state, and those that actually do some processing. The setup tool functions are:

setimage
is a required tool function that defines the parameters (size, sampling, phase center, etc.) of any image that is to be constructed. If you omit to call setimage prior to any operation that needs these parameters, an error message will result. setimage is passive: nothing happens immediately but subsequent processing is altered.
setdata
is an optional tool function that selects which data are to be operated on during the processing. This selection can consist of choosing the spectral windows or fields that are to be operated on, or setting channels that are to be operated on in subsequent processing. setdata is active: the selection occurs immediately and is effective for all subsequent operations (until setdata is called again).
setoptions
is an optional tool function that sets parameters of lesser importance such as gridding parameters, cache sizes. While these affect the processing, usually the default values will suffice. setoptions is passive: nothing happens immediately but subsequent processing is altered.
setbeam
is an optional tool function that sets the parameters of the synthesized beam to be used in restoring deconvolved images. setbeam is passive: nothing happens immediately but subsequent processing is altered.
setvp
is an optional tool function that sets the parameters of the voltage pattern model used in mosaicing. setvp is passive: nothing happens immediately but subsequent processing is altered.
setsdoptions
is an optional tool function that sets the relative scaling and weighting of single dish data versus interferometer data and also other single dish specific parameters like the convolution support when doing single dish imaging.

Thus to understand what imager is doing, one has to remember that at any time, it has a state that has been set by using these tool functions. The state may be viewed in one of two ways: either summary can be used to output the current state to the logger, or, in the GUI, the current state of these parameters is displayed and updated following any relevant changes.

All the other tool functions of imager are active: something happens immediately. Hence, for example, the weight tool function acts immediately to change the weighting of the selected data. In particular, unlike other packages, it does not set the weighting parameters for latter operations. The clean tool function performs a clean deconvolution of an image, reading and writing a model image. Note that operations that require or produce an image usually take an appropriate image name in the argument list. Often if such an image is not given then it is constructed using the image parameters set via ?? and using an appropriate name (e.g. a restored image is named from the model image by appending .restored so that 3C273XC1.clean becomes 3C273XC1.clean.restored).

The concept of the state of imager bears a little more explanation. The MeasurementSet can potentially contain data for many different fields and spectral windows. One therefore has to have some way of distinguishing which data are to be included in processing. Rather than have each possible tool function (e.g. weight, image, clean) take a long list of parameters to determine which data are to be included, imager has a ?? tool function that sets imager up some that in subsequent processing only the selected data are processed. For example, to select only field id 1 and spectral windows 1 and 2, one would do:

myimager.setdata(fieldid=1, spwid=1:2)

The state of imager also consists of information about the default image settings (set via ??) and various less important options (set via setoptions).


More information about CASA may be found at the CASA web page

Copyright 2016 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