#!/bin/csh # runs automatic mapping script muppet on file $1 to generate # a fully self-calibrated and cleaned naturally weighted map. Then # make postscript file with power-2 contours starting at X Jy/beam. # # usage: automap source.edt ! start with edited data # output: source.cmp_n ! naturally weighted map # source.ps ! contour postscript plot # source.uvf ! self-calibrated uvdata # source.mod ! set of clean components # source.win ! clean windows # source.par ! difmap parameters file # source.log ! log file # # written 03/20/94 by Greg Taylor #------------------------------------------------------------------------- # get root of source name set n = $1:r # set the bottom contour level on the following line in Jy/beam # set x = `grep $n table2.txt | nawk '{print ($8/100 * $6)/1000}'` set x = 0.001 # remove previously generated postscript file, if any test -f $n.ps; if ($status == 0) then echo "skipping source "$n goto skip endif # remove previous difmap log files test -f $n.log; if ($status == 0) then \rm $n.log* endif # load uvdata and run automatic mapping script muppet dif << eodif logfile $n.log obs $1 @muppet $n wmap "$n.cmp_n" quit eodif \rm $n.fits # get vector agreement factor between model and data and maximum in map set fit = `nawk '/Fit after self-cal/ { fit = $6}; END { print fit}' $n.log` set peak = `nawk '/Clean map min=/ { last = $5 }; END {print last}' ${n}.log` # use mapplot to make a contour plot of the final map mapplot << eof opaque mapfil $n.cmp_n topleft="\fr%s" topright="\fr%d" charsize=1.4,1.0 title="","$fit, $peak" annot=-1 beam plev 0 clev $x levs=-1,1,2,4,8,16,32,64,128,256,512,1024,2048 plotfil "$n.ps/vps" / eof # all done skip: exit 0