! Started logfile: J2202+4216_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:19:11 2007
obs J2202+4216_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J2202+4216_S_2001_04_09_pus_uva.fits
! AN table 1: 163 integrations on 190 of 190 possible baselines.
! AN table 2: 80 integrations on 190 of 190 possible baselines.
! AN table 3: 8 integrations on 190 of 190 possible baselines.
! AN table 4: 44 integrations on 190 of 190 possible baselines.
! AN table 5: 255 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.157665 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2202+4216
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1949 lines of history.
! 
! Reading 65904 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J2202+4216_S_2001_04_09_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 2137 telescope corrections were flagged in sub-array 1.
!  A total of 1224 telescope corrections were flagged in sub-array 2.
!  A total of 160 telescope corrections were flagged in sub-array 3.
!  A total of 652 telescope corrections were flagged in sub-array 4.
!  A total of 3434 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 2137 telescope corrections were flagged in sub-array 1.
!  A total of 1244 telescope corrections were flagged in sub-array 2.
!  A total of 160 telescope corrections were flagged in sub-array 3.
!  A total of 652 telescope corrections were flagged in sub-array 4.
!  A total of 3434 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 2137 telescope corrections were flagged in sub-array 1.
!  A total of 1218 telescope corrections were flagged in sub-array 2.
!  A total of 160 telescope corrections were flagged in sub-array 3.
!  A total of 652 telescope corrections were flagged in sub-array 4.
!  A total of 3434 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 2137 telescope corrections were flagged in sub-array 1.
!  A total of 1244 telescope corrections were flagged in sub-array 2.
!  A total of 160 telescope corrections were flagged in sub-array 3.
!  A total of 652 telescope corrections were flagged in sub-array 4.
!  A total of 3434 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=1.008133Jy  sigma=0.007330
! Fit after  self-cal, rms=0.641763Jy  sigma=0.004504
! clrmod: Cleared the established, tentative and continuum models.
! Redundant starting model cleared.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=1.802 mas, bmaj=2.555 mas, bpa=0.1401 degrees
! Estimated noise=695.245 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.552195 Jy
! Component: 100  -  total flux cleaned = 0.794797 Jy
! Total flux subtracted in 100 components = 0.794797 Jy
! Clean residual min=-0.022260 max=0.139403 Jy/beam
! Clean residual mean=0.000596 rms=0.008051 Jy/beam
! Combined flux in latest and established models = 0.794797 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.794797 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.536973Jy  sigma=0.003988
! Fit after  self-cal, rms=0.528713Jy  sigma=0.003954
! Inverting map 
! Added new window around map position (-0.5, -3).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.167607 Jy
! Component: 100  -  total flux cleaned = 0.277931 Jy
! Total flux subtracted in 100 components = 0.277931 Jy
! Clean residual min=-0.017235 max=0.063521 Jy/beam
! Clean residual mean=0.000436 rms=0.005337 Jy/beam
! Combined flux in latest and established models = 1.07273 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 26 components and 1.07273 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.429254Jy  sigma=0.002981
! Fit after  self-cal, rms=0.425521Jy  sigma=0.002962
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0912079 Jy
! Component: 100  -  total flux cleaned = 0.158313 Jy
! Total flux subtracted in 100 components = 0.158313 Jy
! Clean residual min=-0.014359 max=0.040610 Jy/beam
! Clean residual mean=0.000338 rms=0.004066 Jy/beam
! Combined flux in latest and established models = 1.23104 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 35 components and 1.23104 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385627Jy  sigma=0.002523
! Fit after  self-cal, rms=0.384685Jy  sigma=0.002519
! Inverting map 
! Added new window around map position (1.5, -3.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0560226 Jy
! Component: 100  -  total flux cleaned = 0.100947 Jy
! Total flux subtracted in 100 components = 0.100947 Jy
! Clean residual min=-0.013173 max=0.027766 Jy/beam
! Clean residual mean=0.000275 rms=0.003461 Jy/beam
! Combined flux in latest and established models = 1.33199 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 52 components and 1.33199 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.366629Jy  sigma=0.002300
! Fit after  self-cal, rms=0.366191Jy  sigma=0.002298
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0394472 Jy
! Component: 100  -  total flux cleaned = 0.0720924 Jy
! Total flux subtracted in 100 components = 0.0720924 Jy
! Clean residual min=-0.012210 max=0.025188 Jy/beam
! Clean residual mean=0.000231 rms=0.003115 Jy/beam
! Combined flux in latest and established models = 1.40408 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 60 components and 1.40408 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.356567Jy  sigma=0.002171
! Fit after  self-cal, rms=0.356302Jy  sigma=0.002170
! Inverting map 
! Added new window around map position (1, -7).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0305135 Jy
! Component: 100  -  total flux cleaned = 0.0559546 Jy
! Total flux subtracted in 100 components = 0.0559546 Jy
! Clean residual min=-0.011456 max=0.022144 Jy/beam
! Clean residual mean=0.000197 rms=0.002885 Jy/beam
! Combined flux in latest and established models = 1.46003 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 68 components and 1.46003 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.350459Jy  sigma=0.002088
! Fit after  self-cal, rms=0.350210Jy  sigma=0.002087
! Inverting map 
! Added new window around map position (3.5, -8).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0254156 Jy
! Component: 100  -  total flux cleaned = 0.0464887 Jy
! Total flux subtracted in 100 components = 0.0464887 Jy
! Clean residual min=-0.010664 max=0.019043 Jy/beam
! Clean residual mean=0.000168 rms=0.002715 Jy/beam
! Combined flux in latest and established models = 1.50652 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 77 components and 1.50652 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.346167Jy  sigma=0.002028
! Fit after  self-cal, rms=0.346012Jy  sigma=0.002027
! Inverting map 
! Added new window around map position (4.5, -4).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0210164 Jy
! Component: 100  -  total flux cleaned = 0.0385705 Jy
! Total flux subtracted in 100 components = 0.0385705 Jy
! Clean residual min=-0.010050 max=0.012082 Jy/beam
! Clean residual mean=0.000144 rms=0.002590 Jy/beam
! Combined flux in latest and established models = 1.54509 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 81 components and 1.54509 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.343408Jy  sigma=0.001986
! Fit after  self-cal, rms=0.343282Jy  sigma=0.001985
! Inverting map 
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
win_mult = win_mult * 1.6
clean_niter = clean_niter * 2
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.127 mas, bmaj=3.111 mas, bpa=-1.038 degrees
! Estimated noise=385.063 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0393159 Jy
! Component: 100  -  total flux cleaned = 0.0672914 Jy
! Component: 150  -  total flux cleaned = 0.0887623 Jy
! Component: 200  -  total flux cleaned = 0.105511 Jy
! Total flux subtracted in 200 components = 0.105511 Jy
! Clean residual min=-0.011051 max=0.019479 Jy/beam
! Clean residual mean=0.002070 rms=0.003994 Jy/beam
! Combined flux in latest and established models = 1.65061 Jy
! Performing phase self-cal
! Adding 53 model components to the UV plane model.
! The established model now contains 113 components and 1.65061 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339095Jy  sigma=0.001909
! Fit after  self-cal, rms=0.338628Jy  sigma=0.001906
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.99     GC        1.08     GG        1.00*    
!   HH        1.27     HN        0.96     KK        0.91     KP        0.96     
!   LA        0.95     MA        0.95     MC        1.10     MK        1.01     
!   NL        1.00     NY        1.00     OV        1.00     PT        0.92     
!   SC        1.14     TS        0.98     WF        1.01     WZ        1.01     
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.98     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.54     KP        0.95     
!   LA        0.92     MA        0.97     MC        0.86     MK        0.99     
!   NL        0.95     NY        1.01     OV        0.99     PT        0.90     
!   SC        0.99     TS        1.02     WF        0.99     WZ        1.16     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.00*    GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.93     KP        1.11     
!   LA        1.10     MA        0.97     MC        1.97     MK        0.97     
!   NL        1.00*    NY        1.01     OV        1.14     PT        1.07     
!   SC        1.00*    TS        1.02     WF        1.00*    WZ        1.07     
! 
!  A total of 186 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.96     FD        0.95     GC        1.01     GG        1.00*    
!   HH        1.15     HN        0.96     KK        0.95     KP        1.00     
!   LA        0.91     MA        0.92     MC        1.38     MK        1.02     
!   NL        1.01     NY        0.95     OV        1.03     PT        0.89     
!   SC        0.96     TS        1.00*    WF        1.05     WZ        1.02     
! 
! 
! Correcting IF 2.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.98     GC        1.02     GG        1.00*    
!   HH        1.10     HN        0.96     KK        0.86     KP        0.95     
!   LA        0.98     MA        0.92     MC        1.20     MK        1.01     
!   NL        1.01     NY        1.02     OV        0.97     PT        0.96     
!   SC        1.05     TS        1.02     WF        1.00     WZ        1.01     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.96     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        0.95     
!   LA        0.94     MA        0.81     MC        0.95     MK        0.99     
!   NL        0.95     NY        1.02     OV        0.97     PT        0.93     
!   SC        0.98     TS        1.08     WF        0.99     WZ        1.11     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        1.00*    GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.94     KP        1.12     
!   LA        1.12     MA        1.72     MC        1.01     MK        0.97     
!   NL        1.00*    NY        1.03     OV        1.10     PT        1.11     
!   SC        1.00*    TS        1.03     WF        1.00*    WZ        1.04     
! 
!  A total of 186 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.96     FD        0.94     GC        0.99     GG        1.00*    
!   HH        1.12     HN        0.95     KK        0.96     KP        0.98     
!   LA        0.92     MA        1.08     MC        1.00     MK        1.04     
!   NL        1.01     NY        0.98     OV        1.00     PT        0.92     
!   SC        0.97     TS        1.00*    WF        1.02     WZ        1.00     
! 
! 
! Correcting IF 3.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.00     GC        1.04     GG        1.00*    
!   HH        1.13     HN        0.99     KK        0.88     KP        1.00     
!   LA        0.94     MA        0.93     MC        1.27     MK        1.00     
!   NL        1.02     NY        0.98     OV        0.99     PT        0.97     
!   SC        1.06     TS        1.00     WF        1.00     WZ        1.03     
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.97     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        2.01     KP        0.94     
!   LA        0.90     MA        1.21     MC        3.45     MK        0.97     
!   NL        0.95     NY        0.96     OV        0.98     PT        0.94     
!   SC        0.98     TS        1.07     WF        0.98     WZ        1.09     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        1.00*    GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.94     KP        1.15     
!   LA        1.07     MA        1.17     MC        1.17     MK        0.96     
!   NL        1.00*    NY        1.00     OV        1.12     PT        1.10     
!   SC        1.00*    TS        1.05     WF        1.00*    WZ        1.03     
! 
!  A total of 186 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.01     FD        0.96     GC        1.00     GG        1.00*    
!   HH        1.06     HN        1.00     KK        0.98     KP        1.04     
!   LA        0.90     MA        1.03     MC        1.00     MK        1.01     
!   NL        1.02     NY        0.99     OV        1.01     PT        0.93     
!   SC        0.94     TS        1.00*    WF        1.02     WZ        1.01     
! 
! 
! Correcting IF 4.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.00     GC        1.06     GG        1.00*    
!   HH        1.10     HN        1.01     KK        0.86     KP        0.98     
!   LA        0.98     MA        0.81     MC        0.80     MK        0.97     
!   NL        1.01     NY        1.03     OV        0.99     PT        0.98     
!   SC        1.16     TS        0.97     WF        0.99     WZ        1.11     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.98     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        0.93     
!   LA        0.94     MA        1.58     MC        0.61     MK        0.96     
!   NL        0.97     NY        1.06     OV        0.98     PT        0.98     
!   SC        0.97     TS        1.01     WF        0.98     WZ        1.21     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        1.00*    GC        1.09     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.89     KP        1.15     
!   LA        1.14     MA        1.46     MC        0.60     MK        0.95     
!   NL        1.00*    NY        1.08     OV        1.12     PT        1.13     
!   SC        1.00*    TS        1.01     WF        1.00*    WZ        1.16     
! 
!  A total of 186 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.96     FD        0.97     GC        1.05     GG        1.00*    
!   HH        1.07     HN        1.01     KK        0.95     KP        1.02     
!   LA        0.94     MA        1.54     MC        1.56     MK        1.01     
!   NL        1.03     NY        0.95     OV        1.00     PT        0.97     
!   SC        0.95     TS        1.00*    WF        1.03     WZ        1.00     
! 
! 
! Fit before self-cal, rms=0.338628Jy  sigma=0.001906
! Fit after  self-cal, rms=0.427976Jy  sigma=0.001694
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.152 mas, bmaj=3.121 mas, bpa=-1.757 degrees
! Estimated noise=386.584 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (4.5, -12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0190527 Jy
! Component: 100  -  total flux cleaned = 0.0296831 Jy
! Component: 150  -  total flux cleaned = 0.0345466 Jy
! Component: 200  -  total flux cleaned = 0.0385992 Jy
! Total flux subtracted in 200 components = 0.0385992 Jy
! Clean residual min=-0.008344 max=0.010585 Jy/beam
! Clean residual mean=0.001044 rms=0.002479 Jy/beam
! Combined flux in latest and established models = 1.6892 Jy
! Performing phase self-cal
! Adding 44 model components to the UV plane model.
! The established model now contains 152 components and 1.6892 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.426749Jy  sigma=0.001678
! Fit after  self-cal, rms=0.429567Jy  sigma=0.001674
! Inverting map 
selfcal true, true, soltime1
! Performing amp+phase self-cal over 120 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.429567Jy  sigma=0.001674
! Fit after  self-cal, rms=0.433303Jy  sigma=0.001590
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.151 mas, bmaj=3.114 mas, bpa=-2.441 degrees
! Estimated noise=386.196 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0112123 Jy
! Component: 100  -  total flux cleaned = 0.0146655 Jy
! Component: 150  -  total flux cleaned = 0.0181551 Jy
! Component: 200  -  total flux cleaned = 0.0208603 Jy
! Total flux subtracted in 200 components = 0.0208603 Jy
! Clean residual min=-0.004712 max=0.008720 Jy/beam
! Clean residual mean=0.001032 rms=0.001359 Jy/beam
! Combined flux in latest and established models = 1.71007 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 172 components and 1.71006 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.432827Jy  sigma=0.001582
! Fit after  self-cal, rms=0.433963Jy  sigma=0.001580
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (9.5, -16.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0100075 Jy
! Component: 100  -  total flux cleaned = 0.0150359 Jy
! Component: 150  -  total flux cleaned = 0.0176149 Jy
! Component: 200  -  total flux cleaned = 0.0202475 Jy
! Total flux subtracted in 200 components = 0.0202475 Jy
! Clean residual min=-0.004321 max=0.006678 Jy/beam
! Clean residual mean=0.000868 rms=0.001189 Jy/beam
! Combined flux in latest and established models = 1.73031 Jy
! Performing phase self-cal
! Adding 46 model components to the UV plane model.
! The established model now contains 201 components and 1.73031 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433668Jy  sigma=0.001575
! Fit after  self-cal, rms=0.433670Jy  sigma=0.001575
! Inverting map 
! Added new window around map position (7, -23.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00728296 Jy
! Component: 100  -  total flux cleaned = 0.0112126 Jy
! Component: 150  -  total flux cleaned = 0.0138608 Jy
! Component: 200  -  total flux cleaned = 0.0160408 Jy
! Total flux subtracted in 200 components = 0.0160408 Jy
! Clean residual min=-0.003968 max=0.005760 Jy/beam
! Clean residual mean=0.000730 rms=0.001079 Jy/beam
! Combined flux in latest and established models = 1.74635 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 222 components and 1.74635 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433498Jy  sigma=0.001571
! Fit after  self-cal, rms=0.433497Jy  sigma=0.001571
! Inverting map 
! Added new window around map position (15, -36).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00404859 Jy
! Component: 100  -  total flux cleaned = 0.00670562 Jy
! Component: 150  -  total flux cleaned = 0.00893511 Jy
! Component: 200  -  total flux cleaned = 0.0109587 Jy
! Total flux subtracted in 200 components = 0.0109587 Jy
! Clean residual min=-0.004038 max=0.004949 Jy/beam
! Clean residual mean=0.000637 rms=0.001033 Jy/beam
! Combined flux in latest and established models = 1.75731 Jy
! Performing phase self-cal
! Adding 51 model components to the UV plane model.
! The established model now contains 239 components and 1.75731 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433379Jy  sigma=0.001570
! Fit after  self-cal, rms=0.433369Jy  sigma=0.001569
! Inverting map 
! Added new window around map position (-33.5, 27.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0042439 Jy
! Component: 100  -  total flux cleaned = 0.00674217 Jy
! Component: 150  -  total flux cleaned = 0.00874374 Jy
! Component: 200  -  total flux cleaned = 0.0105962 Jy
! Total flux subtracted in 200 components = 0.0105962 Jy
! Clean residual min=-0.004072 max=0.004478 Jy/beam
! Clean residual mean=0.000556 rms=0.001009 Jy/beam
! Combined flux in latest and established models = 1.76791 Jy
! Performing phase self-cal
! Adding 55 model components to the UV plane model.
! The established model now contains 257 components and 1.76791 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433245Jy  sigma=0.001568
! Fit after  self-cal, rms=0.433239Jy  sigma=0.001568
! Inverting map 
! Added new window around map position (-0.5, -27.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00437442 Jy
! Component: 100  -  total flux cleaned = 0.00619989 Jy
! Component: 150  -  total flux cleaned = 0.00792974 Jy
! Component: 200  -  total flux cleaned = 0.00922839 Jy
! Total flux subtracted in 200 components = 0.00922839 Jy
! Clean residual min=-0.004042 max=0.003962 Jy/beam
! Clean residual mean=0.000479 rms=0.000984 Jy/beam
! Combined flux in latest and established models = 1.77714 Jy
! Performing phase self-cal
! Adding 45 model components to the UV plane model.
! The established model now contains 272 components and 1.77714 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433165Jy  sigma=0.001567
! Fit after  self-cal, rms=0.433170Jy  sigma=0.001567
! Inverting map 
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.433170Jy  sigma=0.001567
! Fit after  self-cal, rms=0.435922Jy  sigma=0.001564
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.156 mas, bmaj=3.115 mas, bpa=-2.807 degrees
! Estimated noise=385.236 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00431214 Jy
! Component: 100  -  total flux cleaned = 0.00625806 Jy
! Component: 150  -  total flux cleaned = 0.0076245 Jy
! Component: 200  -  total flux cleaned = 0.00932344 Jy
! Total flux subtracted in 200 components = 0.00932344 Jy
! Clean residual min=-0.002665 max=0.003783 Jy/beam
! Clean residual mean=0.000497 rms=0.000867 Jy/beam
! Combined flux in latest and established models = 1.78646 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 281 components and 1.78646 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.435819Jy  sigma=0.001562
! Fit after  self-cal, rms=0.435948Jy  sigma=0.001562
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-2.5, -9.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00269862 Jy
! Component: 100  -  total flux cleaned = 0.0040363 Jy
! Component: 150  -  total flux cleaned = 0.00543485 Jy
! Component: 200  -  total flux cleaned = 0.00671952 Jy
! Total flux subtracted in 200 components = 0.00671952 Jy
! Clean residual min=-0.002740 max=0.003607 Jy/beam
! Clean residual mean=0.000438 rms=0.000843 Jy/beam
! Combined flux in latest and established models = 1.79318 Jy
! Performing phase self-cal
! Adding 46 model components to the UV plane model.
! The established model now contains 292 components and 1.79318 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.435881Jy  sigma=0.001561
! Fit after  self-cal, rms=0.435873Jy  sigma=0.001561
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
win_mult = win_mult * 1.2
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.435873Jy  sigma=0.001561
! Fit after  self-cal, rms=0.437039Jy  sigma=0.001560
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.009 mas, bmaj=8.486 mas, bpa=44.94 degrees
! Estimated noise=618.307 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00844677 Jy
! Component: 100  -  total flux cleaned = 0.0137013 Jy
! Component: 150  -  total flux cleaned = 0.0158538 Jy
! Component: 200  -  total flux cleaned = 0.0179856 Jy
! Total flux subtracted in 200 components = 0.0179856 Jy
! Clean residual min=-0.002987 max=0.006679 Jy/beam
! Clean residual mean=0.001229 rms=0.001555 Jy/beam
! Combined flux in latest and established models = 1.81116 Jy
selfcal
! Performing phase self-cal
! Adding 43 model components to the UV plane model.
! The established model now contains 322 components and 1.81116 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.437029Jy  sigma=0.001560
! Fit after  self-cal, rms=0.437041Jy  sigma=0.001560
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00146789 Jy
! Component: 100  -  total flux cleaned = 0.00320497 Jy
! Component: 150  -  total flux cleaned = 0.00470344 Jy
! Component: 200  -  total flux cleaned = 0.00586864 Jy
! Total flux subtracted in 200 components = 0.00586864 Jy
! Clean residual min=-0.003000 max=0.006452 Jy/beam
! Clean residual mean=0.001040 rms=0.001539 Jy/beam
! Combined flux in latest and established models = 1.81703 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 334 components and 1.81703 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.437048Jy  sigma=0.001560
! Fit after  self-cal, rms=0.437030Jy  sigma=0.001560
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
win_mult = win_mult / 1.2
print "************** FINISHED AMPLITUDE SELF-CAL **************"
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
restore
! Inverting map and beam 
! Estimated beam: bmin=2.157 mas, bmaj=3.115 mas, bpa=-2.907 degrees
! Estimated noise=384.92 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.157 x 3.115 at -2.907 degrees (North through East)
! Clean map  min=-0.0025047  max=0.72484 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true
  clean clean_niter,clean_gain
  selfcal
  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
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true
  end if
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.437030Jy  sigma=0.001560
! Fit after  self-cal, rms=0.681648Jy  sigma=0.001443
! Inverting map and beam 
! Estimated beam: bmin=2.156 mas, bmaj=3.119 mas, bpa=-3.024 degrees
! Estimated noise=384.712 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000600733 Jy
! Component: 100  -  total flux cleaned = -0.000703124 Jy
! Component: 150  -  total flux cleaned = -0.000888232 Jy
! Component: 200  -  total flux cleaned = -0.000977226 Jy
! Total flux subtracted in 200 components = -0.000977226 Jy
! Clean residual min=-0.002633 max=0.003509 Jy/beam
! Clean residual mean=0.000253 rms=0.000763 Jy/beam
! Combined flux in latest and established models = 1.81606 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 346 components and 1.81606 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.681613Jy  sigma=0.001443
! Fit after  self-cal, rms=0.681640Jy  sigma=0.001443
! Inverting map 
! Added new window around map position (13.5, -24.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0024172 Jy
! Component: 100  -  total flux cleaned = 0.00278487 Jy
! Component: 150  -  total flux cleaned = 0.00302762 Jy
! Component: 200  -  total flux cleaned = 0.00310152 Jy
! Total flux subtracted in 200 components = 0.00310152 Jy
! Clean residual min=-0.002558 max=0.003154 Jy/beam
! Clean residual mean=0.000228 rms=0.000746 Jy/beam
! Combined flux in latest and established models = 1.81916 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 359 components and 1.81916 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.681600Jy  sigma=0.001442
! Fit after  self-cal, rms=0.681620Jy  sigma=0.001442
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.681620Jy  sigma=0.001442
! Fit after  self-cal, rms=0.849941Jy  sigma=0.001442
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.824 mas, bmaj=2.592 mas, bpa=-1.059 degrees
! Estimated noise=695.939 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.557427 Jy
! Component: 100  -  total flux cleaned = 0.819857 Jy
! Component: 150  -  total flux cleaned = 0.973294 Jy
! Component: 200  -  total flux cleaned = 1.07942 Jy
! Total flux subtracted in 200 components = 1.07942 Jy
! Clean residual min=-0.012116 max=0.060325 Jy/beam
! Clean residual mean=0.000457 rms=0.004441 Jy/beam
! Combined flux in latest and established models = 1.07942 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 24 model components to the UV plane model.
! The established model now contains 24 components and 1.07942 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.157 mas, bmaj=3.119 mas, bpa=-3.055 degrees
! Estimated noise=384.596 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.163535 Jy
! Component: 100  -  total flux cleaned = 0.273341 Jy
! Component: 150  -  total flux cleaned = 0.352546 Jy
! Component: 200  -  total flux cleaned = 0.412118 Jy
! Total flux subtracted in 200 components = 0.412118 Jy
! Clean residual min=-0.004941 max=0.034683 Jy/beam
! Clean residual mean=0.003290 rms=0.004758 Jy/beam
! Combined flux in latest and established models = 1.49154 Jy
! Adding 80 model components to the UV plane model.
! The established model now contains 90 components and 1.49154 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0462243 Jy
! Component: 100  -  total flux cleaned = 0.0826123 Jy
! Component: 150  -  total flux cleaned = 0.111979 Jy
! Component: 200  -  total flux cleaned = 0.136333 Jy
! Total flux subtracted in 200 components = 0.136333 Jy
! Clean residual min=-0.003068 max=0.015770 Jy/beam
! Clean residual mean=0.001958 rms=0.002477 Jy/beam
! Combined flux in latest and established models = 1.62787 Jy
! Adding 62 model components to the UV plane model.
! The established model now contains 133 components and 1.62787 Jy
! Inverting map 
! Added new window around map position (7, -6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.020555 Jy
! Component: 100  -  total flux cleaned = 0.0379255 Jy
! Component: 150  -  total flux cleaned = 0.0527375 Jy
! Component: 200  -  total flux cleaned = 0.0655677 Jy
! Total flux subtracted in 200 components = 0.0655676 Jy
! Clean residual min=-0.002360 max=0.009308 Jy/beam
! Clean residual mean=0.001337 rms=0.001583 Jy/beam
! Combined flux in latest and established models = 1.69344 Jy
! Adding 79 model components to the UV plane model.
! The established model now contains 179 components and 1.69344 Jy
! Inverting map 
! Added new window around map position (1, -18).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0114501 Jy
! Component: 100  -  total flux cleaned = 0.0214302 Jy
! Component: 150  -  total flux cleaned = 0.0303974 Jy
! Component: 200  -  total flux cleaned = 0.0384838 Jy
! Total flux subtracted in 200 components = 0.0384838 Jy
! Clean residual min=-0.002278 max=0.006166 Jy/beam
! Clean residual mean=0.000988 rms=0.001175 Jy/beam
! Combined flux in latest and established models = 1.73192 Jy
! Adding 85 model components to the UV plane model.
! The established model now contains 228 components and 1.73192 Jy
! Inverting map 
! Added new window around map position (0.5, 3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00749599 Jy
! Component: 100  -  total flux cleaned = 0.0141943 Jy
! Component: 150  -  total flux cleaned = 0.0203111 Jy
! Component: 200  -  total flux cleaned = 0.0259128 Jy
! Total flux subtracted in 200 components = 0.0259128 Jy
! Clean residual min=-0.002261 max=0.004358 Jy/beam
! Clean residual mean=0.000758 rms=0.000961 Jy/beam
! Combined flux in latest and established models = 1.75784 Jy
! Adding 89 model components to the UV plane model.
! The established model now contains 262 components and 1.75784 Jy
! Inverting map 
! Added new window around map position (15, -17.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00533199 Jy
! Component: 100  -  total flux cleaned = 0.0101295 Jy
! Component: 150  -  total flux cleaned = 0.0145658 Jy
! Component: 200  -  total flux cleaned = 0.0186772 Jy
! Total flux subtracted in 200 components = 0.0186772 Jy
! Clean residual min=-0.002357 max=0.003779 Jy/beam
! Clean residual mean=0.000598 rms=0.000839 Jy/beam
! Combined flux in latest and established models = 1.77651 Jy
! Adding 87 model components to the UV plane model.
! The established model now contains 292 components and 1.77651 Jy
! Inverting map 
! Added new window around map position (21, -28).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00429213 Jy
! Component: 100  -  total flux cleaned = 0.00795654 Jy
! Component: 150  -  total flux cleaned = 0.0113678 Jy
! Component: 200  -  total flux cleaned = 0.0145521 Jy
! Total flux subtracted in 200 components = 0.0145521 Jy
! Clean residual min=-0.002418 max=0.003585 Jy/beam
! Clean residual mean=0.000477 rms=0.000766 Jy/beam
! Combined flux in latest and established models = 1.79106 Jy
! Adding 81 model components to the UV plane model.
! The established model now contains 320 components and 1.79106 Jy
! Inverting map 
! Added new window around map position (25.5, -46).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00359226 Jy
! Component: 100  -  total flux cleaned = 0.00649599 Jy
! Component: 150  -  total flux cleaned = 0.00921963 Jy
! Component: 200  -  total flux cleaned = 0.0115803 Jy
! Total flux subtracted in 200 components = 0.0115803 Jy
! Clean residual min=-0.002434 max=0.003195 Jy/beam
! Clean residual mean=0.000380 rms=0.000718 Jy/beam
! Combined flux in latest and established models = 1.80264 Jy
! Adding 81 model components to the UV plane model.
! The established model now contains 337 components and 1.80265 Jy
! Inverting map 
! Added new window around map position (-32.5, -30.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00276015 Jy
! Component: 100  -  total flux cleaned = 0.00496973 Jy
! Component: 150  -  total flux cleaned = 0.00669494 Jy
! Component: 200  -  total flux cleaned = 0.00825904 Jy
! Total flux subtracted in 200 components = 0.00825904 Jy
! Clean residual min=-0.002472 max=0.002799 Jy/beam
! Clean residual mean=0.000312 rms=0.000694 Jy/beam
! Combined flux in latest and established models = 1.8109 Jy
! Adding 84 model components to the UV plane model.
! The established model now contains 349 components and 1.8109 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.004 mas, bmaj=8.488 mas, bpa=45.06 degrees
! Estimated noise=617.227 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00567789 Jy
! Component: 100  -  total flux cleaned = 0.00976353 Jy
! Component: 150  -  total flux cleaned = 0.0129852 Jy
! Component: 200  -  total flux cleaned = 0.0156017 Jy
! Total flux subtracted in 200 components = 0.0156017 Jy
! Clean residual min=-0.003424 max=0.003840 Jy/beam
! Clean residual mean=0.000699 rms=0.001057 Jy/beam
! Combined flux in latest and established models = 1.82651 Jy
flux_cutoff = imstat(rms) * dynam
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00217132 Jy
! Component: 100  -  total flux cleaned = 0.00398282 Jy
! Component: 150  -  total flux cleaned = 0.00550101 Jy
! Component: 200  -  total flux cleaned = 0.00678268 Jy
! Total flux subtracted in 200 components = 0.00678268 Jy
! Clean residual min=-0.003516 max=0.003709 Jy/beam
! Clean residual mean=0.000481 rms=0.001031 Jy/beam
! Combined flux in latest and established models = 1.83329 Jy
! Adding 128 model components to the UV plane model.
! The established model now contains 444 components and 1.83329 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.157 mas, bmaj=3.119 mas, bpa=-3.055 degrees
! Estimated noise=384.596 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000706286 Jy
! Component: 100  -  total flux cleaned = -0.00077171 Jy
! Component: 150  -  total flux cleaned = -0.000901017 Jy
! Component: 200  -  total flux cleaned = -0.00102437 Jy
! Total flux subtracted in 200 components = -0.00102437 Jy
! Clean residual min=-0.002522 max=0.002655 Jy/beam
! Clean residual mean=0.000134 rms=0.000659 Jy/beam
! Combined flux in latest and established models = 1.83226 Jy
selfcal
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 464 components and 1.83226 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.849827Jy  sigma=0.001440
! Fit after  self-cal, rms=0.849817Jy  sigma=0.001439
wmodel J2202+4216_S_2001_04_09_pus_map.mod
! Writing 464 model components to file: J2202+4216_S_2001_04_09_pus_map.mod
wobs J2202+4216_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J2202+4216_S_2001_04_09_pus_uvs.fits
wwins J2202+4216_S_2001_04_09_pus_map.win
! wwins: Wrote 21 windows to J2202+4216_S_2001_04_09_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000270542 Jy
! Component: 100  -  total flux cleaned = 0.000948135 Jy
! Component: 150  -  total flux cleaned = 0.00134118 Jy
! Component: 200  -  total flux cleaned = 0.0017244 Jy
! Component: 250  -  total flux cleaned = 0.00205816 Jy
! Component: 300  -  total flux cleaned = 0.00250863 Jy
! Component: 350  -  total flux cleaned = 0.00287083 Jy
! Component: 400  -  total flux cleaned = 0.00314869 Jy
! Component: 450  -  total flux cleaned = 0.00354053 Jy
! Component: 500  -  total flux cleaned = 0.0039272 Jy
! Component: 550  -  total flux cleaned = 0.00423316 Jy
! Component: 600  -  total flux cleaned = 0.00461178 Jy
! Component: 650  -  total flux cleaned = 0.00487457 Jy
! Component: 700  -  total flux cleaned = 0.0052833 Jy
! Component: 750  -  total flux cleaned = 0.0055404 Jy
! Component: 800  -  total flux cleaned = 0.00583208 Jy
! Component: 850  -  total flux cleaned = 0.00608504 Jy
! Component: 900  -  total flux cleaned = 0.00633571 Jy
! Component: 950  -  total flux cleaned = 0.00654897 Jy
! Component: 1000  -  total flux cleaned = 0.00683138 Jy
! Component: 1050  -  total flux cleaned = 0.00704187 Jy
! Component: 1100  -  total flux cleaned = 0.00732053 Jy
! Component: 1150  -  total flux cleaned = 0.00756283 Jy
! Component: 1200  -  total flux cleaned = 0.00776955 Jy
! Component: 1250  -  total flux cleaned = 0.00804323 Jy
! Component: 1300  -  total flux cleaned = 0.0083489 Jy
! Component: 1350  -  total flux cleaned = 0.00858516 Jy
! Component: 1400  -  total flux cleaned = 0.00878668 Jy
! Component: 1450  -  total flux cleaned = 0.00902034 Jy
! Component: 1500  -  total flux cleaned = 0.00918656 Jy
! Component: 1550  -  total flux cleaned = 0.00951686 Jy
! Component: 1600  -  total flux cleaned = 0.00971369 Jy
! Component: 1650  -  total flux cleaned = 0.00994216 Jy
! Component: 1700  -  total flux cleaned = 0.0101695 Jy
! Component: 1750  -  total flux cleaned = 0.010331 Jy
! Component: 1800  -  total flux cleaned = 0.0106202 Jy
! Component: 1850  -  total flux cleaned = 0.01078 Jy
! Component: 1900  -  total flux cleaned = 0.0109706 Jy
! Component: 1950  -  total flux cleaned = 0.0110654 Jy
! Component: 2000  -  total flux cleaned = 0.0112547 Jy
! Total flux subtracted in 2048 components = 0.011443 Jy
! Clean residual min=-0.001797 max=0.001999 Jy/beam
! Clean residual mean=0.000055 rms=0.000584 Jy/beam
! Combined flux in latest and established models = 1.84371 Jy
keep
! Adding 179 model components to the UV plane model.
! The established model now contains 643 components and 1.84371 Jy
![Exited script file: muppet]
wmap "J2202+4216_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.157 x 3.119 at -3.055 degrees (North through East)
! Clean map  min=-0.0021893  max=0.71949 Jy/beam
! Writing clean map to FITS file: J2202+4216_S_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.719487 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000583792 
device "J2202+4216_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J2202+4216_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.24342 0.24342 0.48684 0.97368 1.94736 3.89472 7.78944 15.5789 31.1578 62.3155
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.719 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.157 x 3.119 at -3.055 degrees (North through East)
! Clean map  min=-0.0021893  max=0.71949 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2202+4216_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J2202+4216_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2202+4216_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:20:04 2007