! Started logfile: J2236+2828_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:20:22 2007
obs J2236+2828_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J2236+2828_S_2001_04_09_pus_uva.fits
! AN table 1: 115 integrations on 190 of 190 possible baselines.
! AN table 2: 372 integrations on 190 of 190 possible baselines.
! AN table 3: 268 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.148045 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2236+2828
! 
! 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 84948 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 J2236+2828_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 1678 telescope corrections were flagged in sub-array 1.
!  A total of 4885 telescope corrections were flagged in sub-array 2.
!  A total of 3971 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1678 telescope corrections were flagged in sub-array 1.
!  A total of 4885 telescope corrections were flagged in sub-array 2.
!  A total of 3971 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1678 telescope corrections were flagged in sub-array 1.
!  A total of 4885 telescope corrections were flagged in sub-array 2.
!  A total of 3971 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1678 telescope corrections were flagged in sub-array 1.
!  A total of 4885 telescope corrections were flagged in sub-array 2.
!  A total of 3971 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.843906Jy  sigma=0.006031
! Fit after  self-cal, rms=0.383995Jy  sigma=0.002589
! 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.852 mas, bmaj=3.354 mas, bpa=-4.382 degrees
! Estimated noise=684.272 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.928533 Jy
! Component: 100  -  total flux cleaned = 1.14072 Jy
! Total flux subtracted in 100 components = 1.14072 Jy
! Clean residual min=-0.018676 max=0.081331 Jy/beam
! Clean residual mean=0.000003 rms=0.005771 Jy/beam
! Combined flux in latest and established models = 1.14072 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.14072 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.338394Jy  sigma=0.002097
! Fit after  self-cal, rms=0.338316Jy  sigma=0.002097
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0895347 Jy
! Component: 100  -  total flux cleaned = 0.139004 Jy
! Total flux subtracted in 100 components = 0.139004 Jy
! Clean residual min=-0.014840 max=0.025458 Jy/beam
! Clean residual mean=-0.000001 rms=0.004063 Jy/beam
! Combined flux in latest and established models = 1.27972 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 15 components and 1.27972 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.321372Jy  sigma=0.001867
! Fit after  self-cal, rms=0.321152Jy  sigma=0.001866
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0313656 Jy
! Component: 100  -  total flux cleaned = 0.0515709 Jy
! Total flux subtracted in 100 components = 0.0515709 Jy
! Clean residual min=-0.014949 max=0.017701 Jy/beam
! Clean residual mean=-0.000002 rms=0.003763 Jy/beam
! Combined flux in latest and established models = 1.33129 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 18 components and 1.33129 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320908Jy  sigma=0.001849
! Fit after  self-cal, rms=0.320847Jy  sigma=0.001849
! 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.145 mas, bmaj=3.869 mas, bpa=-7.305 degrees
! Estimated noise=346.156 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.0124106 Jy
! Component: 100  -  total flux cleaned = -0.0121482 Jy
! Component: 150  -  total flux cleaned = -0.0108189 Jy
! Component: 200  -  total flux cleaned = -0.0098506 Jy
! Total flux subtracted in 200 components = -0.0098506 Jy
! Clean residual min=-0.017815 max=0.012984 Jy/beam
! Clean residual mean=-0.000320 rms=0.003452 Jy/beam
! Combined flux in latest and established models = 1.32144 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 25 components and 1.32144 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319367Jy  sigma=0.001845
! Fit after  self-cal, rms=0.319331Jy  sigma=0.001845
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 87 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.00     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.00     KP        1.04     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        0.94     NY        0.96     OV        1.00     PT        0.94     
!   SC        1.00*    TS        0.94     WF        1.04     WZ        1.00*    
! 
!  A total of 153 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.99     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.03     KP        1.08     
!   LA        0.97     MA        1.07     MC        1.02     MK        1.08     
!   NL        0.98     NY        0.98     OV        1.03     PT        0.96     
!   SC        0.97     TS        1.00*    WF        1.05     WZ        1.07     
! 
!  A total of 237 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.86     FD        1.00*    GC        1.04     GG        1.00*    
!   HH        1.06     HN        0.96     KK        0.98     KP        0.96     
!   LA        0.92     MA        1.01     MC        1.11     MK        0.90     
!   NL        0.99     NY        1.02     OV        0.92     PT        0.89     
!   SC        1.04     TS        1.02     WF        1.08     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 87 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.97     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.95     KP        0.92     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        0.95     NY        0.98     OV        0.98     PT        0.97     
!   SC        1.00*    TS        0.98     WF        1.03     WZ        1.00*    
! 
!  A total of 153 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.98     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.04     KP        1.13     
!   LA        0.99     MA        1.04     MC        1.07     MK        1.10     
!   NL        0.99     NY        1.01     OV        0.99     PT        1.00     
!   SC        0.98     TS        1.00*    WF        1.02     WZ        1.04     
! 
!  A total of 237 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.85     FD        1.00*    GC        1.00     GG        1.00*    
!   HH        1.10     HN        0.96     KK        0.95     KP        0.69     
!   LA        0.94     MA        1.27     MC        1.01     MK        0.90     
!   NL        0.98     NY        1.04     OV        0.89     PT        0.92     
!   SC        1.05     TS        1.06     WF        1.07     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 87 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        0.96     KP        0.99     
!   LA        0.94     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        0.95     NY        0.98     OV        0.99     PT        0.97     
!   SC        1.00*    TS        0.98     WF        1.03     WZ        1.00*    
! 
!  A total of 153 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        0.99     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.09     KP        1.16     
!   LA        0.96     MA        0.99     MC        1.33     MK        1.08     
!   NL        0.99     NY        0.99     OV        1.00     PT        1.00     
!   SC        0.96     TS        1.00*    WF        1.03     WZ        1.04     
! 
!  A total of 237 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.91     FD        1.00*    GC        1.03     GG        1.00*    
!   HH        1.06     HN        1.00     KK        0.96     KP        0.92     
!   LA        0.90     MA        1.06     MC        1.41     MK        0.87     
!   NL        0.97     NY        1.02     OV        0.88     PT        0.91     
!   SC        1.04     TS        1.07     WF        1.06     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 87 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.98     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.05     KK        0.94     KP        0.99     
!   LA        0.97     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        0.95     NY        1.03     OV        0.97     PT        0.96     
!   SC        1.00*    TS        0.94     WF        1.02     WZ        1.00*    
! 
!  A total of 153 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.99     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.04     KP        1.16     
!   LA        0.99     MA        0.78     MC        1.00     MK        1.05     
!   NL        0.99     NY        1.04     OV        1.00     PT        1.07     
!   SC        0.98     TS        1.00*    WF        1.03     WZ        1.07     
! 
!  A total of 237 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.87     FD        1.00*    GC        1.06     GG        1.00*    
!   HH        1.10     HN        1.02     KK        0.93     KP        0.92     
!   LA        0.92     MA        2.52     MC        0.78     MK        0.87     
!   NL        0.99     NY        1.06     OV        0.90     PT        0.98     
!   SC        1.06     TS        1.04     WF        1.05     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.319331Jy  sigma=0.001845
! Fit after  self-cal, rms=0.319405Jy  sigma=0.001638
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.166 mas, bmaj=3.958 mas, bpa=-7.758 degrees
! Estimated noise=348.117 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.00663472 Jy
! Component: 100  -  total flux cleaned = -0.00724999 Jy
! Component: 150  -  total flux cleaned = -0.0075653 Jy
! Component: 200  -  total flux cleaned = -0.00783506 Jy
! Total flux subtracted in 200 components = -0.00783506 Jy
! Clean residual min=-0.008074 max=0.006201 Jy/beam
! Clean residual mean=-0.000048 rms=0.001639 Jy/beam
! Combined flux in latest and established models = 1.31361 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 31 components and 1.31361 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319093Jy  sigma=0.001636
! Fit after  self-cal, rms=0.319874Jy  sigma=0.001635
! 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.319874Jy  sigma=0.001635
! Fit after  self-cal, rms=0.322689Jy  sigma=0.001553
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.169 mas, bmaj=3.964 mas, bpa=-7.739 degrees
! Estimated noise=348.342 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00146996 Jy
! Component: 100  -  total flux cleaned = -0.00135418 Jy
! Component: 150  -  total flux cleaned = -0.00144585 Jy
! Component: 200  -  total flux cleaned = -0.00144457 Jy
! Total flux subtracted in 200 components = -0.00144458 Jy
! Clean residual min=-0.002787 max=0.004437 Jy/beam
! Clean residual mean=0.000047 rms=0.000669 Jy/beam
! Combined flux in latest and established models = 1.31216 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 37 components and 1.31216 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.322612Jy  sigma=0.001552
! Fit after  self-cal, rms=0.322974Jy  sigma=0.001552
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 (-3, -1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00279279 Jy
! Component: 100  -  total flux cleaned = 0.00299073 Jy
! Component: 150  -  total flux cleaned = 0.00315296 Jy
! Component: 200  -  total flux cleaned = 0.00328896 Jy
! Total flux subtracted in 200 components = 0.00328896 Jy
! Clean residual min=-0.002723 max=0.002475 Jy/beam
! Clean residual mean=0.000016 rms=0.000630 Jy/beam
! Combined flux in latest and established models = 1.31545 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 50 components and 1.31545 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.322897Jy  sigma=0.001551
! Fit after  self-cal, rms=0.322899Jy  sigma=0.001551
! 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.322899Jy  sigma=0.001551
! Fit after  self-cal, rms=0.325331Jy  sigma=0.001550
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.171 mas, bmaj=3.964 mas, bpa=-7.755 degrees
! Estimated noise=348.405 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000339581 Jy
! Component: 100  -  total flux cleaned = -0.000194235 Jy
! Component: 150  -  total flux cleaned = 4.52376e-06 Jy
! Component: 200  -  total flux cleaned = 6.10289e-05 Jy
! Total flux subtracted in 200 components = 6.10289e-05 Jy
! Clean residual min=-0.002450 max=0.002220 Jy/beam
! Clean residual mean=-0.000013 rms=0.000602 Jy/beam
! Combined flux in latest and established models = 1.31551 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 53 components and 1.31552 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325289Jy  sigma=0.001550
! Fit after  self-cal, rms=0.325339Jy  sigma=0.001550
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.000374505 Jy
! Component: 100  -  total flux cleaned = 0.0004233 Jy
! Component: 150  -  total flux cleaned = 0.000514959 Jy
! Component: 200  -  total flux cleaned = 0.000637937 Jy
! Total flux subtracted in 200 components = 0.000637937 Jy
! Clean residual min=-0.002402 max=0.002255 Jy/beam
! Clean residual mean=-0.000019 rms=0.000595 Jy/beam
! Combined flux in latest and established models = 1.31615 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 58 components and 1.31615 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325321Jy  sigma=0.001550
! Fit after  self-cal, rms=0.325323Jy  sigma=0.001550
! 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.325323Jy  sigma=0.001550
! Fit after  self-cal, rms=0.325845Jy  sigma=0.001549
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.616 mas, bmaj=8.417 mas, bpa=5.032 degrees
! Estimated noise=526.314 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00120386 Jy
! Component: 100  -  total flux cleaned = 0.00138407 Jy
! Component: 150  -  total flux cleaned = 0.00146084 Jy
! Component: 200  -  total flux cleaned = 0.00153726 Jy
! Total flux subtracted in 200 components = 0.00153726 Jy
! Clean residual min=-0.003754 max=0.003523 Jy/beam
! Clean residual mean=-0.000192 rms=0.001160 Jy/beam
! Combined flux in latest and established models = 1.31769 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 66 components and 1.31769 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325848Jy  sigma=0.001549
! Fit after  self-cal, rms=0.325850Jy  sigma=0.001549
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 = -1.17656e-05 Jy
! Component: 100  -  total flux cleaned = 5.82864e-05 Jy
! Component: 150  -  total flux cleaned = 0.000115551 Jy
! Component: 200  -  total flux cleaned = 0.000162986 Jy
! Total flux subtracted in 200 components = 0.000162986 Jy
! Clean residual min=-0.003744 max=0.003529 Jy/beam
! Clean residual mean=-0.000198 rms=0.001159 Jy/beam
! Combined flux in latest and established models = 1.31785 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 74 components and 1.31785 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325852Jy  sigma=0.001549
! Fit after  self-cal, rms=0.325850Jy  sigma=0.001549
! 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.173 mas, bmaj=3.964 mas, bpa=-7.765 degrees
! Estimated noise=348.523 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.173 x 3.964 at -7.765 degrees (North through East)
! Clean map  min=-0.0022413  max=1.1945 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.325850Jy  sigma=0.001549
! Fit after  self-cal, rms=0.654441Jy  sigma=0.001418
! Inverting map and beam 
! Estimated beam: bmin=2.173 mas, bmaj=3.965 mas, bpa=-7.769 degrees
! Estimated noise=348.348 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00163127 Jy
! Component: 100  -  total flux cleaned = -0.00174368 Jy
! Component: 150  -  total flux cleaned = -0.00174453 Jy
! Component: 200  -  total flux cleaned = -0.00170153 Jy
! Total flux subtracted in 200 components = -0.00170153 Jy
! Clean residual min=-0.002057 max=0.002468 Jy/beam
! Clean residual mean=0.000045 rms=0.000514 Jy/beam
! Combined flux in latest and established models = 1.31615 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 82 components and 1.31615 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.654428Jy  sigma=0.001418
! Fit after  self-cal, rms=0.654437Jy  sigma=0.001418
! Inverting map 
! Added new window around map position (-62.5, -6.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00214399 Jy
! Component: 100  -  total flux cleaned = 0.00243286 Jy
! Component: 150  -  total flux cleaned = 0.00255759 Jy
! Component: 200  -  total flux cleaned = 0.0025958 Jy
! Total flux subtracted in 200 components = 0.0025958 Jy
! Clean residual min=-0.002134 max=0.002255 Jy/beam
! Clean residual mean=0.000018 rms=0.000506 Jy/beam
! Combined flux in latest and established models = 1.31875 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 90 components and 1.31875 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.654417Jy  sigma=0.001418
! Fit after  self-cal, rms=0.654423Jy  sigma=0.001418
! Inverting map 
! Added new window around map position (34, -12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0016455 Jy
! Component: 100  -  total flux cleaned = 0.00203028 Jy
! Component: 150  -  total flux cleaned = 0.00217992 Jy
! Component: 200  -  total flux cleaned = 0.00224975 Jy
! Total flux subtracted in 200 components = 0.00224975 Jy
! Clean residual min=-0.002120 max=0.001907 Jy/beam
! Clean residual mean=-0.000003 rms=0.000496 Jy/beam
! Combined flux in latest and established models = 1.321 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 99 components and 1.321 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.654413Jy  sigma=0.001418
! Fit after  self-cal, rms=0.654413Jy  sigma=0.001418
! 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.654413Jy  sigma=0.001418
! Fit after  self-cal, rms=1.103873Jy  sigma=0.001418
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.88 mas, bmaj=3.393 mas, bpa=-4.746 degrees
! Estimated noise=672.356 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.916822 Jy
! Component: 100  -  total flux cleaned = 1.12062 Jy
! Component: 150  -  total flux cleaned = 1.19642 Jy
! Component: 200  -  total flux cleaned = 1.23642 Jy
! Total flux subtracted in 200 components = 1.23642 Jy
! Clean residual min=-0.005164 max=0.020051 Jy/beam
! Clean residual mean=0.000008 rms=0.001623 Jy/beam
! Combined flux in latest and established models = 1.23642 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 14 model components to the UV plane model.
! The established model now contains 14 components and 1.23642 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.174 mas, bmaj=3.965 mas, bpa=-7.762 degrees
! Estimated noise=348.335 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.0342489 Jy
! Component: 100  -  total flux cleaned = 0.0521269 Jy
! Component: 150  -  total flux cleaned = 0.0624352 Jy
! Component: 200  -  total flux cleaned = 0.0688457 Jy
! Total flux subtracted in 200 components = 0.0688457 Jy
! Clean residual min=-0.002123 max=0.003383 Jy/beam
! Clean residual mean=0.000159 rms=0.000611 Jy/beam
! Combined flux in latest and established models = 1.30527 Jy
! Adding 33 model components to the UV plane model.
! The established model now contains 41 components and 1.30527 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00424741 Jy
! Component: 100  -  total flux cleaned = 0.00743277 Jy
! Component: 150  -  total flux cleaned = 0.00994026 Jy
! Component: 200  -  total flux cleaned = 0.0111395 Jy
! Total flux subtracted in 200 components = 0.0111395 Jy
! Clean residual min=-0.002437 max=0.002101 Jy/beam
! Clean residual mean=0.000046 rms=0.000535 Jy/beam
! Combined flux in latest and established models = 1.31641 Jy
! Adding 23 model components to the UV plane model.
! The established model now contains 54 components and 1.31641 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=7.616 mas, bmaj=8.423 mas, bpa=5.091 degrees
! Estimated noise=525.674 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00212734 Jy
! Component: 100  -  total flux cleaned = 0.00354665 Jy
! Component: 150  -  total flux cleaned = 0.00456411 Jy
! Component: 200  -  total flux cleaned = 0.00533261 Jy
! Total flux subtracted in 200 components = 0.00533261 Jy
! Clean residual min=-0.002366 max=0.003126 Jy/beam
! Clean residual mean=-0.000023 rms=0.000824 Jy/beam
! Combined flux in latest and established models = 1.32174 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.000505046 Jy
! Component: 100  -  total flux cleaned = 0.000760057 Jy
! Component: 150  -  total flux cleaned = 0.000960787 Jy
! Component: 200  -  total flux cleaned = 0.00113378 Jy
! Total flux subtracted in 200 components = 0.00113378 Jy
! Clean residual min=-0.002370 max=0.003115 Jy/beam
! Clean residual mean=-0.000065 rms=0.000823 Jy/beam
! Combined flux in latest and established models = 1.32287 Jy
! Adding 39 model components to the UV plane model.
! The established model now contains 91 components and 1.32287 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.174 mas, bmaj=3.965 mas, bpa=-7.762 degrees
! Estimated noise=348.335 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000684613 Jy
! Component: 100  -  total flux cleaned = -0.000542714 Jy
! Component: 150  -  total flux cleaned = -0.000411129 Jy
! Component: 200  -  total flux cleaned = -0.000346655 Jy
! Total flux subtracted in 200 components = -0.000346655 Jy
! Clean residual min=-0.002430 max=0.002073 Jy/beam
! Clean residual mean=-0.000013 rms=0.000520 Jy/beam
! Combined flux in latest and established models = 1.32253 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 95 components and 1.32253 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.103912Jy  sigma=0.001418
! Fit after  self-cal, rms=1.103909Jy  sigma=0.001418
wmodel J2236+2828_S_2001_04_09_pus_map.mod
! Writing 95 model components to file: J2236+2828_S_2001_04_09_pus_map.mod
wobs J2236+2828_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J2236+2828_S_2001_04_09_pus_uvs.fits
wwins J2236+2828_S_2001_04_09_pus_map.win
! wwins: Wrote 4 windows to J2236+2828_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.000513555 Jy
! Component: 100  -  total flux cleaned = -0.000260552 Jy
! Component: 150  -  total flux cleaned = 0.000119638 Jy
! Component: 200  -  total flux cleaned = 0.000286598 Jy
! Component: 250  -  total flux cleaned = 0.000383779 Jy
! Component: 300  -  total flux cleaned = 0.00041536 Jy
! Component: 350  -  total flux cleaned = 0.000415329 Jy
! Component: 400  -  total flux cleaned = 0.000323246 Jy
! Component: 450  -  total flux cleaned = 0.000292856 Jy
! Component: 500  -  total flux cleaned = 0.000233134 Jy
! Component: 550  -  total flux cleaned = 0.000145106 Jy
! Component: 600  -  total flux cleaned = 5.86147e-05 Jy
! Component: 650  -  total flux cleaned = 3.03822e-05 Jy
! Component: 700  -  total flux cleaned = 2.18401e-06 Jy
! Component: 750  -  total flux cleaned = -5.35928e-05 Jy
! Component: 800  -  total flux cleaned = -0.000136601 Jy
! Component: 850  -  total flux cleaned = -0.000163963 Jy
! Component: 900  -  total flux cleaned = -0.000218203 Jy
! Component: 950  -  total flux cleaned = -0.000271921 Jy
! Component: 1000  -  total flux cleaned = -0.000377943 Jy
! Component: 1050  -  total flux cleaned = -0.000377827 Jy
! Component: 1100  -  total flux cleaned = -0.00043002 Jy
! Component: 1150  -  total flux cleaned = -0.000481759 Jy
! Component: 1200  -  total flux cleaned = -0.000532815 Jy
! Component: 1250  -  total flux cleaned = -0.000507474 Jy
! Component: 1300  -  total flux cleaned = -0.000532837 Jy
! Component: 1350  -  total flux cleaned = -0.000558045 Jy
! Component: 1400  -  total flux cleaned = -0.000582934 Jy
! Component: 1450  -  total flux cleaned = -0.000632185 Jy
! Component: 1500  -  total flux cleaned = -0.000558681 Jy
! Component: 1550  -  total flux cleaned = -0.000607495 Jy
! Component: 1600  -  total flux cleaned = -0.000583416 Jy
! Component: 1650  -  total flux cleaned = -0.000607505 Jy
! Component: 1700  -  total flux cleaned = -0.000631236 Jy
! Component: 1750  -  total flux cleaned = -0.00056012 Jy
! Component: 1800  -  total flux cleaned = -0.000583834 Jy
! Component: 1850  -  total flux cleaned = -0.000583901 Jy
! Component: 1900  -  total flux cleaned = -0.000537315 Jy
! Component: 1950  -  total flux cleaned = -0.000630022 Jy
! Component: 2000  -  total flux cleaned = -0.000560796 Jy
! Total flux subtracted in 2048 components = -0.000537811 Jy
! Clean residual min=-0.001249 max=0.001146 Jy/beam
! Clean residual mean=-0.000008 rms=0.000429 Jy/beam
! Combined flux in latest and established models = 1.32199 Jy
keep
! Adding 150 model components to the UV plane model.
! The established model now contains 245 components and 1.32199 Jy
![Exited script file: muppet]
wmap "J2236+2828_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.174 x 3.965 at -7.762 degrees (North through East)
! Clean map  min=-0.0020235  max=1.1954 Jy/beam
! Writing clean map to FITS file: J2236+2828_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 1.19541 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000429398 
device "J2236+2828_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J2236+2828_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.107762 0.107762 0.215524 0.431047 0.862094 1.72419 3.44838 6.89676 13.7935 27.587 55.174
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0012 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.195 
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.174 x 3.965 at -7.762 degrees (North through East)
! Clean map  min=-0.0020235  max=1.1954 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2236+2828_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J2236+2828_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2236+2828_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:20:55 2007