! Started logfile: J0019+7327_S_1999_03_08_pus_uvs.log on Tue Jan  8 17:51:59 2008
obs J0019+7327_S_1999_03_08_pus_uva.fits
! Reading UV FITS file: J0019+7327_S_1999_03_08_pus_uva.fits
! AN table 1: 252 integrations on 190 of 190 possible baselines.
! AN table 2: 357 integrations on 190 of 190 possible baselines.
! AN table 3: 73 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.220914 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0019+7327
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2332 lines of history.
! 
! Reading 114504 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 J0019+7327_S_1999_03_08_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 2525 telescope corrections were flagged in sub-array 1.
!  A total of 4622 telescope corrections were flagged in sub-array 2.
!  A total of 1206 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 2525 telescope corrections were flagged in sub-array 1.
!  A total of 4624 telescope corrections were flagged in sub-array 2.
!  A total of 1206 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 2525 telescope corrections were flagged in sub-array 1.
!  A total of 4623 telescope corrections were flagged in sub-array 2.
!  A total of 1206 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 2525 telescope corrections were flagged in sub-array 1.
!  A total of 4622 telescope corrections were flagged in sub-array 2.
!  A total of 1206 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.995273Jy  sigma=0.005662
! Fit after  self-cal, rms=0.604210Jy  sigma=0.003219
! 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.998 mas, bmaj=2.287 mas, bpa=13.79 degrees
! Estimated noise=763.283 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.408085 Jy
! Component: 100  -  total flux cleaned = 0.523381 Jy
! Total flux subtracted in 100 components = 0.523381 Jy
! Clean residual min=-0.013795 max=0.051419 Jy/beam
! Clean residual mean=0.000079 rms=0.004082 Jy/beam
! Combined flux in latest and established models = 0.523381 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.523381 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.443042Jy  sigma=0.001758
! Fit after  self-cal, rms=0.443050Jy  sigma=0.001757
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0591679 Jy
! Component: 100  -  total flux cleaned = 0.0978121 Jy
! Total flux subtracted in 100 components = 0.0978121 Jy
! Clean residual min=-0.012869 max=0.021373 Jy/beam
! Clean residual mean=0.000041 rms=0.003444 Jy/beam
! Combined flux in latest and established models = 0.621193 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 15 components and 0.621193 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.428793Jy  sigma=0.001606
! Fit after  self-cal, rms=0.428809Jy  sigma=0.001606
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0275264 Jy
! Component: 100  -  total flux cleaned = 0.0471766 Jy
! Total flux subtracted in 100 components = 0.0471766 Jy
! Clean residual min=-0.013680 max=0.017096 Jy/beam
! Clean residual mean=0.000023 rms=0.003279 Jy/beam
! Combined flux in latest and established models = 0.66837 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 22 components and 0.66837 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.425134Jy  sigma=0.001570
! Fit after  self-cal, rms=0.425156Jy  sigma=0.001570
! 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.533 mas, bmaj=2.828 mas, bpa=16.79 degrees
! Estimated noise=340.072 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.0251946 Jy
! Component: 100  -  total flux cleaned = 0.0399638 Jy
! Component: 150  -  total flux cleaned = 0.0490207 Jy
! Component: 200  -  total flux cleaned = 0.0546041 Jy
! Total flux subtracted in 200 components = 0.0546041 Jy
! Clean residual min=-0.010423 max=0.014959 Jy/beam
! Clean residual mean=0.000000 rms=0.002788 Jy/beam
! Combined flux in latest and established models = 0.722974 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 32 components and 0.722974 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.423105Jy  sigma=0.001556
! Fit after  self-cal, rms=0.423118Jy  sigma=0.001556
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.99     GC        1.07     GG        1.00*    
!   HN        0.98     KP        0.95     LA        0.98     NL        0.98     
!   OV        0.98     PT        1.03     SC        1.06     WF        0.98     
!   GN        1.00     HH        1.00*    KK        1.10     MC        1.05     
!   MK        0.97     NY        1.02     ON        0.97     WZ        0.96     
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.99     GC        0.99     GG        1.00*    
!   HN        1.01     KP        0.92     LA        1.00*    NL        0.86     
!   OV        1.00*    PT        1.00     SC        1.07     WF        0.95     
!   GN        0.96     HH        1.00*    KK        1.04     MC        1.08     
!   MK        0.97     NY        0.98     ON        0.95     WZ        0.88     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.92     FD        1.02     GC        1.02     GG        1.00*    
!   HN        1.01     KP        1.00*    LA        0.99     NL        0.97     
!   OV        1.00     PT        1.02     SC        1.00*    WF        1.00     
!   GN        1.00     HH        1.00*    KK        0.99     MC        1.00*    
!   MK        0.98     NY        1.00*    ON        1.10     WZ        1.07     
! 
! 
! Correcting IF 2.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.07     GC        1.12     GG        1.00*    
!   HN        0.96     KP        0.97     LA        0.98     NL        0.97     
!   OV        0.97     PT        1.00     SC        1.09     WF        0.98     
!   GN        1.00     HH        1.00*    KK        1.06     MC        1.00     
!   MK        1.00     NY        1.00     ON        0.99     WZ        0.96     
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.04     GC        1.03     GG        1.00*    
!   HN        0.95     KP        0.95     LA        1.00*    NL        0.76     
!   OV        1.00*    PT        0.99     SC        1.13     WF        0.97     
!   GN        0.96     HH        1.00*    KK        1.01     MC        1.13     
!   MK        1.01     NY        0.98     ON        0.97     WZ        0.90     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.05     GC        1.06     GG        1.00*    
!   HN        0.98     KP        1.00*    LA        0.98     NL        1.08     
!   OV        0.96     PT        1.00     SC        1.00*    WF        0.99     
!   GN        1.00     HH        1.00*    KK        0.95     MC        1.00*    
!   MK        0.98     NY        1.00*    ON        1.08     WZ        1.15     
! 
! 
! Correcting IF 3.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.03     GC        1.09     GG        1.00*    
!   HN        1.25     KP        0.99     LA        1.01     NL        0.97     
!   OV        1.02     PT        0.98     SC        1.10     WF        1.02     
!   GN        0.99     HH        1.00*    KK        1.08     MC        0.85     
!   MK        1.01     NY        1.02     ON        0.97     WZ        1.00     
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.03     GC        1.02     GG        1.00*    
!   HN        1.24     KP        0.94     LA        1.00*    NL        0.84     
!   OV        1.00*    PT        0.95     SC        1.07     WF        0.99     
!   GN        0.98     HH        1.00*    KK        1.03     MC        1.15     
!   MK        1.01     NY        1.00     ON        0.97     WZ        0.87     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.03     GC        1.04     GG        1.00*    
!   HN        1.26     KP        1.00*    LA        0.99     NL        1.02     
!   OV        0.99     PT        1.01     SC        1.00*    WF        1.00     
!   GN        0.99     HH        1.00*    KK        1.01     MC        1.00*    
!   MK        0.98     NY        1.00*    ON        1.01     WZ        0.98     
! 
! 
! Correcting IF 4.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.04     GC        1.11     GG        1.00*    
!   HN        1.18     KP        0.95     LA        1.02     NL        0.98     
!   OV        1.03     PT        0.97     SC        1.08     WF        1.00     
!   GN        1.01     HH        1.00*    KK        1.15     MC        0.89     
!   MK        1.02     NY        1.05     ON        0.98     WZ        0.97     
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.04     GC        1.04     GG        1.00*    
!   HN        1.18     KP        0.96     LA        1.00*    NL        0.80     
!   OV        1.00*    PT        0.94     SC        1.10     WF        0.99     
!   GN        0.97     HH        1.00*    KK        1.08     MC        0.87     
!   MK        1.05     NY        0.99     ON        0.95     WZ        0.91     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.03     GC        1.02     GG        1.00*    
!   HN        1.15     KP        1.00*    LA        1.05     NL        1.09     
!   OV        1.03     PT        0.99     SC        1.00*    WF        1.04     
!   GN        1.02     HH        1.00*    KK        1.04     MC        1.00*    
!   MK        1.04     NY        1.00*    ON        1.05     WZ        0.96     
! 
! 
! Fit before self-cal, rms=0.423118Jy  sigma=0.001556
! Fit after  self-cal, rms=0.416169Jy  sigma=0.001506
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.53 mas, bmaj=2.831 mas, bpa=16.71 degrees
! Estimated noise=342.387 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.00555074 Jy
! Component: 100  -  total flux cleaned = 0.00667278 Jy
! Component: 150  -  total flux cleaned = 0.00755663 Jy
! Component: 200  -  total flux cleaned = 0.00801051 Jy
! Total flux subtracted in 200 components = 0.0080105 Jy
! Clean residual min=-0.008079 max=0.010584 Jy/beam
! Clean residual mean=0.000215 rms=0.002306 Jy/beam
! Combined flux in latest and established models = 0.730984 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 41 components and 0.730984 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.415999Jy  sigma=0.001506
! Fit after  self-cal, rms=0.416065Jy  sigma=0.001506
! 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.416065Jy  sigma=0.001506
! Fit after  self-cal, rms=0.485022Jy  sigma=0.001407
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.515 mas, bmaj=2.864 mas, bpa=19.48 degrees
! Estimated noise=343.209 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000793839 Jy
! Component: 100  -  total flux cleaned = 0.0010289 Jy
! Component: 150  -  total flux cleaned = 0.00113043 Jy
! Component: 200  -  total flux cleaned = 0.00129286 Jy
! Total flux subtracted in 200 components = 0.00129286 Jy
! Clean residual min=-0.002554 max=0.007201 Jy/beam
! Clean residual mean=0.000240 rms=0.000724 Jy/beam
! Combined flux in latest and established models = 0.732277 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 43 components and 0.732277 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.484962Jy  sigma=0.001407
! Fit after  self-cal, rms=0.485648Jy  sigma=0.001406
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 (0.5, -4.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00597357 Jy
! Component: 100  -  total flux cleaned = 0.00740133 Jy
! Component: 150  -  total flux cleaned = 0.00815579 Jy
! Component: 200  -  total flux cleaned = 0.00876788 Jy
! Total flux subtracted in 200 components = 0.00876789 Jy
! Clean residual min=-0.002286 max=0.005380 Jy/beam
! Clean residual mean=0.000179 rms=0.000630 Jy/beam
! Combined flux in latest and established models = 0.741045 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 59 components and 0.741045 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.485537Jy  sigma=0.001405
! Fit after  self-cal, rms=0.485508Jy  sigma=0.001405
! Inverting map 
! Added new window around map position (-4.5, 2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00380549 Jy
! Component: 100  -  total flux cleaned = 0.00389395 Jy
! Component: 150  -  total flux cleaned = 0.00419147 Jy
! Component: 200  -  total flux cleaned = 0.00445972 Jy
! Total flux subtracted in 200 components = 0.00445972 Jy
! Clean residual min=-0.002391 max=0.002697 Jy/beam
! Clean residual mean=0.000150 rms=0.000596 Jy/beam
! Combined flux in latest and established models = 0.745505 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 71 components and 0.745505 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.485456Jy  sigma=0.001404
! Fit after  self-cal, rms=0.485456Jy  sigma=0.001404
! Inverting map 
! Added new window around map position (-18.5, 14).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0018372 Jy
! Component: 100  -  total flux cleaned = 0.00224392 Jy
! Component: 150  -  total flux cleaned = 0.00249055 Jy
! Component: 200  -  total flux cleaned = 0.00266472 Jy
! Total flux subtracted in 200 components = 0.00266472 Jy
! Clean residual min=-0.002351 max=0.002535 Jy/beam
! Clean residual mean=0.000131 rms=0.000587 Jy/beam
! Combined flux in latest and established models = 0.748169 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 85 components and 0.748169 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.485434Jy  sigma=0.001404
! Fit after  self-cal, rms=0.485431Jy  sigma=0.001404
! Inverting map 
! Added new window around map position (-10, -18.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00216555 Jy
! Component: 100  -  total flux cleaned = 0.00274258 Jy
! Component: 150  -  total flux cleaned = 0.00290257 Jy
! Component: 200  -  total flux cleaned = 0.0030568 Jy
! Total flux subtracted in 200 components = 0.0030568 Jy
! Clean residual min=-0.002281 max=0.002360 Jy/beam
! Clean residual mean=0.000111 rms=0.000580 Jy/beam
! Combined flux in latest and established models = 0.751226 Jy
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 96 components and 0.751226 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.485409Jy  sigma=0.001404
! Fit after  self-cal, rms=0.485409Jy  sigma=0.001404
! 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.485409Jy  sigma=0.001404
! Fit after  self-cal, rms=0.496854Jy  sigma=0.001396
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.511 mas, bmaj=2.86 mas, bpa=19.41 degrees
! Estimated noise=343.119 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00120034 Jy
! Component: 100  -  total flux cleaned = 0.00153347 Jy
! Component: 150  -  total flux cleaned = 0.00189107 Jy
! Component: 200  -  total flux cleaned = 0.00208098 Jy
! Total flux subtracted in 200 components = 0.00208098 Jy
! Clean residual min=-0.001911 max=0.002070 Jy/beam
! Clean residual mean=0.000125 rms=0.000513 Jy/beam
! Combined flux in latest and established models = 0.753307 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 111 components and 0.753307 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.496836Jy  sigma=0.001396
! Fit after  self-cal, rms=0.496865Jy  sigma=0.001396
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.000444434 Jy
! Component: 100  -  total flux cleaned = 0.000747236 Jy
! Component: 150  -  total flux cleaned = 0.000989371 Jy
! Component: 200  -  total flux cleaned = 0.00114348 Jy
! Total flux subtracted in 200 components = 0.00114348 Jy
! Clean residual min=-0.001962 max=0.002074 Jy/beam
! Clean residual mean=0.000117 rms=0.000510 Jy/beam
! Combined flux in latest and established models = 0.754451 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 120 components and 0.754451 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.496857Jy  sigma=0.001396
! Fit after  self-cal, rms=0.496855Jy  sigma=0.001396
! 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.496855Jy  sigma=0.001396
! Fit after  self-cal, rms=0.498187Jy  sigma=0.001396
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.314 mas, bmaj=7.948 mas, bpa=36.79 degrees
! Estimated noise=546.072 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00247773 Jy
! Component: 100  -  total flux cleaned = 0.00378187 Jy
! Component: 150  -  total flux cleaned = 0.0047038 Jy
! Component: 200  -  total flux cleaned = 0.00525213 Jy
! Total flux subtracted in 200 components = 0.00525213 Jy
! Clean residual min=-0.002430 max=0.003236 Jy/beam
! Clean residual mean=0.000366 rms=0.000979 Jy/beam
! Combined flux in latest and established models = 0.759703 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 144 components and 0.759703 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.498178Jy  sigma=0.001396
! Fit after  self-cal, rms=0.498172Jy  sigma=0.001396
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.000706222 Jy
! Component: 100  -  total flux cleaned = 0.000861881 Jy
! Component: 150  -  total flux cleaned = 0.000938102 Jy
! Component: 200  -  total flux cleaned = 0.000973402 Jy
! Total flux subtracted in 200 components = 0.000973402 Jy
! Clean residual min=-0.002458 max=0.003191 Jy/beam
! Clean residual mean=0.000340 rms=0.000981 Jy/beam
! Combined flux in latest and established models = 0.760676 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 151 components and 0.760676 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.498170Jy  sigma=0.001396
! Fit after  self-cal, rms=0.498168Jy  sigma=0.001396
! 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.511 mas, bmaj=2.862 mas, bpa=19.46 degrees
! Estimated noise=343.435 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.511 x 2.862 at 19.46 degrees (North through East)
! Clean map  min=-0.0017018  max=0.57263 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.498168Jy  sigma=0.001396
! Fit after  self-cal, rms=1.132128Jy  sigma=0.001319
! Inverting map and beam 
! Estimated beam: bmin=2.508 mas, bmaj=2.86 mas, bpa=19.55 degrees
! Estimated noise=342.929 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0011286 Jy
! Component: 100  -  total flux cleaned = -0.0013326 Jy
! Component: 150  -  total flux cleaned = -0.00137045 Jy
! Component: 200  -  total flux cleaned = -0.00140653 Jy
! Total flux subtracted in 200 components = -0.00140653 Jy
! Clean residual min=-0.001833 max=0.002301 Jy/beam
! Clean residual mean=0.000113 rms=0.000484 Jy/beam
! Combined flux in latest and established models = 0.75927 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 163 components and 0.75927 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.132126Jy  sigma=0.001319
! Fit after  self-cal, rms=1.132131Jy  sigma=0.001319
! Inverting map 
! Added new window around map position (57.5, 7.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00118107 Jy
! Component: 100  -  total flux cleaned = 0.00130121 Jy
! Component: 150  -  total flux cleaned = 0.00126418 Jy
! Component: 200  -  total flux cleaned = 0.00126437 Jy
! Total flux subtracted in 200 components = 0.00126437 Jy
! Clean residual min=-0.001810 max=0.002065 Jy/beam
! Clean residual mean=0.000105 rms=0.000476 Jy/beam
! Combined flux in latest and established models = 0.760534 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 180 components and 0.760534 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.132124Jy  sigma=0.001319
! Fit after  self-cal, rms=1.132139Jy  sigma=0.001319
! Inverting map 
! Added new window around map position (42.5, -53).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000985825 Jy
! Component: 100  -  total flux cleaned = 0.00133055 Jy
! Component: 150  -  total flux cleaned = 0.00144103 Jy
! Component: 200  -  total flux cleaned = 0.00147393 Jy
! Total flux subtracted in 200 components = 0.00147393 Jy
! Clean residual min=-0.001793 max=0.001888 Jy/beam
! Clean residual mean=0.000095 rms=0.000470 Jy/beam
! Combined flux in latest and established models = 0.762008 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 194 components and 0.762008 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.132137Jy  sigma=0.001319
! Fit after  self-cal, rms=1.132171Jy  sigma=0.001319
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.132171Jy  sigma=0.001319
! Fit after  self-cal, rms=1.544158Jy  sigma=0.001318
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.974 mas, bmaj=2.311 mas, bpa=17.73 degrees
! Estimated noise=757.908 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.408018 Jy
! Component: 100  -  total flux cleaned = 0.530127 Jy
! Component: 150  -  total flux cleaned = 0.591469 Jy
! Component: 200  -  total flux cleaned = 0.629545 Jy
! Total flux subtracted in 200 components = 0.629545 Jy
! Clean residual min=-0.006092 max=0.020783 Jy/beam
! Clean residual mean=0.000058 rms=0.001747 Jy/beam
! Combined flux in latest and established models = 0.629546 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 17 model components to the UV plane model.
! The established model now contains 17 components and 0.629546 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.508 mas, bmaj=2.862 mas, bpa=19.57 degrees
! Estimated noise=342.792 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.0427747 Jy
! Component: 100  -  total flux cleaned = 0.0663071 Jy
! Component: 150  -  total flux cleaned = 0.081132 Jy
! Component: 200  -  total flux cleaned = 0.0914382 Jy
! Total flux subtracted in 200 components = 0.0914382 Jy
! Clean residual min=-0.002108 max=0.005754 Jy/beam
! Clean residual mean=0.000366 rms=0.000727 Jy/beam
! Combined flux in latest and established models = 0.720984 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 47 components and 0.720984 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00729258 Jy
! Component: 100  -  total flux cleaned = 0.0125961 Jy
! Component: 150  -  total flux cleaned = 0.0166584 Jy
! Component: 200  -  total flux cleaned = 0.0199461 Jy
! Total flux subtracted in 200 components = 0.0199461 Jy
! Clean residual min=-0.001869 max=0.002593 Jy/beam
! Clean residual mean=0.000232 rms=0.000525 Jy/beam
! Combined flux in latest and established models = 0.74093 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 75 components and 0.74093 Jy
! Inverting map 
! Added new window around map position (0, -12).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00292848 Jy
! Component: 100  -  total flux cleaned = 0.00540745 Jy
! Component: 150  -  total flux cleaned = 0.00760712 Jy
! Component: 200  -  total flux cleaned = 0.00919296 Jy
! Total flux subtracted in 200 components = 0.00919296 Jy
! Clean residual min=-0.001894 max=0.001926 Jy/beam
! Clean residual mean=0.000170 rms=0.000487 Jy/beam
! Combined flux in latest and established models = 0.750123 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 102 components and 0.750123 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.317 mas, bmaj=7.948 mas, bpa=36.64 degrees
! Estimated noise=545.253 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00395552 Jy
! Component: 100  -  total flux cleaned = 0.00654567 Jy
! Component: 150  -  total flux cleaned = 0.00808856 Jy
! Component: 200  -  total flux cleaned = 0.00912417 Jy
! Total flux subtracted in 200 components = 0.00912417 Jy
! Clean residual min=-0.002051 max=0.003072 Jy/beam
! Clean residual mean=0.000446 rms=0.000811 Jy/beam
! Combined flux in latest and established models = 0.759247 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.000888215 Jy
! Component: 100  -  total flux cleaned = 0.00154378 Jy
! Component: 150  -  total flux cleaned = 0.00179856 Jy
! Component: 200  -  total flux cleaned = 0.00196603 Jy
! Total flux subtracted in 200 components = 0.00196603 Jy
! Clean residual min=-0.002051 max=0.003083 Jy/beam
! Clean residual mean=0.000389 rms=0.000810 Jy/beam
! Combined flux in latest and established models = 0.761213 Jy
! Adding 74 model components to the UV plane model.
! The established model now contains 168 components and 0.761213 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.508 mas, bmaj=2.862 mas, bpa=19.57 degrees
! Estimated noise=342.792 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000121686 Jy
! Component: 100  -  total flux cleaned = -6.75775e-06 Jy
! Component: 150  -  total flux cleaned = 0.000204061 Jy
! Component: 200  -  total flux cleaned = 0.000404998 Jy
! Total flux subtracted in 200 components = 0.000404998 Jy
! Clean residual min=-0.001982 max=0.001843 Jy/beam
! Clean residual mean=0.000092 rms=0.000463 Jy/beam
! Combined flux in latest and established models = 0.761618 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 183 components and 0.761618 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.544170Jy  sigma=0.001319
! Fit after  self-cal, rms=1.544092Jy  sigma=0.001318
wmodel J0019+7327_S_1999_03_08_pus_map.mod
! Writing 183 model components to file: J0019+7327_S_1999_03_08_pus_map.mod
wobs J0019+7327_S_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J0019+7327_S_1999_03_08_pus_uvs.fits
wwins J0019+7327_S_1999_03_08_pus_map.win
! wwins: Wrote 8 windows to J0019+7327_S_1999_03_08_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.000125912 Jy
! Component: 100  -  total flux cleaned = 0.000232751 Jy
! Component: 150  -  total flux cleaned = 0.000670461 Jy
! Component: 200  -  total flux cleaned = 0.00106597 Jy
! Component: 250  -  total flux cleaned = 0.00133389 Jy
! Component: 300  -  total flux cleaned = 0.00159691 Jy
! Component: 350  -  total flux cleaned = 0.00188383 Jy
! Component: 400  -  total flux cleaned = 0.00210985 Jy
! Component: 450  -  total flux cleaned = 0.00238877 Jy
! Component: 500  -  total flux cleaned = 0.00263662 Jy
! Component: 550  -  total flux cleaned = 0.00285448 Jy
! Component: 600  -  total flux cleaned = 0.00309699 Jy
! Component: 650  -  total flux cleaned = 0.00344287 Jy
! Component: 700  -  total flux cleaned = 0.00362721 Jy
! Component: 750  -  total flux cleaned = 0.00380979 Jy
! Component: 800  -  total flux cleaned = 0.00401667 Jy
! Component: 850  -  total flux cleaned = 0.00419604 Jy
! Component: 900  -  total flux cleaned = 0.00432317 Jy
! Component: 950  -  total flux cleaned = 0.00447461 Jy
! Component: 1000  -  total flux cleaned = 0.00459988 Jy
! Component: 1050  -  total flux cleaned = 0.00484827 Jy
! Component: 1100  -  total flux cleaned = 0.00494664 Jy
! Component: 1150  -  total flux cleaned = 0.00509367 Jy
! Component: 1200  -  total flux cleaned = 0.00526397 Jy
! Component: 1250  -  total flux cleaned = 0.00538476 Jy
! Component: 1300  -  total flux cleaned = 0.00555281 Jy
! Component: 1350  -  total flux cleaned = 0.00574345 Jy
! Component: 1400  -  total flux cleaned = 0.0058619 Jy
! Component: 1450  -  total flux cleaned = 0.00597972 Jy
! Component: 1500  -  total flux cleaned = 0.00612032 Jy
! Component: 1550  -  total flux cleaned = 0.00628342 Jy
! Component: 1600  -  total flux cleaned = 0.00637609 Jy
! Component: 1650  -  total flux cleaned = 0.00653717 Jy
! Component: 1700  -  total flux cleaned = 0.00669724 Jy
! Component: 1750  -  total flux cleaned = 0.00671983 Jy
! Component: 1800  -  total flux cleaned = 0.00681028 Jy
! Component: 1850  -  total flux cleaned = 0.00690058 Jy
! Component: 1900  -  total flux cleaned = 0.00699025 Jy
! Component: 1950  -  total flux cleaned = 0.00714617 Jy
! Component: 2000  -  total flux cleaned = 0.00721268 Jy
! Total flux subtracted in 2048 components = 0.00730084 Jy
! Clean residual min=-0.001210 max=0.001546 Jy/beam
! Clean residual mean=0.000050 rms=0.000404 Jy/beam
! Combined flux in latest and established models = 0.768919 Jy
keep
! Adding 165 model components to the UV plane model.
! The established model now contains 348 components and 0.768919 Jy
![Exited script file: muppet]
wmap "J0019+7327_S_1999_03_08_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.508 x 2.862 at 19.57 degrees (North through East)
! Clean map  min=-0.0016681  max=0.57274 Jy/beam
! Writing clean map to FITS file: J0019+7327_S_1999_03_08_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.572736 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00040377 
device "J0019+7327_S_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J0019+7327_S_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.211495 0.211495 0.422991 0.845981 1.69196 3.38392 6.76785 13.5357 27.0714 54.1428
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0012 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.572 
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.508 x 2.862 at 19.57 degrees (North through East)
! Clean map  min=-0.0016681  max=0.57274 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0019+7327_S_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J0019+7327_S_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0019+7327_S_1999_03_08_pus_uvs.log closed on Tue Jan  8 17:52:57 2008