! Started logfile: J1640+3946_S_1999_03_08_pus_uvs.log on Tue Jan  8 18:29:57 2008
obs J1640+3946_S_1999_03_08_pus_uva.fits
! Reading UV FITS file: J1640+3946_S_1999_03_08_pus_uva.fits
! AN table 1: 655 integrations on 190 of 190 possible baselines.
! AN table 2: 376 integrations on 190 of 190 possible baselines.
! AN table 3: 118 integrations on 190 of 190 possible baselines.
! AN table 4: 286 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.111297 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1640+3946
! 
! 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 121380 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 J1640+3946_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 9363 telescope corrections were flagged in sub-array 1.
!  A total of 4551 telescope corrections were flagged in sub-array 2.
!  A total of 1878 telescope corrections were flagged in sub-array 3.
!  A total of 5135 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 9363 telescope corrections were flagged in sub-array 1.
!  A total of 4530 telescope corrections were flagged in sub-array 2.
!  A total of 1878 telescope corrections were flagged in sub-array 3.
!  A total of 5135 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 9362 telescope corrections were flagged in sub-array 1.
!  A total of 4530 telescope corrections were flagged in sub-array 2.
!  A total of 1878 telescope corrections were flagged in sub-array 3.
!  A total of 4752 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 9363 telescope corrections were flagged in sub-array 1.
!  A total of 4530 telescope corrections were flagged in sub-array 2.
!  A total of 1878 telescope corrections were flagged in sub-array 3.
!  A total of 4752 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.011523Jy  sigma=0.006049
! Fit after  self-cal, rms=0.491179Jy  sigma=0.002615
! 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=2.052 mas, bmaj=2.937 mas, bpa=-9.952 degrees
! Estimated noise=750.174 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.832717 Jy
! Component: 100  -  total flux cleaned = 1.01597 Jy
! Total flux subtracted in 100 components = 1.01597 Jy
! Clean residual min=-0.020969 max=0.058993 Jy/beam
! Clean residual mean=-0.000003 rms=0.005151 Jy/beam
! Combined flux in latest and established models = 1.01597 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.01597 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.485998Jy  sigma=0.002558
! Fit after  self-cal, rms=0.485992Jy  sigma=0.002558
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0673837 Jy
! Component: 100  -  total flux cleaned = 0.109464 Jy
! Total flux subtracted in 100 components = 0.109464 Jy
! Clean residual min=-0.020137 max=0.022605 Jy/beam
! Clean residual mean=-0.000051 rms=0.004339 Jy/beam
! Combined flux in latest and established models = 1.12544 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 22 components and 1.12544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.459657Jy  sigma=0.002280
! Fit after  self-cal, rms=0.459673Jy  sigma=0.002280
! 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.944 mas, bmaj=4.267 mas, bpa=-5.926 degrees
! Estimated noise=266.749 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.0722369 Jy
! Component: 100  -  total flux cleaned = 0.110384 Jy
! Component: 150  -  total flux cleaned = 0.133195 Jy
! Component: 200  -  total flux cleaned = 0.146918 Jy
! Total flux subtracted in 200 components = 0.146918 Jy
! Clean residual min=-0.052155 max=0.027230 Jy/beam
! Clean residual mean=-0.001109 rms=0.011050 Jy/beam
! Combined flux in latest and established models = 1.27236 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 45 components and 1.27236 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.443665Jy  sigma=0.002182
! Fit after  self-cal, rms=0.443665Jy  sigma=0.002181
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 303 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     GC        0.97     GG        1.00*    
!   HN        0.98     KP        0.99     LA        1.04     NL        0.74     
!   OV        1.05     PT        1.07     SC        1.04     WF        1.07     
!   GN        1.06     HH        1.00*    KK        1.03     MC        1.02     
!   MK        1.02     NY        0.99     ON        1.04     WZ        0.98     
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.01     GC        1.00     GG        1.00*    
!   HN        0.99     KP        0.87     LA        1.02     NL        1.06     
!   OV        1.01     PT        1.05     SC        1.06     WF        0.97     
!   GN        0.98     HH        1.00*    KK        0.97     MC        1.00*    
!   MK        0.91     NY        0.96     ON        1.27     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        1.00*    GC        0.95     GG        1.00*    
!   HN        1.00*    KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        1.00     MC        1.00*    
!   MK        1.00     NY        1.06     ON        1.10     WZ        1.12     
! 
!  A total of 237 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.05     GC        1.03     GG        1.00*    
!   HN        1.04     KP        1.04     LA        1.03     NL        1.06     
!   OV        1.00*    PT        1.06     SC        1.01     WF        1.06     
!   GN        0.99     HH        1.00*    KK        1.00*    MC        0.93     
!   MK        1.00*    NY        1.03     ON        1.01     WZ        1.12     
! 
! 
! Correcting IF 2.
!  A total of 303 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.02     GC        1.00     GG        1.00*    
!   HN        0.95     KP        1.00     LA        1.04     NL        0.67     
!   OV        1.01     PT        1.01     SC        1.08     WF        1.02     
!   GN        1.01     HH        1.00*    KK        0.98     MC        0.99     
!   MK        1.05     NY        0.98     ON        1.05     WZ        1.01     
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.05     GC        1.03     GG        1.00*    
!   HN        0.99     KP        0.92     LA        1.00     NL        0.94     
!   OV        0.97     PT        1.02     SC        1.10     WF        1.00     
!   GN        0.97     HH        1.00*    KK        0.91     MC        1.00*    
!   MK        0.93     NY        0.96     ON        1.22     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.00*    GC        0.99     GG        1.00*    
!   HN        1.00*    KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        0.96     MC        1.00*    
!   MK        1.01     NY        1.04     ON        1.12     WZ        1.15     
! 
!  A total of 237 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.05     FD        1.22     GC        1.06     GG        1.00*    
!   HN        1.00     KP        1.04     LA        1.12     NL        1.12     
!   OV        1.00*    PT        1.05     SC        1.06     WF        1.07     
!   GN        1.01     HH        1.00*    KK        1.00*    MC        1.85     
!   MK        1.00*    NY        1.08     ON        0.95     WZ        1.15     
! 
! 
! Correcting IF 3.
!  A total of 303 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.99     GC        0.99     GG        1.00*    
!   HN        1.22     KP        1.00     LA        1.05     NL        0.73     
!   OV        1.04     PT        0.97     SC        1.05     WF        1.01     
!   GN        1.01     HH        1.00*    KK        0.99     MC        1.45     
!   MK        1.03     NY        1.00     ON        1.05     WZ        1.04     
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.03     GC        1.02     GG        1.00*    
!   HN        1.26     KP        0.96     LA        1.03     NL        1.01     
!   OV        1.00     PT        0.99     SC        1.07     WF        1.00     
!   GN        0.97     HH        1.00*    KK        0.97     MC        1.00*    
!   MK        0.91     NY        0.96     ON        1.17     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.93     FD        1.00*    GC        0.97     GG        1.00*    
!   HN        1.00*    KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        0.99     MC        1.00*    
!   MK        0.99     NY        1.05     ON        1.08     WZ        1.23     
! 
!  A total of 285 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     FD        1.17     GC        1.07     GG        1.00*    
!   HN        1.28     KP        1.02     LA        1.13     NL        1.08     
!   OV        1.00*    PT        1.00     SC        1.02     WF        1.21     
!   GN        0.98     HH        0.91     KK        1.00*    MC        0.78     
!   MK        1.00*    NY        1.13     ON        1.06     WZ        1.10     
! 
! 
! Correcting IF 4.
!  A total of 303 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.99     GC        1.01     GG        1.00*    
!   HN        1.16     KP        1.02     LA        1.05     NL        0.69     
!   OV        1.06     PT        0.97     SC        1.04     WF        1.00     
!   GN        1.00     HH        1.00*    KK        1.04     MC        1.01     
!   MK        1.07     NY        0.99     ON        1.01     WZ        1.01     
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.01     GC        1.03     GG        1.00*    
!   HN        1.19     KP        0.92     LA        1.02     NL        0.96     
!   OV        1.01     PT        0.97     SC        1.07     WF        1.01     
!   GN        0.96     HH        1.00*    KK        0.97     MC        1.00*    
!   MK        0.95     NY        0.95     ON        1.10     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        1.00*    GC        0.98     GG        1.00*    
!   HN        1.00*    KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        1.00     MC        1.00*    
!   MK        1.04     NY        1.08     ON        1.07     WZ        1.19     
! 
!  A total of 285 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        1.17     GC        1.08     GG        1.00*    
!   HN        1.25     KP        1.03     LA        1.12     NL        1.13     
!   OV        1.00*    PT        0.98     SC        1.03     WF        1.05     
!   GN        0.99     HH        0.99     KK        1.00*    MC        0.91     
!   MK        1.00*    NY        1.04     ON        1.03     WZ        1.12     
! 
! 
! Fit before self-cal, rms=0.443665Jy  sigma=0.002181
! Fit after  self-cal, rms=0.380189Jy  sigma=0.001826
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.975 mas, bmaj=4.308 mas, bpa=-6.83 degrees
! Estimated noise=271.887 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.00930025 Jy
! Component: 100  -  total flux cleaned = 0.00931965 Jy
! Component: 150  -  total flux cleaned = 0.00892586 Jy
! Component: 200  -  total flux cleaned = 0.0085774 Jy
! Total flux subtracted in 200 components = 0.0085774 Jy
! Clean residual min=-0.022411 max=0.016160 Jy/beam
! Clean residual mean=-0.000198 rms=0.005980 Jy/beam
! Combined flux in latest and established models = 1.28093 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 46 components and 1.28093 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.379551Jy  sigma=0.001827
! Fit after  self-cal, rms=0.379468Jy  sigma=0.001827
! 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.379468Jy  sigma=0.001827
! Fit after  self-cal, rms=0.348016Jy  sigma=0.001459
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.97 mas, bmaj=4.332 mas, bpa=-6.564 degrees
! Estimated noise=272.215 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00328083 Jy
! Component: 100  -  total flux cleaned = -0.00454155 Jy
! Component: 150  -  total flux cleaned = -0.0056366 Jy
! Component: 200  -  total flux cleaned = -0.00659726 Jy
! Total flux subtracted in 200 components = -0.00659726 Jy
! Clean residual min=-0.003783 max=0.006221 Jy/beam
! Clean residual mean=0.000034 rms=0.000997 Jy/beam
! Combined flux in latest and established models = 1.27434 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 46 components and 1.27434 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347821Jy  sigma=0.001457
! Fit after  self-cal, rms=0.347725Jy  sigma=0.001456
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 (-4.5, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00382528 Jy
! Component: 100  -  total flux cleaned = 0.00442216 Jy
! Component: 150  -  total flux cleaned = 0.00466765 Jy
! Component: 200  -  total flux cleaned = 0.00478095 Jy
! Total flux subtracted in 200 components = 0.00478095 Jy
! Clean residual min=-0.003624 max=0.003922 Jy/beam
! Clean residual mean=-0.000002 rms=0.000859 Jy/beam
! Combined flux in latest and established models = 1.27912 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 59 components and 1.27912 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347577Jy  sigma=0.001455
! Fit after  self-cal, rms=0.347570Jy  sigma=0.001454
! Inverting map 
! Added new window around map position (-11, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00295419 Jy
! Component: 100  -  total flux cleaned = 0.0035663 Jy
! Component: 150  -  total flux cleaned = 0.00365384 Jy
! Component: 200  -  total flux cleaned = 0.00381858 Jy
! Total flux subtracted in 200 components = 0.00381858 Jy
! Clean residual min=-0.003294 max=0.003099 Jy/beam
! Clean residual mean=-0.000031 rms=0.000790 Jy/beam
! Combined flux in latest and established models = 1.28294 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 69 components and 1.28294 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347495Jy  sigma=0.001454
! Fit after  self-cal, rms=0.347496Jy  sigma=0.001454
! 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.347496Jy  sigma=0.001454
! Fit after  self-cal, rms=0.349229Jy  sigma=0.001452
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.975 mas, bmaj=4.344 mas, bpa=-6.507 degrees
! Estimated noise=272.495 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00182996 Jy
! Component: 100  -  total flux cleaned = -0.00235784 Jy
! Component: 150  -  total flux cleaned = -0.00247933 Jy
! Component: 200  -  total flux cleaned = -0.00238666 Jy
! Total flux subtracted in 200 components = -0.00238666 Jy
! Clean residual min=-0.003009 max=0.003273 Jy/beam
! Clean residual mean=0.000005 rms=0.000724 Jy/beam
! Combined flux in latest and established models = 1.28055 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 79 components and 1.28055 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349127Jy  sigma=0.001451
! Fit after  self-cal, rms=0.349122Jy  sigma=0.001451
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 (4, -4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00108409 Jy
! Component: 100  -  total flux cleaned = 0.00135751 Jy
! Component: 150  -  total flux cleaned = 0.00152214 Jy
! Component: 200  -  total flux cleaned = 0.00159963 Jy
! Total flux subtracted in 200 components = 0.00159963 Jy
! Clean residual min=-0.002879 max=0.002788 Jy/beam
! Clean residual mean=-0.000006 rms=0.000690 Jy/beam
! Combined flux in latest and established models = 1.28215 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 88 components and 1.28215 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349066Jy  sigma=0.001451
! Fit after  self-cal, rms=0.349063Jy  sigma=0.001451
! 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.349063Jy  sigma=0.001451
! Fit after  self-cal, rms=0.350079Jy  sigma=0.001450
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.904 mas, bmaj=8.293 mas, bpa=-4.181 degrees
! Estimated noise=354.101 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000970648 Jy
! Component: 100  -  total flux cleaned = 0.00157165 Jy
! Component: 150  -  total flux cleaned = 0.00214848 Jy
! Component: 200  -  total flux cleaned = 0.0025937 Jy
! Total flux subtracted in 200 components = 0.0025937 Jy
! Clean residual min=-0.003433 max=0.003344 Jy/beam
! Clean residual mean=-0.000038 rms=0.001023 Jy/beam
! Combined flux in latest and established models = 1.28474 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 107 components and 1.28474 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.350055Jy  sigma=0.001450
! Fit after  self-cal, rms=0.350057Jy  sigma=0.001450
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 = -5.0847e-05 Jy
! Component: 100  -  total flux cleaned = 0.000102509 Jy
! Component: 150  -  total flux cleaned = 0.000227336 Jy
! Component: 200  -  total flux cleaned = 0.000292634 Jy
! Total flux subtracted in 200 components = 0.000292634 Jy
! Clean residual min=-0.003369 max=0.003299 Jy/beam
! Clean residual mean=-0.000044 rms=0.001016 Jy/beam
! Combined flux in latest and established models = 1.28504 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 120 components and 1.28504 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.350051Jy  sigma=0.001450
! Fit after  self-cal, rms=0.350048Jy  sigma=0.001450
! 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.978 mas, bmaj=4.351 mas, bpa=-6.481 degrees
! Estimated noise=272.745 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.978 x 4.351 at -6.481 degrees (North through East)
! Clean map  min=-0.0024456  max=1.1599 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.350048Jy  sigma=0.001450
! Fit after  self-cal, rms=0.419562Jy  sigma=0.001262
! Inverting map and beam 
! Estimated beam: bmin=2.978 mas, bmaj=4.352 mas, bpa=-6.417 degrees
! Estimated noise=272.17 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00310734 Jy
! Component: 100  -  total flux cleaned = -0.0039571 Jy
! Component: 150  -  total flux cleaned = -0.0046026 Jy
! Component: 200  -  total flux cleaned = -0.00492518 Jy
! Total flux subtracted in 200 components = -0.00492518 Jy
! Clean residual min=-0.002166 max=0.001808 Jy/beam
! Clean residual mean=0.000024 rms=0.000475 Jy/beam
! Combined flux in latest and established models = 1.28011 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 128 components and 1.28011 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.419515Jy  sigma=0.001261
! Fit after  self-cal, rms=0.419519Jy  sigma=0.001261
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000238014 Jy
! Component: 100  -  total flux cleaned = -0.000459346 Jy
! Component: 150  -  total flux cleaned = -0.000561908 Jy
! Component: 200  -  total flux cleaned = -0.000704639 Jy
! Total flux subtracted in 200 components = -0.000704639 Jy
! Clean residual min=-0.002088 max=0.001809 Jy/beam
! Clean residual mean=0.000030 rms=0.000469 Jy/beam
! Combined flux in latest and established models = 1.27941 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 134 components and 1.27941 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.419502Jy  sigma=0.001261
! Fit after  self-cal, rms=0.419502Jy  sigma=0.001261
! 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.419502Jy  sigma=0.001261
! Fit after  self-cal, rms=0.435396Jy  sigma=0.001261
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.06 mas, bmaj=2.968 mas, bpa=-9.951 degrees
! Estimated noise=785.951 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.869585 Jy
! Component: 100  -  total flux cleaned = 1.05972 Jy
! Component: 150  -  total flux cleaned = 1.12235 Jy
! Component: 200  -  total flux cleaned = 1.16057 Jy
! Total flux subtracted in 200 components = 1.16057 Jy
! Clean residual min=-0.006057 max=0.020461 Jy/beam
! Clean residual mean=0.000039 rms=0.001718 Jy/beam
! Combined flux in latest and established models = 1.16057 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 24 model components to the UV plane model.
! The established model now contains 24 components and 1.16057 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.98 mas, bmaj=4.358 mas, bpa=-6.393 degrees
! Estimated noise=272.083 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.0441167 Jy
! Component: 100  -  total flux cleaned = 0.0655965 Jy
! Component: 150  -  total flux cleaned = 0.0784987 Jy
! Component: 200  -  total flux cleaned = 0.0871063 Jy
! Total flux subtracted in 200 components = 0.0871063 Jy
! Clean residual min=-0.002246 max=0.004787 Jy/beam
! Clean residual mean=0.000259 rms=0.000836 Jy/beam
! Combined flux in latest and established models = 1.24768 Jy
! Adding 71 model components to the UV plane model.
! The established model now contains 81 components and 1.24768 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0061405 Jy
! Component: 100  -  total flux cleaned = 0.0106889 Jy
! Component: 150  -  total flux cleaned = 0.0137177 Jy
! Component: 200  -  total flux cleaned = 0.0153217 Jy
! Total flux subtracted in 200 components = 0.0153217 Jy
! Clean residual min=-0.001937 max=0.002194 Jy/beam
! Clean residual mean=0.000145 rms=0.000545 Jy/beam
! Combined flux in latest and established models = 1.263 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 107 components and 1.263 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.912 mas, bmaj=8.301 mas, bpa=-4.189 degrees
! Estimated noise=352.458 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00459694 Jy
! Component: 100  -  total flux cleaned = 0.00729487 Jy
! Component: 150  -  total flux cleaned = 0.00912063 Jy
! Component: 200  -  total flux cleaned = 0.0100069 Jy
! Total flux subtracted in 200 components = 0.0100069 Jy
! Clean residual min=-0.002149 max=0.002248 Jy/beam
! Clean residual mean=0.000193 rms=0.000689 Jy/beam
! Combined flux in latest and established models = 1.27301 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.000581737 Jy
! Component: 100  -  total flux cleaned = 0.00106403 Jy
! Component: 150  -  total flux cleaned = 0.0014667 Jy
! Component: 200  -  total flux cleaned = 0.00183249 Jy
! Total flux subtracted in 200 components = 0.00183249 Jy
! Clean residual min=-0.002071 max=0.002101 Jy/beam
! Clean residual mean=0.000153 rms=0.000653 Jy/beam
! Combined flux in latest and established models = 1.27484 Jy
! Adding 83 model components to the UV plane model.
! The established model now contains 188 components and 1.27484 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.98 mas, bmaj=4.358 mas, bpa=-6.393 degrees
! Estimated noise=272.083 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00101184 Jy
! Component: 100  -  total flux cleaned = -0.000694957 Jy
! Component: 150  -  total flux cleaned = -0.000421549 Jy
! Component: 200  -  total flux cleaned = -2.55153e-06 Jy
! Total flux subtracted in 200 components = -2.55153e-06 Jy
! Clean residual min=-0.001823 max=0.001941 Jy/beam
! Clean residual mean=0.000057 rms=0.000457 Jy/beam
! Combined flux in latest and established models = 1.27484 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 192 components and 1.27484 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.435340Jy  sigma=0.001261
! Fit after  self-cal, rms=0.435325Jy  sigma=0.001261
wmodel J1640+3946_S_1999_03_08_pus_map.mod
! Writing 192 model components to file: J1640+3946_S_1999_03_08_pus_map.mod
wobs J1640+3946_S_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J1640+3946_S_1999_03_08_pus_uvs.fits
wwins J1640+3946_S_1999_03_08_pus_map.win
! wwins: Wrote 4 windows to J1640+3946_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.000347645 Jy
! Component: 100  -  total flux cleaned = 0.000467315 Jy
! Component: 150  -  total flux cleaned = 0.000468104 Jy
! Component: 200  -  total flux cleaned = 0.000468138 Jy
! Component: 250  -  total flux cleaned = 0.000495072 Jy
! Component: 300  -  total flux cleaned = 0.000469063 Jy
! Component: 350  -  total flux cleaned = 0.000468789 Jy
! Component: 400  -  total flux cleaned = 0.000468649 Jy
! Component: 450  -  total flux cleaned = 0.000517712 Jy
! Component: 500  -  total flux cleaned = 0.000565627 Jy
! Component: 550  -  total flux cleaned = 0.000612879 Jy
! Component: 600  -  total flux cleaned = 0.000636363 Jy
! Component: 650  -  total flux cleaned = 0.000729247 Jy
! Component: 700  -  total flux cleaned = 0.000797779 Jy
! Component: 750  -  total flux cleaned = 0.000865631 Jy
! Component: 800  -  total flux cleaned = 0.000910229 Jy
! Component: 850  -  total flux cleaned = 0.000954744 Jy
! Component: 900  -  total flux cleaned = 0.00102105 Jy
! Component: 950  -  total flux cleaned = 0.00110851 Jy
! Component: 1000  -  total flux cleaned = 0.00119502 Jy
! Component: 1050  -  total flux cleaned = 0.00128056 Jy
! Component: 1100  -  total flux cleaned = 0.0013229 Jy
! Component: 1150  -  total flux cleaned = 0.00138609 Jy
! Component: 1200  -  total flux cleaned = 0.00146975 Jy
! Component: 1250  -  total flux cleaned = 0.00151106 Jy
! Component: 1300  -  total flux cleaned = 0.00161396 Jy
! Component: 1350  -  total flux cleaned = 0.00163437 Jy
! Component: 1400  -  total flux cleaned = 0.00169526 Jy
! Component: 1450  -  total flux cleaned = 0.00175574 Jy
! Component: 1500  -  total flux cleaned = 0.00183586 Jy
! Component: 1550  -  total flux cleaned = 0.00193514 Jy
! Component: 1600  -  total flux cleaned = 0.00197454 Jy
! Component: 1650  -  total flux cleaned = 0.00205282 Jy
! Component: 1700  -  total flux cleaned = 0.00211104 Jy
! Component: 1750  -  total flux cleaned = 0.00216886 Jy
! Component: 1800  -  total flux cleaned = 0.00218813 Jy
! Component: 1850  -  total flux cleaned = 0.00224543 Jy
! Component: 1900  -  total flux cleaned = 0.0022834 Jy
! Component: 1950  -  total flux cleaned = 0.00237768 Jy
! Component: 2000  -  total flux cleaned = 0.00241516 Jy
! Total flux subtracted in 2048 components = 0.00247103 Jy
! Clean residual min=-0.001117 max=0.001251 Jy/beam
! Clean residual mean=0.000039 rms=0.000358 Jy/beam
! Combined flux in latest and established models = 1.27731 Jy
keep
! Adding 132 model components to the UV plane model.
! The established model now contains 323 components and 1.27731 Jy
![Exited script file: muppet]
wmap "J1640+3946_S_1999_03_08_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.98 x 4.358 at -6.393 degrees (North through East)
! Clean map  min=-0.0015099  max=1.1607 Jy/beam
! Writing clean map to FITS file: J1640+3946_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 1.16066 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000357374 
device "J1640+3946_S_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J1640+3946_S_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0923719 0.0923719 0.184744 0.369488 0.738975 1.47795 2.9559 5.9118 11.8236 23.6472 47.2944 94.5888
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.16 
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.98 x 4.358 at -6.393 degrees (North through East)
! Clean map  min=-0.0015099  max=1.1607 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1640+3946_S_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J1640+3946_S_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1640+3946_S_1999_03_08_pus_uvs.log closed on Tue Jan  8 18:31:20 2008