NRAO Home > CASA > CASA Cookbook and User Reference Manual
##### 6.6.1.2 Polarization manipulation

The following are some examples using the 3C129 Tutorial

as an example.

It is helpful to extract the Stokes planes from the cube into individual images:

default(’immath’)
imagename = ’3C129BC.clean.image’
outfile=’3C129BC.I’; expr=’IM0’; stokes=’I’; immath();
outfile=’3C129BC.Q’; expr=’IM0’; stokes=’Q’; immath();
outfile=’3C129BC.U’; expr=’IM0’; stokes=’U’; immath();
outfile=’3C129BC.V’; expr=’IM0’; stokes=’V’; immath();

Extract linearly polarized intensity and polarization position angle images:

immath(stokes=’’, outfile=’3C129BC.P’, mode=’poli’,
imagename=[’3C129BC.Q’,’3C129BC.U’], sigma=’0.0mJy/beam’);
immath(stokes=’’, outfile=’3C129BC.X’, mode=’pola’,
imagename=[’3C129BC.Q’,’3C129BC.U’], sigma=’0.0mJy/beam’);

V3.0 ALERT: For mode=’pola’ you MUST call as a function as in this example (giving the parameters as arguments) or immath will fail.

Create a fractional linear polarization image:

default( ’immath’)
imagename = [’3C129BC.I’,’3C129BC.Q’,’3C129BC.U’]
outfile=’3C129BC.fractional_linpol’
expr=’sqrt((IM1^2 + IM2^2)/IM0^2)’
stokes=’’
immath()

Create a polarized intensity image:

default( ’immath’)
imagename = [’3C129BC.Q’,’3C129BC.U’,’3C129BC.V’]
outfile=’3C129BC.pol_intensity’
expr=’sqrt(IM0^2 + IM1^2 + IM2^2)’
stokes=’’
immath()

Toolkit Tricks: The following uses the toolkit (§ 6.23). You can make a complex linear polarization (Q + iU) image using the imagepol tool:

# See CASA User Reference Manual:
# http://casa.nrao.edu/docs/casaref/imagepol-Tool.html
#
# Make an imagepol tool and open the clean image
potool = casac.homefinder.find_home_by_name(’imagepolHome’)
po = potool.create()
po.open(’3C129BC.clean.image’)
# Use complexlinpol to make a Q+iU image
po.complexlinpol(’3C129BC.cmplxlinpol’)
po.close()

You can now display this in the viewer, in particular overlay this over the intensity raster with the intensity contours. When you load the image, use the LEL:

’3C129BC.cmplxlinpol’[’3C129BC.P’>0.0001]

which is entered into the LEL box at the bottom of the Load Data menu (§ 7.3.1).