# # Set the various paraments of imaging # FITSFILE := "./AXAF_0202 ./AXAF_0203 ./AXAF_0213 ./AXAF_0214 ./AXAF_0215" TMPMS := 'tmpms.ms'; # Temporary MS for concatenation MS := 'axaf_all.ms'; # Name of the MS ALGO := 'mfclark'; # The algorithm to use for IMSIZE := [3000,3000]; # The image size CELLSIZE := ['2arcsec','2arcsec']; # The cellsize SPWID := [1,2]; # Spectral windows to image FIELDID := 1; # Field IDs to image NFACETS := 1; # No. of facets WPROJPLANES:=128; # No. of gridding convolution functions used in # w-project fourier transform STOKES := 'I'; # Stokes value MODEL_IMAGE_NAME:='axaf.im'; # Name of the image files. # The restored Clean-ed image # and the residual imgaes are # stored in images with # ``.clean'' and ``.res'' # appended to this name. NITER := 50000; # No. of Clean components THRESHOLD:= '50e-3mJy' # The Cleaning threshold. The # iterations are stopped when # the magnitude of the # strongest components is lower # than this value. DOINTERACTIVE:= F; # Set it to T to do interactive # box setting in-between iterations. # ---- # Import # include 'ms.g'; # myms:=fitstoms(fitsfile=FITSFILE[1],msfile=MS,readonly=F); # N:=len(FITSFILES); # for (i in 2:N) { # shell(spaste('rm -rf ',TMPMS)); # print spaste('Converting file ',FITSFILES[i]); # tmpms:=fitstoms(fitsfile=FITSFILES[i],msfile=TMPMS,readonly=F); # myms.concatenate(TMPMS); # tmpms.done(); # } # ---- # Image include 'imager.g'; im:=imager(MS); im.setdata(spwid=SPWID,fieldid=FIELDID,mode='none'); im.setimage(nx=IMSIZE[1],ny=IMSIZE[2], cellx=CELLSIZE[1],celly=CELLSIZE[2], facets=NFACETS,stokes=STOKES, spwid=SPWID,fieldid=FIELDID); im.weight(type="briggs"); im.setoptions(ftmachine='wproject',wprojplanes=WPROJPLANES); im.clean(algorithm=ALGO, niter=NITER,threshold=THRESHOLD, interactive=DOINTERACTIVE, model=MODEL_IMAGE_NAME, image=spaste(MODEL_IMAGE_NAME,'.clean'), residual=spaste(MODEL_IMAGE_NAME,'.res'));