! Started logfile: J1740+5211_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:12:40 2007
obs J1740+5211_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J1740+5211_S_2001_04_09_pus_uva.fits
! AN table 1: 311 integrations on 190 of 190 possible baselines.
! AN table 2: 138 integrations on 190 of 190 possible baselines.
! AN table 3: 199 integrations on 190 of 190 possible baselines.
! AN table 4: 107 integrations on 190 of 190 possible baselines.
! AN table 5: 29 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.190293 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1740+5211
! 
! 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 113384 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 J1740+5211_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 3866 telescope corrections were flagged in sub-array 1.
!  A total of 1714 telescope corrections were flagged in sub-array 2.
!  A total of 2238 telescope corrections were flagged in sub-array 3.
!  A total of 1449 telescope corrections were flagged in sub-array 4.
!  A total of 385 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 3866 telescope corrections were flagged in sub-array 1.
!  A total of 1714 telescope corrections were flagged in sub-array 2.
!  A total of 2237 telescope corrections were flagged in sub-array 3.
!  A total of 1449 telescope corrections were flagged in sub-array 4.
!  A total of 385 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 3866 telescope corrections were flagged in sub-array 1.
!  A total of 1714 telescope corrections were flagged in sub-array 2.
!  A total of 2237 telescope corrections were flagged in sub-array 3.
!  A total of 1449 telescope corrections were flagged in sub-array 4.
!  A total of 385 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 3866 telescope corrections were flagged in sub-array 1.
!  A total of 1715 telescope corrections were flagged in sub-array 2.
!  A total of 2237 telescope corrections were flagged in sub-array 3.
!  A total of 1449 telescope corrections were flagged in sub-array 4.
!  A total of 385 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=0.856549Jy  sigma=0.006992
! Fit after  self-cal, rms=0.588990Jy  sigma=0.004782
! 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.944 mas, bmaj=2.411 mas, bpa=-1.339 degrees
! Estimated noise=687.215 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.317007 Jy
! Component: 100  -  total flux cleaned = 0.392031 Jy
! Total flux subtracted in 100 components = 0.392031 Jy
! Clean residual min=-0.007751 max=0.031463 Jy/beam
! Clean residual mean=0.000020 rms=0.002341 Jy/beam
! Combined flux in latest and established models = 0.392031 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.392031 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.246691Jy  sigma=0.001764
! Fit after  self-cal, rms=0.246630Jy  sigma=0.001764
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0387253 Jy
! Component: 100  -  total flux cleaned = 0.0654383 Jy
! Total flux subtracted in 100 components = 0.0654383 Jy
! Clean residual min=-0.006559 max=0.014864 Jy/beam
! Clean residual mean=0.000007 rms=0.001824 Jy/beam
! Combined flux in latest and established models = 0.457469 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 22 components and 0.457469 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232374Jy  sigma=0.001579
! Fit after  self-cal, rms=0.232238Jy  sigma=0.001579
! Inverting map 
! Added new window around map position (-0.5, 2.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.019624 Jy
! Component: 100  -  total flux cleaned = 0.034086 Jy
! Total flux subtracted in 100 components = 0.034086 Jy
! Clean residual min=-0.006191 max=0.009693 Jy/beam
! Clean residual mean=0.000000 rms=0.001660 Jy/beam
! Combined flux in latest and established models = 0.491555 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 30 components and 0.491555 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228024Jy  sigma=0.001520
! Fit after  self-cal, rms=0.227867Jy  sigma=0.001519
! 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.71 mas, bmaj=3.78 mas, bpa=-1.935 degrees
! Estimated noise=254.024 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.0290953 Jy
! Component: 100  -  total flux cleaned = 0.0455813 Jy
! Component: 150  -  total flux cleaned = 0.055865 Jy
! Component: 200  -  total flux cleaned = 0.0623708 Jy
! Total flux subtracted in 200 components = 0.0623708 Jy
! Clean residual min=-0.006107 max=0.008659 Jy/beam
! Clean residual mean=-0.000066 rms=0.001698 Jy/beam
! Combined flux in latest and established models = 0.553926 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 50 components and 0.553926 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224636Jy  sigma=0.001470
! Fit after  self-cal, rms=0.224449Jy  sigma=0.001470
! Inverting map 
! Added new window around map position (3, 3.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00951424 Jy
! Component: 100  -  total flux cleaned = 0.0152937 Jy
! Component: 150  -  total flux cleaned = 0.0191747 Jy
! Component: 200  -  total flux cleaned = 0.0219161 Jy
! Total flux subtracted in 200 components = 0.0219161 Jy
! Clean residual min=-0.006201 max=0.005267 Jy/beam
! Clean residual mean=-0.000197 rms=0.001499 Jy/beam
! Combined flux in latest and established models = 0.575842 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 72 components and 0.575842 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.223997Jy  sigma=0.001465
! Fit after  self-cal, rms=0.223940Jy  sigma=0.001464
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 276 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.03     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.00*    KP        1.16     
!   LA        1.01     MA        0.97     MC        1.34     MK        1.03     
!   NL        1.04     NY        1.00     OV        1.04     PT        0.99     
!   SC        0.91     TS        0.97     WF        1.06     WZ        0.92     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.95     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00     KP        0.96     
!   LA        0.94     MA        1.21     MC        3.21     MK        1.01     
!   NL        0.95     NY        1.00     OV        0.99     PT        0.92     
!   SC        0.98     TS        0.98     WF        1.10     WZ        1.15     
! 
!  A total of 222 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.98     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00     KP        0.92     
!   LA        0.97     MA        1.05     MC        0.95     MK        1.01     
!   NL        0.98     NY        0.93     OV        1.00     PT        0.94     
!   SC        1.02     TS        0.91     WF        1.05     WZ        1.07     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.05     FD        1.07     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.00*    KP        0.90     
!   LA        1.01     MA        0.83     MC        1.16     MK        1.00*    
!   NL        1.01     NY        1.00     OV        1.00*    PT        0.97     
!   SC        0.99     TS        1.00     WF        0.92     WZ        1.11     
! 
!  A total of 9 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.02     FD        1.00*    GC        1.07     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.02     KP        1.00*    
!   LA        1.00*    MA        0.83     MC        2.11     MK        1.00*    
!   NL        1.00*    NY        1.02     OV        1.02     PT        1.00*    
!   SC        1.00*    TS        0.99     WF        1.00*    WZ        0.89     
! 
! 
! Correcting IF 2.
!  A total of 276 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.04     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.00*    KP        0.93     
!   LA        1.03     MA        1.08     MC        0.99     MK        1.03     
!   NL        1.05     NY        1.02     OV        1.01     PT        1.03     
!   SC        0.93     TS        1.00     WF        1.02     WZ        0.93     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.94     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        0.98     KP        0.94     
!   LA        0.95     MA        1.87     MC        1.13     MK        1.04     
!   NL        0.97     NY        0.99     OV        0.97     PT        0.95     
!   SC        1.02     TS        1.02     WF        1.03     WZ        1.14     
! 
!  A total of 222 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        0.97     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00     KP        0.73     
!   LA        1.00     MA        0.79     MC        1.06     MK        1.03     
!   NL        0.99     NY        0.94     OV        0.98     PT        0.96     
!   SC        1.02     TS        0.96     WF        1.04     WZ        1.07     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.06     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.00*    KP        0.96     
!   LA        1.01     MA        0.89     MC        0.95     MK        1.00*    
!   NL        1.00     NY        0.98     OV        1.00*    PT        1.03     
!   SC        0.99     TS        1.08     WF        1.02     WZ        1.12     
! 
!  A total of 9 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.98     FD        1.00*    GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.09     KP        1.00*    
!   LA        1.00*    MA        0.91     MC        1.60     MK        1.00*    
!   NL        1.00*    NY        1.03     OV        1.13     PT        1.00*    
!   SC        1.00*    TS        0.96     WF        1.00*    WZ        0.91     
! 
! 
! Correcting IF 3.
!  A total of 276 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.07     FD        1.04     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.00*    KP        1.10     
!   LA        1.00     MA        0.99     MC        0.92     MK        1.00     
!   NL        1.05     NY        1.02     OV        1.02     PT        1.03     
!   SC        0.89     TS        1.04     WF        1.05     WZ        0.95     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.95     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.01     KP        1.00     
!   LA        0.93     MA        2.61     MC        1.15     MK        1.00     
!   NL        0.95     NY        0.96     OV        0.98     PT        0.97     
!   SC        0.99     TS        1.02     WF        1.01     WZ        1.12     
! 
!  A total of 222 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        0.98     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.01     KP        0.92     
!   LA        0.96     MA        1.11     MC        1.22     MK        1.00     
!   NL        0.99     NY        0.98     OV        0.98     PT        0.98     
!   SC        1.02     TS        1.01     WF        1.01     WZ        1.09     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     FD        1.08     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.00*    KP        1.01     
!   LA        0.99     MA        0.89     MC        0.90     MK        1.00*    
!   NL        1.00     NY        1.03     OV        1.00*    PT        1.03     
!   SC        1.00     TS        1.08     WF        1.04     WZ        1.09     
! 
!  A total of 9 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.03     FD        1.00*    GC        1.11     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.11     KP        1.00*    
!   LA        1.00*    MA        1.08     MC        0.98     MK        1.00*    
!   NL        1.00*    NY        0.97     OV        1.05     PT        1.00*    
!   SC        1.00*    TS        0.98     WF        1.00*    WZ        0.93     
! 
! 
! Correcting IF 4.
!  A total of 276 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.05     GC        1.09     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.00*    KP        1.10     
!   LA        1.03     MA        0.95     MC        0.86     MK        0.97     
!   NL        1.04     NY        1.04     OV        1.03     PT        1.04     
!   SC        0.93     TS        0.97     WF        1.04     WZ        1.00     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.97     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.97     KP        0.99     
!   LA        0.97     MA        1.00*    MC        0.81     MK        1.00     
!   NL        0.96     NY        1.00     OV        0.98     PT        1.06     
!   SC        0.99     TS        0.98     WF        1.02     WZ        1.11     
! 
!  A total of 222 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.99     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        0.98     KP        0.86     
!   LA        1.01     MA        0.72     MC        0.53     MK        0.98     
!   NL        0.99     NY        0.92     OV        0.99     PT        1.12     
!   SC        1.03     TS        0.96     WF        0.99     WZ        1.21     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        1.09     GC        1.10     GG        1.00*    
!   HH        1.00*    HN        1.10     KK        1.00*    KP        0.97     
!   LA        1.03     MA        0.92     MC        0.85     MK        1.00*    
!   NL        1.00     NY        1.08     OV        1.00*    PT        1.03     
!   SC        1.05     TS        1.02     WF        1.04     WZ        1.12     
! 
!  A total of 9 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.20     FD        1.00*    GC        1.12     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.08     KP        1.00*    
!   LA        1.00*    MA        0.67     MC        0.59     MK        1.00*    
!   NL        1.00*    NY        1.20     OV        1.21     PT        1.00*    
!   SC        1.00*    TS        1.34     WF        1.00*    WZ        1.31     
! 
! 
! Fit before self-cal, rms=0.223940Jy  sigma=0.001464
! Fit after  self-cal, rms=0.213974Jy  sigma=0.001407
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.714 mas, bmaj=3.807 mas, bpa=-1.738 degrees
! Estimated noise=257.034 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.5, 17).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00293663 Jy
! Component: 100  -  total flux cleaned = 0.00332469 Jy
! Component: 150  -  total flux cleaned = 0.00402725 Jy
! Component: 200  -  total flux cleaned = 0.00449602 Jy
! Total flux subtracted in 200 components = 0.00449602 Jy
! Clean residual min=-0.002075 max=0.002472 Jy/beam
! Clean residual mean=0.000012 rms=0.000563 Jy/beam
! Combined flux in latest and established models = 0.580338 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 90 components and 0.580338 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.213888Jy  sigma=0.001406
! Fit after  self-cal, rms=0.214467Jy  sigma=0.001404
! 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.214467Jy  sigma=0.001404
! Fit after  self-cal, rms=0.217301Jy  sigma=0.001394
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.712 mas, bmaj=3.814 mas, bpa=-1.887 degrees
! Estimated noise=257.26 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00154093 Jy
! Component: 100  -  total flux cleaned = 0.00202113 Jy
! Component: 150  -  total flux cleaned = 0.00253417 Jy
! Component: 200  -  total flux cleaned = 0.00285022 Jy
! Total flux subtracted in 200 components = 0.00285022 Jy
! Clean residual min=-0.001733 max=0.001931 Jy/beam
! Clean residual mean=0.000015 rms=0.000438 Jy/beam
! Combined flux in latest and established models = 0.583188 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 103 components and 0.583189 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.217265Jy  sigma=0.001394
! Fit after  self-cal, rms=0.217896Jy  sigma=0.001394
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 (7, 12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0020268 Jy
! Component: 100  -  total flux cleaned = 0.0022959 Jy
! Component: 150  -  total flux cleaned = 0.00251581 Jy
! Component: 200  -  total flux cleaned = 0.00263033 Jy
! Total flux subtracted in 200 components = 0.00263033 Jy
! Clean residual min=-0.001595 max=0.001660 Jy/beam
! Clean residual mean=-0.000002 rms=0.000407 Jy/beam
! Combined flux in latest and established models = 0.585819 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 113 components and 0.585819 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.217867Jy  sigma=0.001393
! Fit after  self-cal, rms=0.217866Jy  sigma=0.001393
! 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.217866Jy  sigma=0.001393
! Fit after  self-cal, rms=0.223231Jy  sigma=0.001393
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.713 mas, bmaj=3.817 mas, bpa=-1.961 degrees
! Estimated noise=258.077 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00185737 Jy
! Component: 100  -  total flux cleaned = 0.00281134 Jy
! Component: 150  -  total flux cleaned = 0.00330035 Jy
! Component: 200  -  total flux cleaned = 0.0035529 Jy
! Total flux subtracted in 200 components = 0.0035529 Jy
! Clean residual min=-0.001746 max=0.001804 Jy/beam
! Clean residual mean=-0.000024 rms=0.000426 Jy/beam
! Combined flux in latest and established models = 0.589372 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 121 components and 0.589372 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.223201Jy  sigma=0.001393
! Fit after  self-cal, rms=0.223915Jy  sigma=0.001392
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 (-6.5, 5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00176176 Jy
! Component: 100  -  total flux cleaned = 0.00175781 Jy
! Component: 150  -  total flux cleaned = 0.00187603 Jy
! Component: 200  -  total flux cleaned = 0.00201875 Jy
! Total flux subtracted in 200 components = 0.00201875 Jy
! Clean residual min=-0.001633 max=0.001536 Jy/beam
! Clean residual mean=-0.000036 rms=0.000412 Jy/beam
! Combined flux in latest and established models = 0.591391 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 135 components and 0.59139 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.223891Jy  sigma=0.001392
! Fit after  self-cal, rms=0.223894Jy  sigma=0.001392
! 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.223894Jy  sigma=0.001392
! Fit after  self-cal, rms=0.231081Jy  sigma=0.001391
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.97 mas, bmaj=8.27 mas, bpa=-16.34 degrees
! Estimated noise=355.938 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00201213 Jy
! Component: 100  -  total flux cleaned = 0.00321969 Jy
! Component: 150  -  total flux cleaned = 0.00383326 Jy
! Component: 200  -  total flux cleaned = 0.00407207 Jy
! Total flux subtracted in 200 components = 0.00407207 Jy
! Clean residual min=-0.002321 max=0.001551 Jy/beam
! Clean residual mean=-0.000145 rms=0.000637 Jy/beam
! Combined flux in latest and established models = 0.595463 Jy
selfcal
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 168 components and 0.595463 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231070Jy  sigma=0.001391
! Fit after  self-cal, rms=0.231792Jy  sigma=0.001391
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.000593325 Jy
! Component: 100  -  total flux cleaned = 0.000794752 Jy
! Component: 150  -  total flux cleaned = 0.000908281 Jy
! Component: 200  -  total flux cleaned = 0.000922704 Jy
! Total flux subtracted in 200 components = 0.000922704 Jy
! Clean residual min=-0.002317 max=0.001417 Jy/beam
! Clean residual mean=-0.000159 rms=0.000631 Jy/beam
! Combined flux in latest and established models = 0.596385 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 188 components and 0.596385 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231787Jy  sigma=0.001391
! Fit after  self-cal, rms=0.231796Jy  sigma=0.001391
! 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.714 mas, bmaj=3.819 mas, bpa=-1.994 degrees
! Estimated noise=258.946 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.714 x 3.819 at -1.994 degrees (North through East)
! Clean map  min=-0.0015654  max=0.45485 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.944 mas, bmaj=2.416 mas, bpa=-2.606 degrees
! Estimated noise=700.418 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.321407 Jy
! Component: 100  -  total flux cleaned = 0.399354 Jy
! Component: 150  -  total flux cleaned = 0.438351 Jy
! Component: 200  -  total flux cleaned = 0.465021 Jy
! Total flux subtracted in 200 components = 0.465021 Jy
! Clean residual min=-0.005120 max=0.014816 Jy/beam
! Clean residual mean=0.000017 rms=0.001470 Jy/beam
! Combined flux in latest and established models = 0.465021 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 0.465021 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.714 mas, bmaj=3.819 mas, bpa=-1.994 degrees
! Estimated noise=258.946 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.0426636 Jy
! Component: 100  -  total flux cleaned = 0.0658925 Jy
! Component: 150  -  total flux cleaned = 0.0807183 Jy
! Component: 200  -  total flux cleaned = 0.0909734 Jy
! Total flux subtracted in 200 components = 0.0909734 Jy
! Clean residual min=-0.002052 max=0.005808 Jy/beam
! Clean residual mean=0.000187 rms=0.000944 Jy/beam
! Combined flux in latest and established models = 0.555994 Jy
! Adding 89 model components to the UV plane model.
! The established model now contains 99 components and 0.555994 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00754072 Jy
! Component: 100  -  total flux cleaned = 0.013355 Jy
! Component: 150  -  total flux cleaned = 0.0180061 Jy
! Component: 200  -  total flux cleaned = 0.0218305 Jy
! Total flux subtracted in 200 components = 0.0218305 Jy
! Clean residual min=-0.001648 max=0.002543 Jy/beam
! Clean residual mean=0.000056 rms=0.000554 Jy/beam
! Combined flux in latest and established models = 0.577825 Jy
! Adding 66 model components to the UV plane model.
! The established model now contains 147 components and 0.577825 Jy
! Inverting map 
! Added new window around map position (1.5, 9.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00321357 Jy
! Component: 100  -  total flux cleaned = 0.00588939 Jy
! Component: 150  -  total flux cleaned = 0.00813731 Jy
! Component: 200  -  total flux cleaned = 0.0100362 Jy
! Total flux subtracted in 200 components = 0.0100362 Jy
! Clean residual min=-0.001588 max=0.001813 Jy/beam
! Clean residual mean=-0.000004 rms=0.000441 Jy/beam
! Combined flux in latest and established models = 0.587861 Jy
! Adding 52 model components to the UV plane model.
! The established model now contains 166 components and 0.587861 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.97 mas, bmaj=8.27 mas, bpa=-16.34 degrees
! Estimated noise=355.938 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00341344 Jy
! Component: 100  -  total flux cleaned = 0.00546875 Jy
! Component: 150  -  total flux cleaned = 0.00678263 Jy
! Component: 200  -  total flux cleaned = 0.00730105 Jy
! Total flux subtracted in 200 components = 0.00730105 Jy
! Clean residual min=-0.002373 max=0.001477 Jy/beam
! Clean residual mean=-0.000138 rms=0.000642 Jy/beam
! Combined flux in latest and established models = 0.595162 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.000311295 Jy
! Component: 100  -  total flux cleaned = 0.000557945 Jy
! Component: 150  -  total flux cleaned = 0.000756013 Jy
! Component: 200  -  total flux cleaned = 0.000915812 Jy
! Total flux subtracted in 200 components = 0.000915813 Jy
! Clean residual min=-0.002330 max=0.001453 Jy/beam
! Clean residual mean=-0.000153 rms=0.000634 Jy/beam
! Combined flux in latest and established models = 0.596078 Jy
! Adding 91 model components to the UV plane model.
! The established model now contains 247 components and 0.596078 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.714 mas, bmaj=3.819 mas, bpa=-1.994 degrees
! Estimated noise=258.946 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000906898 Jy
! Component: 100  -  total flux cleaned = -0.000732943 Jy
! Component: 150  -  total flux cleaned = -0.000608198 Jy
! Component: 200  -  total flux cleaned = -0.000549618 Jy
! Total flux subtracted in 200 components = -0.000549618 Jy
! Clean residual min=-0.001522 max=0.001577 Jy/beam
! Clean residual mean=-0.000049 rms=0.000398 Jy/beam
! Combined flux in latest and established models = 0.595528 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 260 components and 0.595529 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231755Jy  sigma=0.001391
! Fit after  self-cal, rms=0.231738Jy  sigma=0.001391
wmodel J1740+5211_S_2001_04_09_pus_map.mod
! Writing 260 model components to file: J1740+5211_S_2001_04_09_pus_map.mod
wobs J1740+5211_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J1740+5211_S_2001_04_09_pus_uvs.fits
wwins J1740+5211_S_2001_04_09_pus_map.win
! wwins: Wrote 7 windows to J1740+5211_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.00039741 Jy
! Component: 100  -  total flux cleaned = -0.000743698 Jy
! Component: 150  -  total flux cleaned = -0.00110187 Jy
! Component: 200  -  total flux cleaned = -0.00142517 Jy
! Component: 250  -  total flux cleaned = -0.00178879 Jy
! Component: 300  -  total flux cleaned = -0.00207324 Jy
! Component: 350  -  total flux cleaned = -0.00237611 Jy
! Component: 400  -  total flux cleaned = -0.00260512 Jy
! Component: 450  -  total flux cleaned = -0.00285355 Jy
! Component: 500  -  total flux cleaned = -0.00298724 Jy
! Component: 550  -  total flux cleaned = -0.00318557 Jy
! Component: 600  -  total flux cleaned = -0.00331626 Jy
! Component: 650  -  total flux cleaned = -0.00346697 Jy
! Component: 700  -  total flux cleaned = -0.00363731 Jy
! Component: 750  -  total flux cleaned = -0.00374251 Jy
! Component: 800  -  total flux cleaned = -0.00386784 Jy
! Component: 850  -  total flux cleaned = -0.00401248 Jy
! Component: 900  -  total flux cleaned = -0.00405346 Jy
! Component: 950  -  total flux cleaned = -0.00419584 Jy
! Component: 1000  -  total flux cleaned = -0.0042563 Jy
! Component: 1050  -  total flux cleaned = -0.00433636 Jy
! Component: 1100  -  total flux cleaned = -0.00445511 Jy
! Component: 1150  -  total flux cleaned = -0.00449437 Jy
! Component: 1200  -  total flux cleaned = -0.00457235 Jy
! Component: 1250  -  total flux cleaned = -0.00464957 Jy
! Component: 1300  -  total flux cleaned = -0.00468788 Jy
! Component: 1350  -  total flux cleaned = -0.0047068 Jy
! Component: 1400  -  total flux cleaned = -0.00472571 Jy
! Component: 1450  -  total flux cleaned = -0.00472577 Jy
! Component: 1500  -  total flux cleaned = -0.0047445 Jy
! Component: 1550  -  total flux cleaned = -0.00478171 Jy
! Component: 1600  -  total flux cleaned = -0.00478167 Jy
! Component: 1650  -  total flux cleaned = -0.00478172 Jy
! Component: 1700  -  total flux cleaned = -0.00480002 Jy
! Component: 1750  -  total flux cleaned = -0.00480001 Jy
! Component: 1800  -  total flux cleaned = -0.00480002 Jy
! Component: 1850  -  total flux cleaned = -0.00483587 Jy
! Component: 1900  -  total flux cleaned = -0.00480007 Jy
! Component: 1950  -  total flux cleaned = -0.00479995 Jy
! Component: 2000  -  total flux cleaned = -0.00481758 Jy
! Total flux subtracted in 2048 components = -0.00481759 Jy
! Clean residual min=-0.001126 max=0.001040 Jy/beam
! Clean residual mean=-0.000012 rms=0.000334 Jy/beam
! Combined flux in latest and established models = 0.590711 Jy
keep
! Adding 154 model components to the UV plane model.
! The established model now contains 414 components and 0.590711 Jy
![Exited script file: muppet]
wmap "J1740+5211_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.714 x 3.819 at -1.994 degrees (North through East)
! Clean map  min=-0.0012839  max=0.45605 Jy/beam
! Writing clean map to FITS file: J1740+5211_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.456054 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000333797 
device "J1740+5211_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J1740+5211_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.219577 0.219577 0.439154 0.878307 1.75661 3.51323 7.02646 14.0529 28.1058 56.2117
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.456 
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.714 x 3.819 at -1.994 degrees (North through East)
! Clean map  min=-0.0012839  max=0.45605 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1740+5211_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J1740+5211_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1740+5211_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:13:23 2007