! Started logfile: J0017+8135_S_2001_07_05_pus_uvs.log on Thu Aug  9 23:23:59 2007
obs J0017+8135_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0017+8135_S_2001_07_05_pus_uva.fits
! AN table 1: 317 integrations on 171 of 171 possible baselines.
! AN table 2: 171 integrations on 171 of 171 possible baselines.
! AN table 3: 376 integrations on 171 of 171 possible baselines.
! AN table 4: 581 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.318857 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0017+8135
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! 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 1774 lines of history.
! 
! Reading 315152 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 
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 3065 telescope corrections were flagged in sub-array 1.
!  A total of 1914 telescope corrections were flagged in sub-array 2.
!  A total of 4017 telescope corrections were flagged in sub-array 3.
!  A total of 5641 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 3065 telescope corrections were flagged in sub-array 1.
!  A total of 1914 telescope corrections were flagged in sub-array 2.
!  A total of 4017 telescope corrections were flagged in sub-array 3.
!  A total of 5641 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 3064 telescope corrections were flagged in sub-array 1.
!  A total of 1914 telescope corrections were flagged in sub-array 2.
!  A total of 4017 telescope corrections were flagged in sub-array 3.
!  A total of 5641 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 3065 telescope corrections were flagged in sub-array 1.
!  A total of 1914 telescope corrections were flagged in sub-array 2.
!  A total of 4017 telescope corrections were flagged in sub-array 3.
!  A total of 5641 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.735967Jy  sigma=0.005529
! Fit after  self-cal, rms=0.583168Jy  sigma=0.004359
! 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.892 mas, bmaj=1.949 mas, bpa=36.96 degrees
! Estimated noise=386.21 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.346383 Jy
! Component: 100  -  total flux cleaned = 0.427363 Jy
! Total flux subtracted in 100 components = 0.427363 Jy
! Clean residual min=-0.007266 max=0.032491 Jy/beam
! Clean residual mean=0.000060 rms=0.001787 Jy/beam
! Combined flux in latest and established models = 0.427363 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.427363 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271198Jy  sigma=0.001742
! Fit after  self-cal, rms=0.271200Jy  sigma=0.001742
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0350917 Jy
! Component: 100  -  total flux cleaned = 0.053835 Jy
! Total flux subtracted in 100 components = 0.053835 Jy
! Clean residual min=-0.006200 max=0.031476 Jy/beam
! Clean residual mean=0.000049 rms=0.001543 Jy/beam
! Combined flux in latest and established models = 0.481198 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 13 components and 0.481198 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.262459Jy  sigma=0.001644
! Fit after  self-cal, rms=0.262452Jy  sigma=0.001643
! Inverting map 
! Added new window around map position (-1.5, -9).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0253844 Jy
! Component: 100  -  total flux cleaned = 0.0389064 Jy
! Total flux subtracted in 100 components = 0.0389064 Jy
! Clean residual min=-0.005845 max=0.029928 Jy/beam
! Clean residual mean=0.000041 rms=0.001386 Jy/beam
! Combined flux in latest and established models = 0.520104 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 25 components and 0.520104 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257223Jy  sigma=0.001583
! Fit after  self-cal, rms=0.256964Jy  sigma=0.001582
! Inverting map 
! Added new window around map position (-1.5, -4.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0268594 Jy
! Component: 100  -  total flux cleaned = 0.0407108 Jy
! Total flux subtracted in 100 components = 0.0407108 Jy
! Clean residual min=-0.005307 max=0.009013 Jy/beam
! Clean residual mean=0.000032 rms=0.001184 Jy/beam
! Combined flux in latest and established models = 0.560815 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 38 components and 0.560815 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.251688Jy  sigma=0.001521
! Fit after  self-cal, rms=0.251287Jy  sigma=0.001518
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0126205 Jy
! Component: 100  -  total flux cleaned = 0.0227751 Jy
! Total flux subtracted in 100 components = 0.0227751 Jy
! Clean residual min=-0.004693 max=0.006931 Jy/beam
! Clean residual mean=0.000027 rms=0.001089 Jy/beam
! Combined flux in latest and established models = 0.58359 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 46 components and 0.58359 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249462Jy  sigma=0.001496
! Fit after  self-cal, rms=0.249392Jy  sigma=0.001496
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00943222 Jy
! Component: 100  -  total flux cleaned = 0.0176454 Jy
! Total flux subtracted in 100 components = 0.0176454 Jy
! Clean residual min=-0.004527 max=0.005717 Jy/beam
! Clean residual mean=0.000024 rms=0.001043 Jy/beam
! Combined flux in latest and established models = 0.601236 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 49 components and 0.601236 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248291Jy  sigma=0.001482
! Fit after  self-cal, rms=0.248257Jy  sigma=0.001482
! 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.458 mas, bmaj=2.532 mas, bpa=22.03 degrees
! Estimated noise=166.108 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.0203445 Jy
! Component: 100  -  total flux cleaned = 0.0342347 Jy
! Component: 150  -  total flux cleaned = 0.0443816 Jy
! Component: 200  -  total flux cleaned = 0.0518908 Jy
! Total flux subtracted in 200 components = 0.0518908 Jy
! Clean residual min=-0.002371 max=0.005649 Jy/beam
! Clean residual mean=0.000317 rms=0.000823 Jy/beam
! Combined flux in latest and established models = 0.653126 Jy
! Performing phase self-cal
! Adding 60 model components to the UV plane model.
! The established model now contains 78 components and 0.653127 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.246363Jy  sigma=0.001459
! Fit after  self-cal, rms=0.246214Jy  sigma=0.001457
! Inverting map 
! Added new window around map position (-1, -7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00737086 Jy
! Component: 100  -  total flux cleaned = 0.0124302 Jy
! Component: 150  -  total flux cleaned = 0.0161402 Jy
! Component: 200  -  total flux cleaned = 0.0189633 Jy
! Total flux subtracted in 200 components = 0.0189633 Jy
! Clean residual min=-0.002353 max=0.003247 Jy/beam
! Clean residual mean=0.000260 rms=0.000670 Jy/beam
! Combined flux in latest and established models = 0.67209 Jy
! Performing phase self-cal
! Adding 53 model components to the UV plane model.
! The established model now contains 107 components and 0.67209 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.245957Jy  sigma=0.001454
! Fit after  self-cal, rms=0.245927Jy  sigma=0.001454
! Inverting map 
! Added new window around map position (-1, -12).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00354365 Jy
! Component: 100  -  total flux cleaned = 0.00591184 Jy
! Component: 150  -  total flux cleaned = 0.00711904 Jy
! Component: 200  -  total flux cleaned = 0.00782539 Jy
! Total flux subtracted in 200 components = 0.00782539 Jy
! Clean residual min=-0.002602 max=0.002885 Jy/beam
! Clean residual mean=0.000237 rms=0.000643 Jy/beam
! Combined flux in latest and established models = 0.679915 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 127 components and 0.679915 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.245857Jy  sigma=0.001453
! Fit after  self-cal, rms=0.245852Jy  sigma=0.001453
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 270 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.02     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.02     KP        1.05     
!   LA        1.04     MC        1.07     MK        1.03     NL        1.00     
!   NY        1.00     OV        0.99     PT        0.98     SC        1.07     
!   TS        1.02     WF        0.99     WZ        1.01     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.05     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00     KP        1.00     
!   LA        1.06     MC        0.99     MK        1.02     NL        1.02     
!   NY        1.01     OV        1.02     PT        1.00     SC        1.06     
!   TS        1.02     WF        1.02     WZ        1.03     
! 
!  A total of 105 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.01     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.06     KP        1.04     
!   LA        1.02     MC        1.26     MK        1.02     NL        1.02     
!   NY        0.98     OV        0.98     PT        0.98     SC        1.02     
!   TS        0.99     WF        1.00     WZ        0.98     
! 
!  A total of 243 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        1.00     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.01     KP        1.03     
!   LA        1.00     MC        1.06     MK        1.04     NL        1.00     
!   NY        0.99     OV        1.00     PT        0.97     SC        1.02     
!   TS        1.01     WF        0.99     WZ        0.99     
! 
! 
! Correcting IF 2.
!  A total of 270 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.02     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.04     KP        0.81     
!   LA        1.00     MC        0.89     MK        1.00     NL        0.96     
!   NY        0.99     OV        1.02     PT        1.00     SC        1.08     
!   TS        1.00     WF        1.01     WZ        0.98     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.07     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.00     KP        1.00     
!   LA        1.02     MC        0.90     MK        1.01     NL        0.99     
!   NY        0.99     OV        1.04     PT        1.03     SC        1.04     
!   TS        0.99     WF        1.00     WZ        0.99     
! 
!  A total of 105 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.03     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.06     KP        0.97     
!   LA        0.98     MC        0.93     MK        1.00     NL        0.99     
!   NY        1.00     OV        1.01     PT        1.01     SC        1.04     
!   TS        0.98     WF        0.99     WZ        0.97     
! 
!  A total of 243 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.00     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00     KP        0.98     
!   LA        0.95     MC        0.93     MK        1.03     NL        0.97     
!   NY        0.99     OV        1.02     PT        1.00     SC        1.04     
!   TS        0.99     WF        0.99     WZ        0.96     
! 
! 
! Correcting IF 3.
!  A total of 270 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.97     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.08     KP        1.08     
!   LA        1.00     MC        3.30     MK        1.01     NL        1.01     
!   NY        0.98     OV        1.02     PT        0.97     SC        1.06     
!   TS        0.99     WF        0.98     WZ        1.00     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.01     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        0.71     KP        1.05     
!   LA        1.06     MC        1.09     MK        1.03     NL        1.01     
!   NY        0.98     OV        1.05     PT        1.00     SC        1.06     
!   TS        0.97     WF        1.03     WZ        1.02     
! 
!  A total of 105 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        0.95     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.06     KP        1.03     
!   LA        1.00     MC        1.39     MK        1.02     NL        1.02     
!   NY        0.97     OV        1.02     PT        0.99     SC        1.01     
!   TS        0.99     WF        0.95     WZ        1.00     
! 
!  A total of 243 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        0.95     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.02     KP        1.05     
!   LA        0.98     MC        1.25     MK        1.04     NL        1.00     
!   NY        0.99     OV        1.04     PT        0.99     SC        1.02     
!   TS        1.00     WF        0.94     WZ        0.97     
! 
! 
! Correcting IF 4.
!  A total of 270 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.01     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.01     KP        1.09     
!   LA        0.99     MC        0.83     MK        1.00     NL        1.00     
!   NY        0.99     OV        0.99     PT        0.93     SC        1.04     
!   TS        1.01     WF        1.01     WZ        0.97     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.03     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.93     KP        1.06     
!   LA        1.03     MC        0.85     MK        1.01     NL        0.99     
!   NY        1.00     OV        0.99     PT        1.04     SC        1.04     
!   TS        0.99     WF        0.98     WZ        1.02     
! 
!  A total of 105 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.00     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.04     KP        1.05     
!   LA        1.00     MC        1.01     MK        1.02     NL        0.98     
!   NY        0.98     OV        1.00     PT        1.02     SC        1.00     
!   TS        0.99     WF        0.97     WZ        0.96     
! 
!  A total of 243 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.98     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.91     KK        1.01     KP        1.05     
!   LA        0.99     MC        0.98     MK        1.02     NL        0.98     
!   NY        0.99     OV        0.98     PT        1.03     SC        1.02     
!   TS        1.00     WF        0.98     WZ        0.96     
! 
! 
! Fit before self-cal, rms=0.245852Jy  sigma=0.001453
! Fit after  self-cal, rms=0.246201Jy  sigma=0.001427
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.463 mas, bmaj=2.537 mas, bpa=23.07 degrees
! Estimated noise=166.889 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.00189242 Jy
! Component: 100  -  total flux cleaned = 0.00268905 Jy
! Component: 150  -  total flux cleaned = 0.00314651 Jy
! Component: 200  -  total flux cleaned = 0.00349138 Jy
! Total flux subtracted in 200 components = 0.00349138 Jy
! Clean residual min=-0.002546 max=0.001852 Jy/beam
! Clean residual mean=0.000090 rms=0.000496 Jy/beam
! Combined flux in latest and established models = 0.683407 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 151 components and 0.683407 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.246181Jy  sigma=0.001427
! Fit after  self-cal, rms=0.246238Jy  sigma=0.001427
! 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.246238Jy  sigma=0.001427
! Fit after  self-cal, rms=0.253001Jy  sigma=0.001411
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.464 mas, bmaj=2.535 mas, bpa=22.64 degrees
! Estimated noise=167.055 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00165793 Jy
! Component: 100  -  total flux cleaned = 0.00238184 Jy
! Component: 150  -  total flux cleaned = 0.0025711 Jy
! Component: 200  -  total flux cleaned = 0.00270737 Jy
! Total flux subtracted in 200 components = 0.00270737 Jy
! Clean residual min=-0.001123 max=0.001780 Jy/beam
! Clean residual mean=0.000108 rms=0.000269 Jy/beam
! Combined flux in latest and established models = 0.686114 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 164 components and 0.686114 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.252985Jy  sigma=0.001411
! Fit after  self-cal, rms=0.253079Jy  sigma=0.001411
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 (-12, -24.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00169482 Jy
! Component: 100  -  total flux cleaned = 0.00261404 Jy
! Component: 150  -  total flux cleaned = 0.0028726 Jy
! Component: 200  -  total flux cleaned = 0.0030008 Jy
! Total flux subtracted in 200 components = 0.0030008 Jy
! Clean residual min=-0.001154 max=0.001085 Jy/beam
! Clean residual mean=0.000099 rms=0.000253 Jy/beam
! Combined flux in latest and established models = 0.689115 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 182 components and 0.689115 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.253068Jy  sigma=0.001411
! Fit after  self-cal, rms=0.253066Jy  sigma=0.001411
! 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.253066Jy  sigma=0.001411
! Fit after  self-cal, rms=0.254136Jy  sigma=0.001411
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.464 mas, bmaj=2.535 mas, bpa=22.81 degrees
! Estimated noise=167.266 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0010073 Jy
! Component: 100  -  total flux cleaned = 0.0017412 Jy
! Component: 150  -  total flux cleaned = 0.00211333 Jy
! Component: 200  -  total flux cleaned = 0.00226895 Jy
! Total flux subtracted in 200 components = 0.00226895 Jy
! Clean residual min=-0.001041 max=0.001038 Jy/beam
! Clean residual mean=0.000094 rms=0.000251 Jy/beam
! Combined flux in latest and established models = 0.691384 Jy
selfcal
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 194 components and 0.691384 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254130Jy  sigma=0.001411
! Fit after  self-cal, rms=0.254133Jy  sigma=0.001411
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.000276602 Jy
! Component: 100  -  total flux cleaned = 0.000359086 Jy
! Component: 150  -  total flux cleaned = 0.000417549 Jy
! Component: 200  -  total flux cleaned = 0.000473344 Jy
! Total flux subtracted in 200 components = 0.000473344 Jy
! Clean residual min=-0.001057 max=0.001049 Jy/beam
! Clean residual mean=0.000093 rms=0.000250 Jy/beam
! Combined flux in latest and established models = 0.691857 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 199 components and 0.691857 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254131Jy  sigma=0.001410
! Fit after  self-cal, rms=0.254131Jy  sigma=0.001410
! 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.254131Jy  sigma=0.001410
! Fit after  self-cal, rms=0.254312Jy  sigma=0.001410
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.934 mas, bmaj=8.415 mas, bpa=-32.37 degrees
! Estimated noise=267.181 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00127072 Jy
! Component: 100  -  total flux cleaned = 0.00199512 Jy
! Component: 150  -  total flux cleaned = 0.00244793 Jy
! Component: 200  -  total flux cleaned = 0.00274669 Jy
! Total flux subtracted in 200 components = 0.00274669 Jy
! Clean residual min=-0.000841 max=0.001346 Jy/beam
! Clean residual mean=0.000344 rms=0.000336 Jy/beam
! Combined flux in latest and established models = 0.694604 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 212 components and 0.694604 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254308Jy  sigma=0.001410
! Fit after  self-cal, rms=0.254309Jy  sigma=0.001410
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.000348257 Jy
! Component: 100  -  total flux cleaned = 0.00045588 Jy
! Component: 150  -  total flux cleaned = 0.000488499 Jy
! Component: 200  -  total flux cleaned = 0.00051827 Jy
! Total flux subtracted in 200 components = 0.00051827 Jy
! Clean residual min=-0.000844 max=0.001386 Jy/beam
! Clean residual mean=0.000338 rms=0.000335 Jy/beam
! Combined flux in latest and established models = 0.695122 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 218 components and 0.695122 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254308Jy  sigma=0.001410
! Fit after  self-cal, rms=0.254308Jy  sigma=0.001410
! 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.464 mas, bmaj=2.534 mas, bpa=22.98 degrees
! Estimated noise=167.38 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.464 x 2.534 at 22.98 degrees (North through East)
! Clean map  min=-0.00092227  max=0.46628 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
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.899 mas, bmaj=1.95 mas, bpa=35.87 degrees
! Estimated noise=393.703 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.348681 Jy
! Component: 100  -  total flux cleaned = 0.430496 Jy
! Component: 150  -  total flux cleaned = 0.473357 Jy
! Component: 200  -  total flux cleaned = 0.504485 Jy
! Total flux subtracted in 200 components = 0.504485 Jy
! Clean residual min=-0.004220 max=0.018180 Jy/beam
! Clean residual mean=0.000045 rms=0.001223 Jy/beam
! Combined flux in latest and established models = 0.504485 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 17 model components to the UV plane model.
! The established model now contains 17 components and 0.504485 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.464 mas, bmaj=2.534 mas, bpa=22.98 degrees
! Estimated noise=167.38 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.0522802 Jy
! Component: 100  -  total flux cleaned = 0.0866451 Jy
! Component: 150  -  total flux cleaned = 0.110596 Jy
! Component: 200  -  total flux cleaned = 0.127957 Jy
! Total flux subtracted in 200 components = 0.127957 Jy
! Clean residual min=-0.002067 max=0.010018 Jy/beam
! Clean residual mean=0.000306 rms=0.001062 Jy/beam
! Combined flux in latest and established models = 0.632442 Jy
! Adding 64 model components to the UV plane model.
! The established model now contains 66 components and 0.632442 Jy
! Inverting map 
! Added new window around map position (0, -2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0129033 Jy
! Component: 100  -  total flux cleaned = 0.0225977 Jy
! Component: 150  -  total flux cleaned = 0.0299773 Jy
! Component: 200  -  total flux cleaned = 0.0356711 Jy
! Total flux subtracted in 200 components = 0.0356711 Jy
! Clean residual min=-0.001275 max=0.003363 Jy/beam
! Clean residual mean=0.000179 rms=0.000466 Jy/beam
! Combined flux in latest and established models = 0.668113 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 106 components and 0.668113 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00444027 Jy
! Component: 100  -  total flux cleaned = 0.00797369 Jy
! Component: 150  -  total flux cleaned = 0.0108626 Jy
! Component: 200  -  total flux cleaned = 0.0132697 Jy
! Total flux subtracted in 200 components = 0.0132697 Jy
! Clean residual min=-0.001152 max=0.001609 Jy/beam
! Clean residual mean=0.000132 rms=0.000312 Jy/beam
! Combined flux in latest and established models = 0.681383 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 139 components and 0.681383 Jy
! Inverting map 
! Added new window around map position (-5, -10.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00204229 Jy
! Component: 100  -  total flux cleaned = 0.00376978 Jy
! Component: 150  -  total flux cleaned = 0.00523939 Jy
! Component: 200  -  total flux cleaned = 0.00621214 Jy
! Total flux subtracted in 200 components = 0.00621214 Jy
! Clean residual min=-0.001101 max=0.001158 Jy/beam
! Clean residual mean=0.000111 rms=0.000268 Jy/beam
! Combined flux in latest and established models = 0.687595 Jy
! Adding 55 model components to the UV plane model.
! The established model now contains 160 components and 0.687595 Jy
! Inverting map 
! Added new window around map position (22, -10).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00095469 Jy
! Component: 100  -  total flux cleaned = 0.001553 Jy
! Component: 150  -  total flux cleaned = 0.00206518 Jy
! Component: 200  -  total flux cleaned = 0.00257466 Jy
! Total flux subtracted in 200 components = 0.00257466 Jy
! Clean residual min=-0.001067 max=0.001061 Jy/beam
! Clean residual mean=0.000101 rms=0.000257 Jy/beam
! Combined flux in latest and established models = 0.69017 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 172 components and 0.69017 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.934 mas, bmaj=8.415 mas, bpa=-32.37 degrees
! Estimated noise=267.181 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00219041 Jy
! Component: 100  -  total flux cleaned = 0.00345104 Jy
! Component: 150  -  total flux cleaned = 0.0042655 Jy
! Component: 200  -  total flux cleaned = 0.00482718 Jy
! Total flux subtracted in 200 components = 0.00482718 Jy
! Clean residual min=-0.000858 max=0.001365 Jy/beam
! Clean residual mean=0.000338 rms=0.000333 Jy/beam
! Combined flux in latest and established models = 0.694997 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.00034177 Jy
! Component: 100  -  total flux cleaned = 0.000518897 Jy
! Component: 150  -  total flux cleaned = 0.000655553 Jy
! Component: 200  -  total flux cleaned = 0.000771538 Jy
! Total flux subtracted in 200 components = 0.000771538 Jy
! Clean residual min=-0.000851 max=0.001365 Jy/beam
! Clean residual mean=0.000327 rms=0.000332 Jy/beam
! Combined flux in latest and established models = 0.695768 Jy
! Adding 58 model components to the UV plane model.
! The established model now contains 215 components and 0.695768 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.464 mas, bmaj=2.534 mas, bpa=22.98 degrees
! Estimated noise=167.38 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000706248 Jy
! Component: 100  -  total flux cleaned = -0.000795441 Jy
! Component: 150  -  total flux cleaned = -0.000849184 Jy
! Component: 200  -  total flux cleaned = -0.000951607 Jy
! Total flux subtracted in 200 components = -0.000951607 Jy
! Clean residual min=-0.001052 max=0.001007 Jy/beam
! Clean residual mean=0.000085 rms=0.000247 Jy/beam
! Combined flux in latest and established models = 0.694817 Jy
selfcal
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 226 components and 0.694816 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254306Jy  sigma=0.001410
! Fit after  self-cal, rms=0.254312Jy  sigma=0.001410
wmodel J0017+8135_S_2001_07_05_pus_map.mod
! Writing 226 model components to file: J0017+8135_S_2001_07_05_pus_map.mod
wobs J0017+8135_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0017+8135_S_2001_07_05_pus_uvs.fits
wwins J0017+8135_S_2001_07_05_pus_map.win
! wwins: Wrote 9 windows to J0017+8135_S_2001_07_05_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.000223658 Jy
! Component: 100  -  total flux cleaned = 0.000523707 Jy
! Component: 150  -  total flux cleaned = 0.000828994 Jy
! Component: 200  -  total flux cleaned = 0.00112638 Jy
! Component: 250  -  total flux cleaned = 0.00140185 Jy
! Component: 300  -  total flux cleaned = 0.00170429 Jy
! Component: 350  -  total flux cleaned = 0.0019394 Jy
! Component: 400  -  total flux cleaned = 0.00217135 Jy
! Component: 450  -  total flux cleaned = 0.00243091 Jy
! Component: 500  -  total flux cleaned = 0.00265724 Jy
! Component: 550  -  total flux cleaned = 0.00288125 Jy
! Component: 600  -  total flux cleaned = 0.00305885 Jy
! Component: 650  -  total flux cleaned = 0.0032788 Jy
! Component: 700  -  total flux cleaned = 0.00345324 Jy
! Component: 750  -  total flux cleaned = 0.00366954 Jy
! Component: 800  -  total flux cleaned = 0.00385537 Jy
! Component: 850  -  total flux cleaned = 0.00408227 Jy
! Component: 900  -  total flux cleaned = 0.00423698 Jy
! Component: 950  -  total flux cleaned = 0.00443264 Jy
! Component: 1000  -  total flux cleaned = 0.00462705 Jy
! Component: 1050  -  total flux cleaned = 0.00482016 Jy
! Component: 1100  -  total flux cleaned = 0.00501204 Jy
! Component: 1150  -  total flux cleaned = 0.00520275 Jy
! Component: 1200  -  total flux cleaned = 0.00536522 Jy
! Component: 1250  -  total flux cleaned = 0.00555374 Jy
! Component: 1300  -  total flux cleaned = 0.00571428 Jy
! Component: 1350  -  total flux cleaned = 0.00587406 Jy
! Component: 1400  -  total flux cleaned = 0.00605952 Jy
! Component: 1450  -  total flux cleaned = 0.00624381 Jy
! Component: 1500  -  total flux cleaned = 0.0064402 Jy
! Component: 1550  -  total flux cleaned = 0.00657034 Jy
! Component: 1600  -  total flux cleaned = 0.00676467 Jy
! Component: 1650  -  total flux cleaned = 0.00688069 Jy
! Component: 1700  -  total flux cleaned = 0.00702192 Jy
! Component: 1750  -  total flux cleaned = 0.00713692 Jy
! Component: 1800  -  total flux cleaned = 0.0073023 Jy
! Component: 1850  -  total flux cleaned = 0.00742896 Jy
! Component: 1900  -  total flux cleaned = 0.00755507 Jy
! Component: 1950  -  total flux cleaned = 0.00770575 Jy
! Component: 2000  -  total flux cleaned = 0.00780583 Jy
! Total flux subtracted in 2048 components = 0.00796767 Jy
! Clean residual min=-0.000913 max=0.000875 Jy/beam
! Clean residual mean=0.000054 rms=0.000228 Jy/beam
! Combined flux in latest and established models = 0.702784 Jy
keep
! Adding 170 model components to the UV plane model.
! The established model now contains 396 components and 0.702784 Jy
wmap "J0017+8135_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.464 x 2.534 at 22.98 degrees (North through East)
! Clean map  min=-0.00094399  max=0.46688 Jy/beam
! Writing clean map to FITS file: J0017+8135_S_2001_07_05_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.466876 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000228291 
device "J0017+8135_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0017+8135_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.146693 0.146693 0.293386 0.586771 1.17354 2.34708 4.69417 9.38834 18.7767 37.5534 75.1067
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0006 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.466 
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.464 x 2.534 at 22.98 degrees (North through East)
! Clean map  min=-0.00094399  max=0.46688 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0017+8135_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0017+8135_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0017+8135_S_2001_07_05_pus_uvs.log closed on Thu Aug  9 23:33:13 2007