NRAO Home > CASA > CASA Cookbook and User Reference Manual

5.7 Insert an Image Model (ft)

The ft task will add a source model (units should be Jy/pixel) or a clean component list to a Measurement Set. This is especially useful if you have a resolved calibrator and you want to start with a model of the source before you derive accurate gain solutions. This is also helpful for self-calibration (see § 5.9 below).

The inputs for ft are:

#  ft :: Insert a source model into the MODEL_DATA column of a visibility set:  
vis                 =         ’’        #  Name of input visibility file (MS)  
field               =         ’’        #  Field selection  
spw                 =         ’’        #  Spw selection  
model               =         ’’        #  Name of input model image(s)  
nterms              =          1        #  Number of terms used to model the sky  
                                        #   frequency dependence  
complist            =         ’’        #  Name of component list  
incremental         =      False        #  Add to the existing model visibility?  
usescratch          =      False        #  If True predicted  visibility  is stored in  
                                        #   MODEL_DATA column  
async               =      False        #  If true the taskname must be started using  
                                        #   ft(...)

An example on how to do this:

ft(vis=’n75.ms’,                   # Start with the visibility dataset n75.ms  
   field=’1328’,                   # Select field name ’1328+307’ (minimum match)  
   model=’1328.model.image’)       # Name of the model image you have already

This example will add the source model ’1328.model.imag’ to all entries that match the field name ’1328’. If the parameter usescratch is set to ’True’, ft will Fourier transform the source model and fill the MODEL_DATA column with the data. This, however, is only needed in special applications and usescratch=F is the default.

Alternatively, one can add a clean component list to be used as a model to the MS. The following procedure is an example:

# for a point source with no spectral index  
cl.addcomponent(flux=0.39, fluxunit=’Jy’,shape=’point’, dir=’J2000 19h33m09s 15d01m20s’)  
 
# for a Gaussian with a spectral index  
cl.addcomponent(flux=1.25, fluxunit=’mJy’, polarization=’Stokes’,  
dir=’J2000 19h30m00s 15d00m00s’, shape=’gaussian’, majoraxis=’10arcsec’,  
minoraxis=’6arcsec’, positionangle=’0deg’, freq=’1.25GHz’,  
spectrumtype=’spectral index’, index=-0.8)  
###you can add more components if you wish by calling addcomponent repeatedly with different params  
 
##save it to disk  
cl.rename(’my_component.cl’)  
cl.close()  
 
## write the model into into the measurement set (’myms’)  
ft(vis=’myms’, complist=’my_component.cl’)


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

Copyright © 2010 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