NRAO Home > CASA > CASA Toolkit Reference Manual
Advanced use of imager:

As with all CASA applications, imager is designed to be open: all the results are written to and read from standard CASA table files. This open design of imager also allows the user to try out new methods of processing data. Models may be read into Glish, edited or manipulated via standard Glish facilities, and then written out and used subsequently in imager. Suppose that we want to halve the Stokes I of all pixels with negative Stokes I. The following Glish fragment does the trick:

m:=image(’myimage’)  
shape:=im.shape()  
blc:=[1,1,1,1]  
trc:=[shape[1],shape[2],1,shape[4]]  
a:=m.getchunk(blc,trc)  
a[a<0.]*:=0.5  
m.putchunk(a,blc)  
m.flush()  
m.close()


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