NRAO Home > CASA > CASA Toolkit Reference Manual
imagepol.imagepol - Function

1.1.4 Create an Imagepol tool from an CASA image file


Description

The constructor takes an image as its input. This can be specified as either the name of a disk file, or you can give a pre-existing Image tool. If you give a disk file name, the disk image file may be in casa, fits or Miriad format.

The input image must have a Stokes axis. The exact collection of Stokes that the image has, determines what the Imagepol tool can compute. Stokes I, Q, U, and V refer to total intensity, two components of linear polarization, and circular polatization, respectively. Therefore, if you ask for linear polarization and the image only has Stokes I and V, you will get an error.

The input image may contain data at many frequencies. For example, the image may be a 4D image with axes RA, DEC, Stokes and Frequency (order not important) where the Frequency axis is regularly sampled. However, the image may also contain many frequencies at irregular intervals. Such an image may be created with the Image tool constructor called imageconcat. It enables you to concatenate images along an axis, and it allows irregular coordinate values along that axis.

Arguments





Inputs

Returns
imagepol

Example

 
"""  
#  
print "\t-\t constructor Ex 1 \t-"  
#- im = image(’$AD/myimage’)  
#- p1 = imagepol(im)  
#- p2 = imagepol(’$AD/myimage’)  
po.imagepoltestimage(’stokes.cube’)  
po.done()  
p1 = ia.newimagefromfile(’stokes.cube’)  
po.open(p1.torecord())  
po.close()  
p1.done()  
po.open(’stokes.cube’)  
#  
"""  
 
We create two Imagepol tools, one from an Image  
tool and one directly from the disk file.  
 

Example

 
"""  
#  
print "\t-\t constructor Ex 2 \t-"  
#- im = imageconcat(infiles="im.f1 im.f2 im.f3 im.f4 im.f5", axis=4)  
#- p = imagepol(im)  
po.open(’stokes.cube’)  
po.rotationmeasure(rm=’rm’, rmerr=’rmerr’, rmmax=500, maxpaerr=10)  
po.close()  
#  
"""  
 
Say we have 5 images, each with axes RA, DEC, Stokes, and Frequency in  
that order.  We make an Image tool which concatenates these images  
along the frequency axis - you have ordered them in increasing or  
decreasing frequency order.  Note that the Image tool is virtual - it  
is not written to an output file.  This just means that the data are  
read from the input images as needed.  The Imagepol tool is then made  
from this virtual Image tool.   We then compute the Rotation Measure  
and Rotation Measure error images with the traditional method and  
write them out to disk.  
 

__________________________________________________________________


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