#!/bin/csh # # Example: mplot 0056-001_S.par 3 0 '-60,60,-60,60' 0056-001_S.modelfit # if ( $1 == "" ) then echo "Usage: $0 parameter_file [rms_factor [weighting [subim_limits [modfile]]]]" exit 1 endif if ( -e $1 ) then set parameter_file = $1 set source = $parameter_file:r else echo $1 not found. exit 1 endif if ( $2 != "" ) then set rms_factor = $2 else set rms_factor = 3 endif if ( $3 != "" ) then set weighting = $3 else set weighting = 0 endif if ( $4 != "" ) then set subim_limits = $4 else set subim_limits = '0,0,0,0' endif set modfile = $source:r.mod set drawmod = 'false' if ( $5 != "" ) then if ( -e $5 ) then set modfile = $5 set drawmod = 'true' else echo $5 not found. exit 1 endif endif if ( ${?LOCAL} == 0 ) setenv LOCAL . set plot_file = $LOCAL/$source.ps if ( -e $plot_file ) then echo $plot_file exists\; I will not overwrite it! echo Try setting the environment variable LOCAL to point somewhere else. exit 1 endif echo $0 $parameter_file $rms_factor $weighting $subim_limits $modfile difmap << EOF @$parameter_file rmod $modfile device $plot_file/vps uvweight $weighting,-1 loglevs -1,2048,2 cmul = imstat(rms)*$rms_factor xyrange $subim_limits mapcolor none docont=true mapplot cln,$drawmod quit EOF /bin/rm difmap.log* exit 0