! Started logfile: J0017+8135_X_2003_06_18_pus_uvs.log on Wed Jan 17 16:03:13 2007
obs J0017+8135_X_2003_06_18_pus_uva.fits
! Reading UV FITS file: J0017+8135_X_2003_06_18_pus_uva.fits
! AN table 1: 94 integrations on 153 of 153 possible baselines.
! AN table 2: 17 integrations on 153 of 153 possible baselines.
! AN table 3: 132 integrations on 153 of 153 possible baselines.
! AN table 4: 81 integrations on 153 of 153 possible baselines.
! AN table 5: 275 integrations on 153 of 153 possible baselines.
! AN table 6: 159 integrations on 153 of 153 possible baselines.
! AN table 7: 369 integrations on 153 of 153 possible baselines.
! AN table 8: Unused.
! AN table 9: Unused.
! Apparent sampling: 0.0770047 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0017+8135
! 
! 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  8.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2231 lines of history.
! 
! Reading 53112 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
float field_size
field_size = 256
float field_cell
field_cell = 0.2
float taper_size
taper_size = 70.
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 = 256x256 pixels with 0.200x0.200 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 1608 telescope corrections were flagged in sub-array 1.
!  A total of 252 telescope corrections were flagged in sub-array 2.
!  A total of 2274 telescope corrections were flagged in sub-array 3.
!  A total of 1114 telescope corrections were flagged in sub-array 4.
!  A total of 4332 telescope corrections were flagged in sub-array 5.
!  A total of 2542 telescope corrections were flagged in sub-array 6.
!  A total of 5374 telescope corrections were flagged in sub-array 7.
! 
! Correcting IF 2.
!  A total of 1608 telescope corrections were flagged in sub-array 1.
!  A total of 252 telescope corrections were flagged in sub-array 2.
!  A total of 2274 telescope corrections were flagged in sub-array 3.
!  A total of 1114 telescope corrections were flagged in sub-array 4.
!  A total of 4332 telescope corrections were flagged in sub-array 5.
!  A total of 2542 telescope corrections were flagged in sub-array 6.
!  A total of 5374 telescope corrections were flagged in sub-array 7.
! 
! Correcting IF 3.
!  A total of 1608 telescope corrections were flagged in sub-array 1.
!  A total of 252 telescope corrections were flagged in sub-array 2.
!  A total of 2274 telescope corrections were flagged in sub-array 3.
!  A total of 1114 telescope corrections were flagged in sub-array 4.
!  A total of 4332 telescope corrections were flagged in sub-array 5.
!  A total of 2542 telescope corrections were flagged in sub-array 6.
!  A total of 5374 telescope corrections were flagged in sub-array 7.
! 
! Correcting IF 4.
!  A total of 1608 telescope corrections were flagged in sub-array 1.
!  A total of 252 telescope corrections were flagged in sub-array 2.
!  A total of 2274 telescope corrections were flagged in sub-array 3.
!  A total of 1114 telescope corrections were flagged in sub-array 4.
!  A total of 4332 telescope corrections were flagged in sub-array 5.
!  A total of 2542 telescope corrections were flagged in sub-array 6.
!  A total of 5374 telescope corrections were flagged in sub-array 7.
! 
! Fit before self-cal, rms=0.741378Jy  sigma=0.010067
! Fit after  self-cal, rms=0.370817Jy  sigma=0.004702
! 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=0.7584 mas, bmaj=1.003 mas, bpa=19.61 degrees
! Estimated noise=682.39 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.499061 Jy
! Component: 100  -  total flux cleaned = 0.639953 Jy
! Total flux subtracted in 100 components = 0.639953 Jy
! Clean residual min=-0.015264 max=0.062164 Jy/beam
! Clean residual mean=0.000273 rms=0.005346 Jy/beam
! Combined flux in latest and established models = 0.639953 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 0.639953 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187478Jy  sigma=0.002428
! Fit after  self-cal, rms=0.187372Jy  sigma=0.002427
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0676216 Jy
! Component: 100  -  total flux cleaned = 0.102244 Jy
! Total flux subtracted in 100 components = 0.102244 Jy
! Clean residual min=-0.008241 max=0.017339 Jy/beam
! Clean residual mean=0.000163 rms=0.002690 Jy/beam
! Combined flux in latest and established models = 0.742197 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 15 components and 0.742197 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.151594Jy  sigma=0.001861
! Fit after  self-cal, rms=0.151444Jy  sigma=0.001859
! Inverting map 
! Added new window around map position (0, -1).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0216411 Jy
! Component: 100  -  total flux cleaned = 0.0351049 Jy
! Total flux subtracted in 100 components = 0.0351049 Jy
! Clean residual min=-0.007703 max=0.008026 Jy/beam
! Clean residual mean=0.000126 rms=0.002217 Jy/beam
! Combined flux in latest and established models = 0.777302 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 21 components and 0.777302 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.146850Jy  sigma=0.001782
! Fit after  self-cal, rms=0.146713Jy  sigma=0.001781
! 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=0.9685 mas, bmaj=1.421 mas, bpa=31.23 degrees
! Estimated noise=344.091 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.0134812 Jy
! Component: 100  -  total flux cleaned = 0.0194496 Jy
! Component: 150  -  total flux cleaned = 0.0204254 Jy
! Component: 200  -  total flux cleaned = 0.0208353 Jy
! Total flux subtracted in 200 components = 0.0208353 Jy
! Clean residual min=-0.003632 max=0.006295 Jy/beam
! Clean residual mean=0.000450 rms=0.001448 Jy/beam
! Combined flux in latest and established models = 0.798137 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 30 components and 0.798137 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.145648Jy  sigma=0.001764
! Fit after  self-cal, rms=0.145569Jy  sigma=0.001763
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 72 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.03     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.96     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.00     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.91     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        0.98     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.01     NL        1.00*    ON        1.00*    OV        1.00     
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.00     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.92     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.02     GG        1.00*    HN        0.97     
!   KK        1.00*    KP        1.02     LA        0.98     MA        1.00*    
!   MK        1.00*    NL        1.03     ON        1.00*    OV        0.99     
!   PT        0.98     SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.04     WZ        1.00*    
! 
!  A total of 219 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.92     FD        0.99     GG        1.00*    HN        0.97     
!   KK        1.18     KP        1.04     LA        0.98     MA        1.00*    
!   MK        1.03     NL        1.03     ON        1.00*    OV        0.99     
!   PT        0.95     SC        1.09     TC        1.00*    TS        0.91     
!   WF        0.96     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.96     FD        0.95     GG        1.00*    HN        0.90     
!   KK        0.97     KP        0.98     LA        1.00*    MA        1.00*    
!   MK        1.04     NL        1.00*    ON        1.00*    OV        0.97     
!   PT        0.94     SC        1.00*    TC        1.00*    TS        1.03     
!   WF        1.02     WZ        1.00*    
! 
!  A total of 216 telescope corrections were flagged in sub-array 7.
!  Telescope amplitude corrections in sub-array 7:
!   BR        0.97     FD        1.01     GG        1.00*    HN        1.00     
!   KK        1.05     KP        1.03     LA        0.99     MA        1.00*    
!   MK        1.00     NL        1.07     ON        1.00*    OV        1.00     
!   PT        0.94     SC        0.96     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 72 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.87     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        0.88     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.08     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.21     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.09     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.95     NL        1.00*    ON        1.00*    OV        1.06     
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        0.99     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.97     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.97     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        1.00     GG        1.00*    HN        0.97     
!   KK        1.00*    KP        0.96     LA        0.99     MA        1.00*    
!   MK        1.00*    NL        1.00     ON        1.00*    OV        0.97     
!   PT        1.02     SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.08     WZ        1.00*    
! 
!  A total of 219 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.92     FD        0.99     GG        1.00*    HN        0.97     
!   KK        1.05     KP        1.00     LA        0.98     MA        1.00*    
!   MK        1.09     NL        1.00     ON        1.00*    OV        1.00     
!   PT        1.00     SC        1.01     TC        1.00*    TS        0.86     
!   WF        0.99     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.98     FD        0.95     GG        1.00*    HN        0.91     
!   KK        1.01     KP        0.93     LA        1.00*    MA        1.00*    
!   MK        1.06     NL        1.00*    ON        1.00*    OV        0.98     
!   PT        0.98     SC        1.00*    TC        1.00*    TS        0.96     
!   WF        1.06     WZ        1.00*    
! 
!  A total of 216 telescope corrections were flagged in sub-array 7.
!  Telescope amplitude corrections in sub-array 7:
!   BR        0.99     FD        1.00     GG        1.00*    HN        1.00     
!   KK        1.04     KP        0.98     LA        1.00     MA        1.00*    
!   MK        1.00     NL        1.01     ON        1.00*    OV        0.99     
!   PT        0.95     SC        0.92     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 72 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.10     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.20     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.02     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.98     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.10     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.98     NL        1.00*    ON        1.00*    OV        1.00     
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.06     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.92     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        1.00     GG        1.00*    HN        0.97     
!   KK        1.00*    KP        1.01     LA        1.00     MA        1.00*    
!   MK        1.00*    NL        0.97     ON        1.00*    OV        1.03     
!   PT        1.05     SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        0.96     WZ        1.00*    
! 
!  A total of 219 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.98     FD        0.97     GG        1.00*    HN        0.96     
!   KK        1.17     KP        1.04     LA        0.99     MA        1.00*    
!   MK        1.09     NL        1.00     ON        1.00*    OV        1.05     
!   PT        1.03     SC        1.04     TC        1.00*    TS        0.90     
!   WF        0.94     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        1.01     FD        0.94     GG        1.00*    HN        0.91     
!   KK        1.01     KP        0.96     LA        1.00*    MA        1.00*    
!   MK        1.02     NL        1.00*    ON        1.00*    OV        1.00     
!   PT        0.99     SC        1.00*    TC        1.00*    TS        1.02     
!   WF        0.99     WZ        1.00*    
! 
!  A total of 216 telescope corrections were flagged in sub-array 7.
!  Telescope amplitude corrections in sub-array 7:
!   BR        1.01     FD        0.99     GG        1.00*    HN        1.00     
!   KK        1.10     KP        1.02     LA        1.01     MA        1.00*    
!   MK        1.03     NL        1.00     ON        1.00*    OV        1.02     
!   PT        1.01     SC        0.97     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 72 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.07     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.08     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.95     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.14     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        0.97     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        1.01     
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.03     KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.04     NL        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.91     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        0.98     GG        1.00*    HN        1.01     
!   KK        1.00*    KP        0.98     LA        0.97     MA        1.00*    
!   MK        1.00*    NL        0.99     ON        1.00*    OV        1.01     
!   PT        1.06     SC        1.00*    TC        1.00*    TS        1.00*    
!   WF        0.98     WZ        1.00*    
! 
!  A total of 219 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.97     FD        0.98     GG        1.00*    HN        0.99     
!   KK        1.13     KP        1.00     LA        0.96     MA        1.00*    
!   MK        1.07     NL        1.00     ON        1.00*    OV        1.02     
!   PT        1.03     SC        1.15     TC        1.00*    TS        0.88     
!   WF        0.95     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        1.03     FD        0.92     GG        1.00*    HN        0.95     
!   KK        1.02     KP        0.93     LA        1.00*    MA        1.00*    
!   MK        1.04     NL        1.00*    ON        1.00*    OV        0.99     
!   PT        1.01     SC        1.00*    TC        1.00*    TS        0.96     
!   WF        0.96     WZ        1.00*    
! 
!  A total of 216 telescope corrections were flagged in sub-array 7.
!  Telescope amplitude corrections in sub-array 7:
!   BR        1.01     FD        0.98     GG        1.00*    HN        1.03     
!   KK        1.04     KP        0.98     LA        0.99     MA        1.00*    
!   MK        1.05     NL        1.01     ON        1.00*    OV        1.02     
!   PT        0.98     SC        1.03     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.145569Jy  sigma=0.001763
! Fit after  self-cal, rms=0.142500Jy  sigma=0.001724
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9932 mas, bmaj=1.558 mas, bpa=35.68 degrees
! Estimated noise=363.265 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.000379253 Jy
! Component: 100  -  total flux cleaned = -0.000128514 Jy
! Component: 150  -  total flux cleaned = -1.22327e-06 Jy
! Component: 200  -  total flux cleaned = 3.29645e-05 Jy
! Total flux subtracted in 200 components = 3.29645e-05 Jy
! Clean residual min=-0.002889 max=0.005046 Jy/beam
! Clean residual mean=0.000265 rms=0.001121 Jy/beam
! Combined flux in latest and established models = 0.79817 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 36 components and 0.79817 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.142433Jy  sigma=0.001723
! Fit after  self-cal, rms=0.142492Jy  sigma=0.001723
! 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.142492Jy  sigma=0.001723
! Fit after  self-cal, rms=0.141479Jy  sigma=0.001706
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9957 mas, bmaj=1.557 mas, bpa=35.52 degrees
! Estimated noise=362.988 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00150861 Jy
! Component: 100  -  total flux cleaned = -0.00151041 Jy
! Component: 150  -  total flux cleaned = -0.00150741 Jy
! Component: 200  -  total flux cleaned = -0.00142547 Jy
! Total flux subtracted in 200 components = -0.00142547 Jy
! Clean residual min=-0.002857 max=0.004039 Jy/beam
! Clean residual mean=0.000214 rms=0.000859 Jy/beam
! Combined flux in latest and established models = 0.796745 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 43 components and 0.796745 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141392Jy  sigma=0.001705
! Fit after  self-cal, rms=0.141381Jy  sigma=0.001705
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-2, -5.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00414303 Jy
! Component: 100  -  total flux cleaned = 0.00539402 Jy
! Component: 150  -  total flux cleaned = 0.00580245 Jy
! Component: 200  -  total flux cleaned = 0.00608078 Jy
! Total flux subtracted in 200 components = 0.00608078 Jy
! Clean residual min=-0.002441 max=0.002779 Jy/beam
! Clean residual mean=0.000161 rms=0.000731 Jy/beam
! Combined flux in latest and established models = 0.802826 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 58 components and 0.802826 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141230Jy  sigma=0.001703
! Fit after  self-cal, rms=0.141214Jy  sigma=0.001703
! 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.141214Jy  sigma=0.001703
! Fit after  self-cal, rms=0.141244Jy  sigma=0.001699
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9972 mas, bmaj=1.557 mas, bpa=35.45 degrees
! Estimated noise=363.196 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00191549 Jy
! Component: 100  -  total flux cleaned = 0.00277883 Jy
! Component: 150  -  total flux cleaned = 0.00324093 Jy
! Component: 200  -  total flux cleaned = 0.00353732 Jy
! Total flux subtracted in 200 components = 0.00353732 Jy
! Clean residual min=-0.001953 max=0.002616 Jy/beam
! Clean residual mean=0.000173 rms=0.000636 Jy/beam
! Combined flux in latest and established models = 0.806363 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 68 components and 0.806363 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141180Jy  sigma=0.001698
! Fit after  self-cal, rms=0.141171Jy  sigma=0.001698
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.000388987 Jy
! Component: 100  -  total flux cleaned = 0.000949964 Jy
! Component: 150  -  total flux cleaned = 0.00116514 Jy
! Component: 200  -  total flux cleaned = 0.00129077 Jy
! Total flux subtracted in 200 components = 0.00129077 Jy
! Clean residual min=-0.001863 max=0.002564 Jy/beam
! Clean residual mean=0.000163 rms=0.000621 Jy/beam
! Combined flux in latest and established models = 0.807654 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 77 components and 0.807654 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141143Jy  sigma=0.001698
! Fit after  self-cal, rms=0.141138Jy  sigma=0.001698
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 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.141138Jy  sigma=0.001698
! Fit after  self-cal, rms=0.141206Jy  sigma=0.001697
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.586 mas, bmaj=3.051 mas, bpa=12.82 degrees
! Estimated noise=442.614 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00179578 Jy
! Component: 100  -  total flux cleaned = 0.00280278 Jy
! Component: 150  -  total flux cleaned = 0.00329401 Jy
! Component: 200  -  total flux cleaned = 0.00335179 Jy
! Total flux subtracted in 200 components = 0.00335179 Jy
! Clean residual min=-0.001964 max=0.002628 Jy/beam
! Clean residual mean=0.000298 rms=0.000753 Jy/beam
! Combined flux in latest and established models = 0.811005 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 89 components and 0.811005 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141195Jy  sigma=0.001697
! Fit after  self-cal, rms=0.141193Jy  sigma=0.001697
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.000311074 Jy
! Component: 100  -  total flux cleaned = 0.00052381 Jy
! Component: 150  -  total flux cleaned = 0.000701995 Jy
! Component: 200  -  total flux cleaned = 0.000757647 Jy
! Total flux subtracted in 200 components = 0.000757647 Jy
! Clean residual min=-0.001952 max=0.002607 Jy/beam
! Clean residual mean=0.000286 rms=0.000750 Jy/beam
! Combined flux in latest and established models = 0.811763 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 94 components and 0.811763 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.141192Jy  sigma=0.001697
! Fit after  self-cal, rms=0.141189Jy  sigma=0.001697
! 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=0.998 mas, bmaj=1.556 mas, bpa=35.37 degrees
! Estimated noise=363.395 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.998 x 1.556 at 35.37 degrees (North through East)
! Clean map  min=-0.0022274  max=0.68041 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.141189Jy  sigma=0.001697
! Fit after  self-cal, rms=0.129098Jy  sigma=0.001477
! Inverting map and beam 
! Estimated beam: bmin=0.9971 mas, bmaj=1.558 mas, bpa=35.42 degrees
! Estimated noise=363.35 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000276606 Jy
! Component: 100  -  total flux cleaned = 0.000460609 Jy
! Component: 150  -  total flux cleaned = 0.000508716 Jy
! Component: 200  -  total flux cleaned = 0.000577764 Jy
! Total flux subtracted in 200 components = 0.000577764 Jy
! Clean residual min=-0.001711 max=0.002118 Jy/beam
! Clean residual mean=0.000105 rms=0.000544 Jy/beam
! Combined flux in latest and established models = 0.812341 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 101 components and 0.812341 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.129079Jy  sigma=0.001477
! Fit after  self-cal, rms=0.129076Jy  sigma=0.001477
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.17929e-06 Jy
! Component: 100  -  total flux cleaned = 0.000153242 Jy
! Component: 150  -  total flux cleaned = 0.000196085 Jy
! Component: 200  -  total flux cleaned = 0.000237276 Jy
! Total flux subtracted in 200 components = 0.000237276 Jy
! Clean residual min=-0.001775 max=0.002119 Jy/beam
! Clean residual mean=0.000103 rms=0.000539 Jy/beam
! Combined flux in latest and established models = 0.812578 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 106 components and 0.812578 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.129063Jy  sigma=0.001477
! Fit after  self-cal, rms=0.129060Jy  sigma=0.001477
! 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.129060Jy  sigma=0.001477
! Fit after  self-cal, rms=0.129094Jy  sigma=0.001477
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=0.7818 mas, bmaj=1.079 mas, bpa=29.94 degrees
! Estimated noise=802.115 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.499628 Jy
! Component: 100  -  total flux cleaned = 0.643286 Jy
! Component: 150  -  total flux cleaned = 0.709704 Jy
! Component: 200  -  total flux cleaned = 0.743045 Jy
! Total flux subtracted in 200 components = 0.743045 Jy
! Clean residual min=-0.007080 max=0.016423 Jy/beam
! Clean residual mean=0.000122 rms=0.002047 Jy/beam
! Combined flux in latest and established models = 0.743045 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 14 model components to the UV plane model.
! The established model now contains 14 components and 0.743045 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9977 mas, bmaj=1.558 mas, bpa=35.38 degrees
! Estimated noise=363.436 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.0304039 Jy
! Component: 100  -  total flux cleaned = 0.043977 Jy
! Component: 150  -  total flux cleaned = 0.051546 Jy
! Component: 200  -  total flux cleaned = 0.0568829 Jy
! Total flux subtracted in 200 components = 0.0568829 Jy
! Clean residual min=-0.002436 max=0.003301 Jy/beam
! Clean residual mean=0.000179 rms=0.000813 Jy/beam
! Combined flux in latest and established models = 0.799928 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 36 components and 0.799928 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.586 mas, bmaj=3.048 mas, bpa=12.96 degrees
! Estimated noise=442.827 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00543393 Jy
! Component: 100  -  total flux cleaned = 0.00865522 Jy
! Component: 150  -  total flux cleaned = 0.0107115 Jy
! Component: 200  -  total flux cleaned = 0.0120584 Jy
! Total flux subtracted in 200 components = 0.0120584 Jy
! Clean residual min=-0.002048 max=0.002426 Jy/beam
! Clean residual mean=0.000217 rms=0.000648 Jy/beam
! Combined flux in latest and established models = 0.811987 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.000642154 Jy
! Component: 100  -  total flux cleaned = 0.000956256 Jy
! Component: 150  -  total flux cleaned = 0.00118666 Jy
! Component: 200  -  total flux cleaned = 0.00135941 Jy
! Total flux subtracted in 200 components = 0.00135941 Jy
! Clean residual min=-0.001816 max=0.002259 Jy/beam
! Clean residual mean=0.000200 rms=0.000634 Jy/beam
! Combined flux in latest and established models = 0.813346 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 81 components and 0.813346 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9977 mas, bmaj=1.558 mas, bpa=35.38 degrees
! Estimated noise=363.436 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -2.35009e-06 Jy
! Component: 100  -  total flux cleaned = -9.58991e-05 Jy
! Component: 150  -  total flux cleaned = -9.52489e-05 Jy
! Component: 200  -  total flux cleaned = -9.67502e-05 Jy
! Total flux subtracted in 200 components = -9.67502e-05 Jy
! Clean residual min=-0.001724 max=0.002134 Jy/beam
! Clean residual mean=0.000102 rms=0.000541 Jy/beam
! Combined flux in latest and established models = 0.813249 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 89 components and 0.813249 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.129121Jy  sigma=0.001477
! Fit after  self-cal, rms=0.129111Jy  sigma=0.001477
wmodel J0017+8135_X_2003_06_18_pus_map.mod
! Writing 89 model components to file: J0017+8135_X_2003_06_18_pus_map.mod
wobs J0017+8135_X_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J0017+8135_X_2003_06_18_pus_uvs.fits
wwins J0017+8135_X_2003_06_18_pus_map.win
! wwins: Wrote 3 windows to J0017+8135_X_2003_06_18_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=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000747182 Jy
! Component: 100  -  total flux cleaned = 0.00131102 Jy
! Component: 150  -  total flux cleaned = 0.00190176 Jy
! Component: 200  -  total flux cleaned = 0.00234458 Jy
! Component: 250  -  total flux cleaned = 0.0027124 Jy
! Component: 300  -  total flux cleaned = 0.00312174 Jy
! Component: 350  -  total flux cleaned = 0.00343866 Jy
! Component: 400  -  total flux cleaned = 0.00372154 Jy
! Component: 450  -  total flux cleaned = 0.00404697 Jy
! Component: 500  -  total flux cleaned = 0.00424329 Jy
! Component: 550  -  total flux cleaned = 0.00448385 Jy
! Component: 600  -  total flux cleaned = 0.00471984 Jy
! Component: 650  -  total flux cleaned = 0.00490543 Jy
! Component: 700  -  total flux cleaned = 0.00513317 Jy
! Component: 750  -  total flux cleaned = 0.00529008 Jy
! Component: 800  -  total flux cleaned = 0.00548857 Jy
! Component: 850  -  total flux cleaned = 0.00568403 Jy
! Component: 900  -  total flux cleaned = 0.00581252 Jy
! Component: 950  -  total flux cleaned = 0.00600308 Jy
! Component: 1000  -  total flux cleaned = 0.00614951 Jy
! Total flux subtracted in 1024 components = 0.00625288 Jy
! Clean residual min=-0.001143 max=0.001324 Jy/beam
! Clean residual mean=0.000043 rms=0.000419 Jy/beam
! Combined flux in latest and established models = 0.819502 Jy
keep
! Adding 63 model components to the UV plane model.
! The established model now contains 152 components and 0.819502 Jy
wmap "J0017+8135_X_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9977 x 1.558 at 35.38 degrees (North through East)
! Clean map  min=-0.001699  max=0.67935 Jy/beam
! Writing clean map to FITS file: J0017+8135_X_2003_06_18_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.67935 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000419732 
device "J0017+8135_X_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J0017+8135_X_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.185353 0.185353 0.370706 0.741412 1.48282 2.96565 5.9313 11.8626 23.7252 47.4504 94.9007
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0012 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.679 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9977 x 1.558 at 35.38 degrees (North through East)
! Clean map  min=-0.001699  max=0.67935 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0017+8135_X_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J0017+8135_X_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0017+8135_X_2003_06_18_pus_uvs.log closed on Wed Jan 17 16:06:44 2007