! Hands off mapping procedure for X-band data ! NOTE: data must be reasonably well calibrated and edited. ! ! from the original by Martin Shepherd and Greg Taylor on 3/15/1994 ! print "***********************************" print "*** Using gonzo instruction set ***" print "***********************************" float field_size; field_size = 2048 float field_cell; field_cell = 0.1 integer clean_niter; clean_niter = 50 float clean_gain; clean_gain = 0.03 float dynam; dynam = 8.0 float win_mult; win_mult = 1.8 ! Define the inner loop as a macro. float solint; solint = 3.6/6.0 logical doflt; doflt = true logical doamp float new_peak float flux_cutoff #+map_residual \ flux_cutoff = imstat(rms) * dynam;\ repeat;\ if (peak(flux) > flux_cutoff) peakwin win_mult;\ clean clean_niter,clean_gain;\ flux_cutoff = imstat(rms) * dynam;\ selfcal doamp, doflt, solint;\ new_peak = peak(flux);\ until(new_peak<=flux_cutoff) ! Read in the data. !observe %1 ! Create the map grid. mapsize field_size,field_cell ! Select the data select ! Self-cal to a point source startmod ! Start mapping the field using uniform weighting. uvweight 2,-1 doamp = false peakw win_mult map_residual print "****************************************" print "*** Finished Uniform Weighting CLEAN ***" print "****************************************" ! See if natural weighting reveals any further flux in the current field. uvweight 0,-1 win_mult = win_mult * 1.6 clean_niter = clean_niter * 2 dynam = dynam - 0.5 doamp = false map_residual print "****************************************" print "*** Finished Natural Weighting CLEAN ***" print "****************************************" ! Check antenna gain calibration (compute one scale factor per antenna). gscale true dynam = dynam - 0.5 doamp = false map_residual ! Amplitude self-cal. dynam = dynam - 1.0 doamp = true solint = solint * (6.0/3.6) map_residual doamp = false solint = solint / (6.0/3.6) map_residual print "***********************************" print "*** Finished Amplitude Self-Cal ***" print "***********************************" ! Save data save %1 print "****************************" print "*** Now, make some plots ***" print "****************************" @gonzo_plot %1