Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 803
News FAQ
Search Home


next up previous contents
Next: Bibliography Up: Mosaicing (Multi-field imaging) Previous: Self-calibration

An Example Mosaicing Script

The following script is nothing special, just making an interferometer-only mosaic image from the multi-field test measurementset which is distributed with AIPS++:

include 'imager.g'

# Generate MS and construct Imager tool

imagermaketestmfms(msfile='XCAS.ms')
imgr := imager('XCAS.ms')

# Use the first field as the image center 

imgr.setimage(nx=256, ny=256, cellx="3arcsec", 
              celly="3arcsec", stokes="I", doshift=F,
              mode="mfs", spwid=1, fieldid=1,  facets=1)

# Weight each field individually 

for (myfield in [1:7]) { 
  imgr.setdata(fieldid=myfield)
  imgr.weight(type="uniform")
} 

# Use all the data for the mosaic 
imgr.setdata(mode="channel", nchan=1, start=1, step=1, 
             spwid=1, fieldid=[1:7]) 

# Use the voltage pattern (primary beam) 

imgr.setvp(dovp=T, usedefaultvp=T, dosquint=F); 

# Make a MEM image  (using  mask image)
base := 'mem'
maskname:= spaste(base, '.mask')
modname := spaste(base, '.model')
imgname := spaste(base, '.image')
resname := spaste(base, '.resid')
scalename := spaste(base, '.scale')

reg1:=drm.box([70, 70,1,1], [185, 185, 1, 1])            # define region of image
imgr.regionmask(maskname, reg1)                          # make a mask image to limit search for flux

imgr.setmfcontrol(cyclefactor=3.0, cyclespeedup=20.0,
                  fluxscale=scalename)
imgr.mem(algorithm='mfentropy', niter=80, sigma='0.001Jy',
         targetflux='10.0Jy', constrainflux=F, 
         displayprogress=T,  fixed=F, 
         complist='', prior='', 
         mask=maskname,
         model=modname, 
         image=imgname, 
         residual=resname)

# Make a multi-scale CLEAN image  for comparison

base := 'msclean'
modname := spaste(base, '.model')
imgname := spaste(base, '.image')
resname := spaste(base, '.resid')
scalename := spaste(base, '.scale')
imgr.setscales(scalemethod='uservector', uservector=[0.0, 3.0, 10.0, 20.0])
imgr.setmfcontrol(cyclefactor=3.0, cyclespeedup=200.0, 
                  fluxscale=scalename); 
imgr.clean(algorithm='mfmultiscale', niter=1000, gain=0.6, 
           threshold='0Jy', 
           displayprogress=T, fixed=F, complist='',
           mask=maskname, 
           model=modname, 
           image=imgname, 
           residual=resname)

# Destroy Imager tool

imgr.done();


next up previous contents
Next: Bibliography Up: Mosaicing (Multi-field imaging) Previous: Self-calibration   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2004-08-28