! Started logfile: J1745+1720_S_2001_07_05_pus_uvs.log on Fri Aug 10 02:19:00 2007
obs J1745+1720_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J1745+1720_S_2001_07_05_pus_uva.fits
! AN table 1: 80 integrations on 171 of 171 possible baselines.
! AN table 2: 85 integrations on 171 of 171 possible baselines.
! AN table 3: 140 integrations on 171 of 171 possible baselines.
! AN table 4: 133 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.176614 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1745+1720
! 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 52912 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 1520 telescope corrections were flagged in sub-array 1.
!  A total of 965 telescope corrections were flagged in sub-array 2.
!  A total of 2203 telescope corrections were flagged in sub-array 3.
!  A total of 1143 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1520 telescope corrections were flagged in sub-array 1.
!  A total of 964 telescope corrections were flagged in sub-array 2.
!  A total of 2203 telescope corrections were flagged in sub-array 3.
!  A total of 1143 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1520 telescope corrections were flagged in sub-array 1.
!  A total of 964 telescope corrections were flagged in sub-array 2.
!  A total of 2203 telescope corrections were flagged in sub-array 3.
!  A total of 1143 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1520 telescope corrections were flagged in sub-array 1.
!  A total of 963 telescope corrections were flagged in sub-array 2.
!  A total of 2203 telescope corrections were flagged in sub-array 3.
!  A total of 1143 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.739301Jy  sigma=0.005162
! Fit after  self-cal, rms=0.550124Jy  sigma=0.003790
! 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.987 mas, bmaj=3.584 mas, bpa=-5.701 degrees
! Estimated noise=790.19 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.421009 Jy
! Component: 100  -  total flux cleaned = 0.525414 Jy
! Total flux subtracted in 100 components = 0.525414 Jy
! Clean residual min=-0.016751 max=0.043146 Jy/beam
! Clean residual mean=0.000068 rms=0.004844 Jy/beam
! Combined flux in latest and established models = 0.525414 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.525414 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333268Jy  sigma=0.001922
! Fit after  self-cal, rms=0.333278Jy  sigma=0.001922
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0503829 Jy
! Component: 100  -  total flux cleaned = 0.0831441 Jy
! Total flux subtracted in 100 components = 0.0831441 Jy
! Clean residual min=-0.014014 max=0.029826 Jy/beam
! Clean residual mean=0.000044 rms=0.003782 Jy/beam
! Combined flux in latest and established models = 0.608559 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 28 components and 0.608559 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.323108Jy  sigma=0.001769
! Fit after  self-cal, rms=0.323063Jy  sigma=0.001769
! Inverting map 
! Added new window around map position (3, -3.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.032739 Jy
! Component: 100  -  total flux cleaned = 0.0556637 Jy
! Total flux subtracted in 100 components = 0.0556637 Jy
! Clean residual min=-0.012147 max=0.021537 Jy/beam
! Clean residual mean=0.000024 rms=0.003168 Jy/beam
! Combined flux in latest and established models = 0.664222 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 35 components and 0.664222 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.318435Jy  sigma=0.001697
! Fit after  self-cal, rms=0.318125Jy  sigma=0.001695
! Inverting map 
! Added new window around map position (0.5, -5.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0224428 Jy
! Component: 100  -  total flux cleaned = 0.0381161 Jy
! Total flux subtracted in 100 components = 0.0381161 Jy
! Clean residual min=-0.010639 max=0.017302 Jy/beam
! Clean residual mean=0.000014 rms=0.002787 Jy/beam
! Combined flux in latest and established models = 0.702338 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 48 components and 0.702338 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.316015Jy  sigma=0.001662
! Fit after  self-cal, rms=0.315891Jy  sigma=0.001661
! Inverting map 
! Added new window around map position (6.5, -9.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0170485 Jy
! Component: 100  -  total flux cleaned = 0.029406 Jy
! Total flux subtracted in 100 components = 0.029406 Jy
! Clean residual min=-0.010800 max=0.011551 Jy/beam
! Clean residual mean=0.000002 rms=0.002557 Jy/beam
! Combined flux in latest and established models = 0.731744 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 60 components and 0.731744 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.314622Jy  sigma=0.001642
! Fit after  self-cal, rms=0.314563Jy  sigma=0.001641
! 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.306 mas, bmaj=4.221 mas, bpa=-11.57 degrees
! Estimated noise=412.007 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (4, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0171737 Jy
! Component: 100  -  total flux cleaned = 0.0292077 Jy
! Component: 150  -  total flux cleaned = 0.0384721 Jy
! Component: 200  -  total flux cleaned = 0.045734 Jy
! Total flux subtracted in 200 components = 0.045734 Jy
! Clean residual min=-0.006864 max=0.010316 Jy/beam
! Clean residual mean=0.000139 rms=0.001972 Jy/beam
! Combined flux in latest and established models = 0.777478 Jy
! Performing phase self-cal
! Adding 41 model components to the UV plane model.
! The established model now contains 89 components and 0.777478 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.313548Jy  sigma=0.001624
! Fit after  self-cal, rms=0.313464Jy  sigma=0.001623
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   NY        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.05     FD        0.98     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.99     KP        0.64     
!   LA        1.02     MC        1.00*    MK        0.96     NL        0.99     
!   NY        1.05     OV        0.99     PT        0.95     SC        0.94     
!   TS        1.11     WF        0.98     WZ        1.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.07     HN        1.12     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.98     MK        1.00*    NL        1.00*    
!   NY        1.01     OV        1.00*    PT        1.00*    SC        1.08     
!   TS        1.00*    WF        1.15     WZ        0.99     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        0.97     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.89     KK        1.03     KP        0.99     
!   LA        0.98     MC        1.07     MK        1.00     NL        0.97     
!   NY        0.99     OV        1.00     PT        0.94     SC        0.97     
!   TS        1.00*    WF        0.99     WZ        1.03     
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   NY        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        1.00     GC        1.30     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.03     KP        0.95     
!   LA        0.98     MC        1.00*    MK        0.94     NL        0.97     
!   NY        1.04     OV        1.00     PT        0.99     SC        0.98     
!   TS        1.09     WF        1.02     WZ        1.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.08     HN        1.14     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        1.10     MK        1.00*    NL        1.00*    
!   NY        0.99     OV        1.00*    PT        1.00*    SC        1.00     
!   TS        1.00*    WF        1.17     WZ        0.99     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        0.99     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        0.89     KK        1.00     KP        1.07     
!   LA        0.95     MC        1.02     MK        0.99     NL        0.93     
!   NY        1.02     OV        1.03     PT        0.97     SC        0.99     
!   TS        1.00*    WF        0.99     WZ        1.03     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   NY        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.13     FD        1.00     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.07     KP        0.96     
!   LA        1.04     MC        1.00*    MK        0.97     NL        1.05     
!   NY        1.06     OV        0.99     PT        1.07     SC        0.96     
!   TS        1.13     WF        0.96     WZ        1.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.31     HN        1.27     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.88     MK        1.00*    NL        1.00*    
!   NY        1.02     OV        1.00*    PT        1.00*    SC        1.04     
!   TS        1.00*    WF        1.02     WZ        1.02     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        0.95     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.07     KP        1.01     
!   LA        1.01     MC        1.28     MK        1.04     NL        0.99     
!   NY        1.02     OV        1.02     PT        0.99     SC        0.98     
!   TS        1.00*    WF        0.99     WZ        1.07     
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   NY        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.05     FD        0.98     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.03     KP        0.89     
!   LA        1.00     MC        1.00*    MK        0.96     NL        1.00     
!   NY        1.07     OV        1.01     PT        1.08     SC        1.02     
!   TS        1.12     WF        1.01     WZ        1.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.02     HN        1.13     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.73     MK        1.00*    NL        1.00*    
!   NY        1.03     OV        1.00*    PT        1.00*    SC        1.14     
!   TS        1.00*    WF        0.99     WZ        1.28     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        0.98     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        0.87     KK        1.07     KP        1.02     
!   LA        0.98     MC        1.10     MK        1.01     NL        0.98     
!   NY        1.04     OV        1.03     PT        1.02     SC        1.00     
!   TS        1.00*    WF        1.00     WZ        1.04     
! 
! 
! Fit before self-cal, rms=0.313464Jy  sigma=0.001623
! Fit after  self-cal, rms=0.329263Jy  sigma=0.001578
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.341 mas, bmaj=4.356 mas, bpa=-11.58 degrees
! Estimated noise=412.308 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.0023 Jy
! Component: 100  -  total flux cleaned = 0.00356798 Jy
! Component: 150  -  total flux cleaned = 0.00474161 Jy
! Component: 200  -  total flux cleaned = 0.00560461 Jy
! Total flux subtracted in 200 components = 0.00560461 Jy
! Clean residual min=-0.004032 max=0.003791 Jy/beam
! Clean residual mean=0.000066 rms=0.000912 Jy/beam
! Combined flux in latest and established models = 0.783083 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 110 components and 0.783083 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.329093Jy  sigma=0.001576
! Fit after  self-cal, rms=0.329920Jy  sigma=0.001575
! 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.329920Jy  sigma=0.001575
! Fit after  self-cal, rms=0.330927Jy  sigma=0.001575
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.345 mas, bmaj=4.354 mas, bpa=-11.5 degrees
! Estimated noise=411.902 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000321627 Jy
! Component: 100  -  total flux cleaned = 0.000284242 Jy
! Component: 150  -  total flux cleaned = 0.00091752 Jy
! Component: 200  -  total flux cleaned = 0.00138871 Jy
! Total flux subtracted in 200 components = 0.00138871 Jy
! Clean residual min=-0.003595 max=0.003532 Jy/beam
! Clean residual mean=0.000034 rms=0.000850 Jy/beam
! Combined flux in latest and established models = 0.784472 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 118 components and 0.784472 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330839Jy  sigma=0.001574
! Fit after  self-cal, rms=0.331234Jy  sigma=0.001574
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.000983255 Jy
! Component: 100  -  total flux cleaned = 0.00131593 Jy
! Component: 150  -  total flux cleaned = 0.00154484 Jy
! Component: 200  -  total flux cleaned = 0.00169229 Jy
! Total flux subtracted in 200 components = 0.00169229 Jy
! Clean residual min=-0.003452 max=0.003312 Jy/beam
! Clean residual mean=0.000008 rms=0.000828 Jy/beam
! Combined flux in latest and established models = 0.786164 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 124 components and 0.786164 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.331189Jy  sigma=0.001573
! Fit after  self-cal, rms=0.331194Jy  sigma=0.001573
! 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.331194Jy  sigma=0.001573
! Fit after  self-cal, rms=0.332599Jy  sigma=0.001573
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.35 mas, bmaj=4.354 mas, bpa=-11.43 degrees
! Estimated noise=412.151 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000904618 Jy
! Component: 100  -  total flux cleaned = -0.000655765 Jy
! Component: 150  -  total flux cleaned = -0.000435453 Jy
! Component: 200  -  total flux cleaned = -0.000235435 Jy
! Total flux subtracted in 200 components = -0.000235435 Jy
! Clean residual min=-0.003161 max=0.003433 Jy/beam
! Clean residual mean=0.000014 rms=0.000791 Jy/beam
! Combined flux in latest and established models = 0.785929 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 128 components and 0.785929 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332550Jy  sigma=0.001573
! Fit after  self-cal, rms=0.332729Jy  sigma=0.001573
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 (33.5, -51).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00123924 Jy
! Component: 100  -  total flux cleaned = 0.00183977 Jy
! Component: 150  -  total flux cleaned = 0.00236207 Jy
! Component: 200  -  total flux cleaned = 0.00283959 Jy
! Total flux subtracted in 200 components = 0.00283959 Jy
! Clean residual min=-0.003182 max=0.002919 Jy/beam
! Clean residual mean=-0.000009 rms=0.000765 Jy/beam
! Combined flux in latest and established models = 0.788768 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 141 components and 0.788768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332676Jy  sigma=0.001572
! Fit after  self-cal, rms=0.332675Jy  sigma=0.001572
! 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.332675Jy  sigma=0.001572
! Fit after  self-cal, rms=0.333543Jy  sigma=0.001572
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.663 mas, bmaj=8.269 mas, bpa=-7.408 degrees
! Estimated noise=600.77 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00159167 Jy
! Component: 100  -  total flux cleaned = 0.00229972 Jy
! Component: 150  -  total flux cleaned = 0.00275822 Jy
! Component: 200  -  total flux cleaned = 0.00312561 Jy
! Total flux subtracted in 200 components = 0.00312561 Jy
! Clean residual min=-0.004281 max=0.003775 Jy/beam
! Clean residual mean=-0.000064 rms=0.001145 Jy/beam
! Combined flux in latest and established models = 0.791894 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 157 components and 0.791894 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333551Jy  sigma=0.001572
! Fit after  self-cal, rms=0.333624Jy  sigma=0.001572
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.000217591 Jy
! Component: 100  -  total flux cleaned = 0.000471516 Jy
! Component: 150  -  total flux cleaned = 0.000684986 Jy
! Component: 200  -  total flux cleaned = 0.000787649 Jy
! Total flux subtracted in 200 components = 0.000787649 Jy
! Clean residual min=-0.004279 max=0.003566 Jy/beam
! Clean residual mean=-0.000086 rms=0.001133 Jy/beam
! Combined flux in latest and established models = 0.792682 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 167 components and 0.792682 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333623Jy  sigma=0.001572
! Fit after  self-cal, rms=0.333622Jy  sigma=0.001572
! 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.352 mas, bmaj=4.354 mas, bpa=-11.38 degrees
! Estimated noise=412.494 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.352 x 4.354 at -11.38 degrees (North through East)
! Clean map  min=-0.0027915  max=0.55835 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.333622Jy  sigma=0.001572
! Fit after  self-cal, rms=0.952857Jy  sigma=0.001473
! Inverting map and beam 
! Estimated beam: bmin=2.351 mas, bmaj=4.368 mas, bpa=-11.42 degrees
! Estimated noise=411.689 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000772794 Jy
! Component: 100  -  total flux cleaned = -0.000572933 Jy
! Component: 150  -  total flux cleaned = -0.000575381 Jy
! Component: 200  -  total flux cleaned = -0.000576691 Jy
! Total flux subtracted in 200 components = -0.000576691 Jy
! Clean residual min=-0.002858 max=0.002593 Jy/beam
! Clean residual mean=0.000001 rms=0.000688 Jy/beam
! Combined flux in latest and established models = 0.792105 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 178 components and 0.792105 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.952834Jy  sigma=0.001473
! Fit after  self-cal, rms=0.952849Jy  sigma=0.001473
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 5.9941e-05 Jy
! Component: 100  -  total flux cleaned = 1.34093e-05 Jy
! Component: 150  -  total flux cleaned = 5.93749e-05 Jy
! Component: 200  -  total flux cleaned = 0.000100682 Jy
! Total flux subtracted in 200 components = 0.000100682 Jy
! Clean residual min=-0.002837 max=0.002609 Jy/beam
! Clean residual mean=0.000000 rms=0.000684 Jy/beam
! Combined flux in latest and established models = 0.792206 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 188 components and 0.792206 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.952834Jy  sigma=0.001473
! Fit after  self-cal, rms=0.952832Jy  sigma=0.001473
! 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.952832Jy  sigma=0.001473
! Fit after  self-cal, rms=1.451032Jy  sigma=0.001473
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=2.022 mas, bmaj=3.648 mas, bpa=-5.71 degrees
! Estimated noise=803.523 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.424279 Jy
! Component: 100  -  total flux cleaned = 0.526634 Jy
! Component: 150  -  total flux cleaned = 0.576201 Jy
! Component: 200  -  total flux cleaned = 0.612021 Jy
! Total flux subtracted in 200 components = 0.612021 Jy
! Clean residual min=-0.008793 max=0.020680 Jy/beam
! Clean residual mean=0.000049 rms=0.002779 Jy/beam
! Combined flux in latest and established models = 0.612021 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 25 model components to the UV plane model.
! The established model now contains 25 components and 0.612021 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.352 mas, bmaj=4.367 mas, bpa=-11.38 degrees
! Estimated noise=411.431 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.042738 Jy
! Component: 100  -  total flux cleaned = 0.0720609 Jy
! Component: 150  -  total flux cleaned = 0.0933744 Jy
! Component: 200  -  total flux cleaned = 0.109595 Jy
! Total flux subtracted in 200 components = 0.109595 Jy
! Clean residual min=-0.004134 max=0.009470 Jy/beam
! Clean residual mean=0.000474 rms=0.001705 Jy/beam
! Combined flux in latest and established models = 0.721616 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 56 components and 0.721616 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0125921 Jy
! Component: 100  -  total flux cleaned = 0.0225183 Jy
! Component: 150  -  total flux cleaned = 0.0304795 Jy
! Component: 200  -  total flux cleaned = 0.0369422 Jy
! Total flux subtracted in 200 components = 0.0369422 Jy
! Clean residual min=-0.003355 max=0.004043 Jy/beam
! Clean residual mean=0.000217 rms=0.000979 Jy/beam
! Combined flux in latest and established models = 0.758558 Jy
! Adding 44 model components to the UV plane model.
! The established model now contains 86 components and 0.758558 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=6.661 mas, bmaj=8.265 mas, bpa=-7.176 degrees
! Estimated noise=599.373 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0132441 Jy
! Component: 100  -  total flux cleaned = 0.0203733 Jy
! Component: 150  -  total flux cleaned = 0.0249218 Jy
! Component: 200  -  total flux cleaned = 0.0279431 Jy
! Total flux subtracted in 200 components = 0.0279431 Jy
! Clean residual min=-0.003458 max=0.003763 Jy/beam
! Clean residual mean=0.000100 rms=0.001059 Jy/beam
! Combined flux in latest and established models = 0.786502 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.00203368 Jy
! Component: 100  -  total flux cleaned = 0.00341477 Jy
! Component: 150  -  total flux cleaned = 0.00426074 Jy
! Component: 200  -  total flux cleaned = 0.00452908 Jy
! Total flux subtracted in 200 components = 0.00452908 Jy
! Clean residual min=-0.003393 max=0.003147 Jy/beam
! Clean residual mean=-0.000021 rms=0.000994 Jy/beam
! Combined flux in latest and established models = 0.791031 Jy
! Adding 82 model components to the UV plane model.
! The established model now contains 157 components and 0.791031 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.352 mas, bmaj=4.367 mas, bpa=-11.38 degrees
! Estimated noise=411.431 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000289693 Jy
! Component: 100  -  total flux cleaned = -2.21352e-05 Jy
! Component: 150  -  total flux cleaned = 0.00021101 Jy
! Component: 200  -  total flux cleaned = 0.000284462 Jy
! Total flux subtracted in 200 components = 0.000284462 Jy
! Clean residual min=-0.002714 max=0.002714 Jy/beam
! Clean residual mean=-0.000006 rms=0.000693 Jy/beam
! Combined flux in latest and established models = 0.791316 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 173 components and 0.791315 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.451075Jy  sigma=0.001473
! Fit after  self-cal, rms=1.451051Jy  sigma=0.001473
wmodel J1745+1720_S_2001_07_05_pus_map.mod
! Writing 173 model components to file: J1745+1720_S_2001_07_05_pus_map.mod
wobs J1745+1720_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J1745+1720_S_2001_07_05_pus_uvs.fits
wwins J1745+1720_S_2001_07_05_pus_map.win
! wwins: Wrote 6 windows to J1745+1720_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.000246824 Jy
! Component: 100  -  total flux cleaned = -0.000199604 Jy
! Component: 150  -  total flux cleaned = -6.76182e-05 Jy
! Component: 200  -  total flux cleaned = -2.56277e-05 Jy
! Component: 250  -  total flux cleaned = 5.64667e-05 Jy
! Component: 300  -  total flux cleaned = 0.000137134 Jy
! Component: 350  -  total flux cleaned = 0.000177015 Jy
! Component: 400  -  total flux cleaned = 0.000255403 Jy
! Component: 450  -  total flux cleaned = 0.000332374 Jy
! Component: 500  -  total flux cleaned = 0.000370745 Jy
! Component: 550  -  total flux cleaned = 0.00048301 Jy
! Component: 600  -  total flux cleaned = 0.000556946 Jy
! Component: 650  -  total flux cleaned = 0.000630002 Jy
! Component: 700  -  total flux cleaned = 0.000810063 Jy
! Component: 750  -  total flux cleaned = 0.000952341 Jy
! Component: 800  -  total flux cleaned = 0.00112839 Jy
! Component: 850  -  total flux cleaned = 0.00123288 Jy
! Component: 900  -  total flux cleaned = 0.00126767 Jy
! Component: 950  -  total flux cleaned = 0.00143813 Jy
! Component: 1000  -  total flux cleaned = 0.00147182 Jy
! Component: 1050  -  total flux cleaned = 0.00157202 Jy
! Component: 1100  -  total flux cleaned = 0.00150556 Jy
! Component: 1150  -  total flux cleaned = 0.00153881 Jy
! Component: 1200  -  total flux cleaned = 0.00160417 Jy
! Component: 1250  -  total flux cleaned = 0.00163645 Jy
! Component: 1300  -  total flux cleaned = 0.00173279 Jy
! Component: 1350  -  total flux cleaned = 0.00170082 Jy
! Component: 1400  -  total flux cleaned = 0.00166966 Jy
! Component: 1450  -  total flux cleaned = 0.00166981 Jy
! Component: 1500  -  total flux cleaned = 0.0017319 Jy
! Component: 1550  -  total flux cleaned = 0.00163939 Jy
! Component: 1600  -  total flux cleaned = 0.00163934 Jy
! Component: 1650  -  total flux cleaned = 0.00163941 Jy
! Component: 1700  -  total flux cleaned = 0.00163923 Jy
! Component: 1750  -  total flux cleaned = 0.00160927 Jy
! Component: 1800  -  total flux cleaned = 0.0016391 Jy
! Component: 1850  -  total flux cleaned = 0.00157984 Jy
! Component: 1900  -  total flux cleaned = 0.00160938 Jy
! Component: 1950  -  total flux cleaned = 0.00166754 Jy
! Component: 2000  -  total flux cleaned = 0.00158044 Jy
! Total flux subtracted in 2048 components = 0.00152289 Jy
! Clean residual min=-0.001440 max=0.001475 Jy/beam
! Clean residual mean=-0.000018 rms=0.000551 Jy/beam
! Combined flux in latest and established models = 0.792838 Jy
keep
! Adding 150 model components to the UV plane model.
! The established model now contains 323 components and 0.792838 Jy
wmap "J1745+1720_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.352 x 4.367 at -11.38 degrees (North through East)
! Clean map  min=-0.0024611  max=0.55849 Jy/beam
! Writing clean map to FITS file: J1745+1720_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.55849 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00055111 
device "J1745+1720_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J1745+1720_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.296035 0.296035 0.592071 1.18414 2.36828 4.73657 9.47314 18.9463 37.8925 75.7851
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0016 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.558 
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.352 x 4.367 at -11.38 degrees (North through East)
! Clean map  min=-0.0024611  max=0.55849 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1745+1720_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J1745+1720_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1745+1720_S_2001_07_05_pus_uvs.log closed on Fri Aug 10 02:21:41 2007