! Started logfile: J1407+2827_S_2001_07_05_pus_uvs.log on Fri Aug 10 01:31:02 2007
obs J1407+2827_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J1407+2827_S_2001_07_05_pus_uva.fits
! AN table 1: 94 integrations on 171 of 171 possible baselines.
! AN table 2: 242 integrations on 171 of 171 possible baselines.
! AN table 3: 34 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.26074 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1407+2827
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1774 lines of history.
! 
! Reading 65988 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 1367 telescope corrections were flagged in sub-array 1.
!  A total of 2029 telescope corrections were flagged in sub-array 2.
!  A total of 395 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1367 telescope corrections were flagged in sub-array 1.
!  A total of 2029 telescope corrections were flagged in sub-array 2.
!  A total of 395 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1367 telescope corrections were flagged in sub-array 1.
!  A total of 2029 telescope corrections were flagged in sub-array 2.
!  A total of 395 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1367 telescope corrections were flagged in sub-array 1.
!  A total of 2028 telescope corrections were flagged in sub-array 2.
!  A total of 395 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.092282Jy  sigma=0.009736
! Fit after  self-cal, rms=0.420986Jy  sigma=0.003385
! 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.992 mas, bmaj=3.125 mas, bpa=-2.524 degrees
! Estimated noise=709.136 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.709573 Jy
! Component: 100  -  total flux cleaned = 0.961061 Jy
! Total flux subtracted in 100 components = 0.961061 Jy
! Clean residual min=-0.030040 max=0.126312 Jy/beam
! Clean residual mean=0.000274 rms=0.009146 Jy/beam
! Combined flux in latest and established models = 0.961061 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 15 components and 0.961061 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409027Jy  sigma=0.003468
! Fit after  self-cal, rms=0.408608Jy  sigma=0.003465
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.15526 Jy
! Component: 100  -  total flux cleaned = 0.257612 Jy
! Total flux subtracted in 100 components = 0.257612 Jy
! Clean residual min=-0.022846 max=0.055821 Jy/beam
! Clean residual mean=0.000135 rms=0.005514 Jy/beam
! Combined flux in latest and established models = 1.21867 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 24 components and 1.21867 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.301839Jy  sigma=0.002268
! Fit after  self-cal, rms=0.301526Jy  sigma=0.002266
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0708763 Jy
! Component: 100  -  total flux cleaned = 0.120575 Jy
! Total flux subtracted in 100 components = 0.120575 Jy
! Clean residual min=-0.020009 max=0.042461 Jy/beam
! Clean residual mean=0.000070 rms=0.004365 Jy/beam
! Combined flux in latest and established models = 1.33925 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 31 components and 1.33925 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273235Jy  sigma=0.001926
! Fit after  self-cal, rms=0.273159Jy  sigma=0.001925
! Inverting map 
! Added new window around map position (-6, -4.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0421093 Jy
! Component: 100  -  total flux cleaned = 0.0721641 Jy
! Total flux subtracted in 100 components = 0.0721641 Jy
! Clean residual min=-0.017660 max=0.019894 Jy/beam
! Clean residual mean=0.000034 rms=0.003883 Jy/beam
! Combined flux in latest and established models = 1.41141 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 33 components and 1.41141 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.263784Jy  sigma=0.001820
! Fit after  self-cal, rms=0.263547Jy  sigma=0.001818
! 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.632 mas, bmaj=4.31 mas, bpa=-4.585 degrees
! Estimated noise=323.274 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.0292795 Jy
! Component: 100  -  total flux cleaned = 0.0466411 Jy
! Component: 150  -  total flux cleaned = 0.0579071 Jy
! Component: 200  -  total flux cleaned = 0.0640615 Jy
! Total flux subtracted in 200 components = 0.0640615 Jy
! Clean residual min=-0.014449 max=0.013485 Jy/beam
! Clean residual mean=0.000134 rms=0.003533 Jy/beam
! Combined flux in latest and established models = 1.47547 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 49 components and 1.47547 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.259755Jy  sigma=0.001783
! Fit after  self-cal, rms=0.259622Jy  sigma=0.001782
! 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        1.05     FD        1.06     GC        1.99     GG        1.00*    
!   HH        1.54     HN        0.92     KK        1.00*    KP        1.00*    
!   LA        1.09     MC        1.28     MK        1.00*    NL        0.89     
!   NY        0.99     OV        1.00*    PT        1.03     SC        0.93     
!   TS        1.00*    WF        0.99     WZ        1.00*    
! 
!  A total of 24 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.01     KP        0.99     
!   LA        1.02     MC        1.04     MK        1.01     NL        1.01     
!   NY        1.04     OV        1.01     PT        0.99     SC        1.00     
!   TS        1.05     WF        1.02     WZ        1.09     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.02     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.05     KP        0.66     
!   LA        1.03     MC        1.00*    MK        1.02     NL        1.06     
!   NY        1.03     OV        0.98     PT        1.00     SC        1.00*    
!   TS        1.02     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.04     GC        1.88     GG        1.00*    
!   HH        1.53     HN        0.93     KK        1.00*    KP        1.00*    
!   LA        1.05     MC        2.05     MK        1.00*    NL        0.89     
!   NY        1.00     OV        1.00*    PT        1.04     SC        0.96     
!   TS        1.00*    WF        1.03     WZ        1.00*    
! 
!  A total of 24 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.01     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        0.99     KP        1.01     
!   LA        0.97     MC        0.98     MK        0.97     NL        0.98     
!   NY        1.02     OV        1.02     PT        1.01     SC        1.02     
!   TS        1.02     WF        1.00     WZ        1.04     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.01     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.03     KP        0.61     
!   LA        0.99     MC        1.00*    MK        0.98     NL        1.01     
!   NY        1.01     OV        1.01     PT        1.02     SC        1.00*    
!   TS        0.98     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 63 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.08     FD        1.00     GC        1.92     GG        1.00*    
!   HH        1.80     HN        1.03     KK        1.00*    KP        1.00*    
!   LA        1.04     MC        1.39     MK        1.00*    NL        0.92     
!   NY        0.96     OV        1.00*    PT        1.03     SC        0.94     
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 24 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.96     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.03     KP        1.03     
!   LA        1.00     MC        1.07     MK        0.98     NL        1.00     
!   NY        1.06     OV        1.03     PT        1.03     SC        0.99     
!   TS        1.03     WF        1.00     WZ        1.05     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        0.97     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        0.81     
!   LA        1.00     MC        1.00*    MK        0.98     NL        1.05     
!   NY        1.04     OV        1.02     PT        0.99     SC        1.00*    
!   TS        0.96     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  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.81     GG        1.00*    
!   HH        2.11     HN        0.88     KK        1.00*    KP        1.00*    
!   LA        1.04     MC        1.58     MK        1.00*    NL        0.88     
!   NY        0.98     OV        1.00*    PT        1.04     SC        0.94     
!   TS        1.00*    WF        1.01     WZ        1.00*    
! 
!  A total of 24 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.98     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.89     KK        0.99     KP        1.04     
!   LA        0.99     MC        1.15     MK        0.96     NL        0.99     
!   NY        1.06     OV        0.97     PT        1.18     SC        0.99     
!   TS        1.03     WF        1.00     WZ        1.03     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.01     KP        0.69     
!   LA        0.98     MC        1.00*    MK        0.98     NL        1.02     
!   NY        1.05     OV        0.98     PT        1.04     SC        1.00*    
!   TS        0.96     WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.259622Jy  sigma=0.001782
! Fit after  self-cal, rms=0.255582Jy  sigma=0.001577
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.656 mas, bmaj=4.409 mas, bpa=-5.441 degrees
! Estimated noise=326.312 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.00609114 Jy
! Component: 100  -  total flux cleaned = 0.00641643 Jy
! Component: 150  -  total flux cleaned = 0.00720015 Jy
! Component: 200  -  total flux cleaned = 0.00752623 Jy
! Total flux subtracted in 200 components = 0.00752623 Jy
! Clean residual min=-0.009605 max=0.009224 Jy/beam
! Clean residual mean=0.000030 rms=0.002297 Jy/beam
! Combined flux in latest and established models = 1.483 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 56 components and 1.483 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.255205Jy  sigma=0.001573
! Fit after  self-cal, rms=0.255919Jy  sigma=0.001572
! 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.255919Jy  sigma=0.001572
! Fit after  self-cal, rms=0.249773Jy  sigma=0.001479
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.654 mas, bmaj=4.409 mas, bpa=-5.271 degrees
! Estimated noise=326.389 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00467514 Jy
! Component: 100  -  total flux cleaned = 0.00465452 Jy
! Component: 150  -  total flux cleaned = 0.00464789 Jy
! Component: 200  -  total flux cleaned = 0.00473616 Jy
! Total flux subtracted in 200 components = 0.00473616 Jy
! Clean residual min=-0.005047 max=0.004046 Jy/beam
! Clean residual mean=-0.000014 rms=0.000741 Jy/beam
! Combined flux in latest and established models = 1.48773 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 62 components and 1.48773 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249556Jy  sigma=0.001478
! Fit after  self-cal, rms=0.249578Jy  sigma=0.001477
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.000771578 Jy
! Component: 100  -  total flux cleaned = 0.000770997 Jy
! Component: 150  -  total flux cleaned = 0.00084687 Jy
! Component: 200  -  total flux cleaned = 0.000921465 Jy
! Total flux subtracted in 200 components = 0.000921465 Jy
! Clean residual min=-0.005067 max=0.004071 Jy/beam
! Clean residual mean=-0.000018 rms=0.000731 Jy/beam
! Combined flux in latest and established models = 1.48866 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 66 components and 1.48866 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249504Jy  sigma=0.001477
! Fit after  self-cal, rms=0.249505Jy  sigma=0.001477
! 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.249505Jy  sigma=0.001477
! Fit after  self-cal, rms=0.249089Jy  sigma=0.001477
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.653 mas, bmaj=4.405 mas, bpa=-5.271 degrees
! Estimated noise=326.553 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00312497 Jy
! Component: 100  -  total flux cleaned = 0.00359446 Jy
! Component: 150  -  total flux cleaned = 0.00366905 Jy
! Component: 200  -  total flux cleaned = 0.00373812 Jy
! Total flux subtracted in 200 components = 0.00373812 Jy
! Clean residual min=-0.004883 max=0.004031 Jy/beam
! Clean residual mean=-0.000018 rms=0.000710 Jy/beam
! Combined flux in latest and established models = 1.49239 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 66 components and 1.49239 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249001Jy  sigma=0.001476
! Fit after  self-cal, rms=0.248997Jy  sigma=0.001476
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.000403624 Jy
! Component: 100  -  total flux cleaned = 0.000468962 Jy
! Component: 150  -  total flux cleaned = 0.000469757 Jy
! Component: 200  -  total flux cleaned = 0.000534578 Jy
! Total flux subtracted in 200 components = 0.000534578 Jy
! Clean residual min=-0.004809 max=0.004050 Jy/beam
! Clean residual mean=-0.000020 rms=0.000707 Jy/beam
! Combined flux in latest and established models = 1.49293 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 67 components and 1.49293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248948Jy  sigma=0.001476
! Fit after  self-cal, rms=0.248951Jy  sigma=0.001476
! 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.248951Jy  sigma=0.001476
! Fit after  self-cal, rms=0.248628Jy  sigma=0.001476
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.664 mas, bmaj=8.782 mas, bpa=3.625 degrees
! Estimated noise=443.31 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00257704 Jy
! Component: 100  -  total flux cleaned = 0.00262412 Jy
! Component: 150  -  total flux cleaned = 0.00268811 Jy
! Component: 200  -  total flux cleaned = 0.00263509 Jy
! Total flux subtracted in 200 components = 0.00263509 Jy
! Clean residual min=-0.003482 max=0.004988 Jy/beam
! Clean residual mean=-0.000055 rms=0.001006 Jy/beam
! Combined flux in latest and established models = 1.49556 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 74 components and 1.49556 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248613Jy  sigma=0.001476
! Fit after  self-cal, rms=0.248599Jy  sigma=0.001476
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 (-31.5, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00464934 Jy
! Component: 100  -  total flux cleaned = 0.00729799 Jy
! Component: 150  -  total flux cleaned = 0.00853694 Jy
! Component: 200  -  total flux cleaned = 0.00921849 Jy
! Total flux subtracted in 200 components = 0.00921849 Jy
! Clean residual min=-0.003012 max=0.002214 Jy/beam
! Clean residual mean=-0.000154 rms=0.000734 Jy/beam
! Combined flux in latest and established models = 1.50478 Jy
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 112 components and 1.50478 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248551Jy  sigma=0.001475
! Fit after  self-cal, rms=0.248546Jy  sigma=0.001475
! 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.652 mas, bmaj=4.401 mas, bpa=-5.267 degrees
! Estimated noise=326.709 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.652 x 4.401 at -5.267 degrees (North through East)
! Clean map  min=-0.0025022  max=1.0704 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.248546Jy  sigma=0.001475
! Fit after  self-cal, rms=0.317531Jy  sigma=0.001315
! Inverting map and beam 
! Estimated beam: bmin=2.652 mas, bmaj=4.397 mas, bpa=-5.279 degrees
! Estimated noise=326.48 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00190145 Jy
! Component: 100  -  total flux cleaned = 0.00235909 Jy
! Component: 150  -  total flux cleaned = 0.00244816 Jy
! Component: 200  -  total flux cleaned = 0.0025298 Jy
! Total flux subtracted in 200 components = 0.0025298 Jy
! Clean residual min=-0.004305 max=0.002087 Jy/beam
! Clean residual mean=0.000010 rms=0.000562 Jy/beam
! Combined flux in latest and established models = 1.50731 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 139 components and 1.50731 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317470Jy  sigma=0.001315
! Fit after  self-cal, rms=0.317470Jy  sigma=0.001315
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000644363 Jy
! Component: 100  -  total flux cleaned = 0.0006454 Jy
! Component: 150  -  total flux cleaned = 0.000645136 Jy
! Component: 200  -  total flux cleaned = 0.000645542 Jy
! Total flux subtracted in 200 components = 0.000645542 Jy
! Clean residual min=-0.004355 max=0.002055 Jy/beam
! Clean residual mean=0.000008 rms=0.000551 Jy/beam
! Combined flux in latest and established models = 1.50796 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 153 components and 1.50796 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317431Jy  sigma=0.001314
! Fit after  self-cal, rms=0.317429Jy  sigma=0.001314
! 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.317429Jy  sigma=0.001314
! Fit after  self-cal, rms=0.319186Jy  sigma=0.001314
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.017 mas, bmaj=3.269 mas, bpa=-4.476 degrees
! Estimated noise=731.676 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.725829 Jy
! Component: 100  -  total flux cleaned = 0.974691 Jy
! Component: 150  -  total flux cleaned = 1.12589 Jy
! Component: 200  -  total flux cleaned = 1.22457 Jy
! Total flux subtracted in 200 components = 1.22457 Jy
! Clean residual min=-0.014382 max=0.053924 Jy/beam
! Clean residual mean=0.000148 rms=0.004421 Jy/beam
! Combined flux in latest and established models = 1.22457 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 23 model components to the UV plane model.
! The established model now contains 23 components and 1.22457 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.651 mas, bmaj=4.394 mas, bpa=-5.275 degrees
! Estimated noise=326.466 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.107946 Jy
! Component: 100  -  total flux cleaned = 0.169671 Jy
! Component: 150  -  total flux cleaned = 0.207256 Jy
! Component: 200  -  total flux cleaned = 0.230739 Jy
! Total flux subtracted in 200 components = 0.230739 Jy
! Clean residual min=-0.004132 max=0.013322 Jy/beam
! Clean residual mean=0.000209 rms=0.001551 Jy/beam
! Combined flux in latest and established models = 1.4553 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 57 components and 1.4553 Jy
! Inverting map 
! Added new window around map position (2, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0154162 Jy
! Component: 100  -  total flux cleaned = 0.0203296 Jy
! Component: 150  -  total flux cleaned = 0.0237052 Jy
! Component: 200  -  total flux cleaned = 0.0266163 Jy
! Total flux subtracted in 200 components = 0.0266163 Jy
! Clean residual min=-0.004999 max=0.006169 Jy/beam
! Clean residual mean=0.000105 rms=0.000893 Jy/beam
! Combined flux in latest and established models = 1.48192 Jy
! Adding 20 model components to the UV plane model.
! The established model now contains 66 components and 1.48192 Jy
! Inverting map 
! Added new window around map position (-2, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00297641 Jy
! Component: 100  -  total flux cleaned = 0.00519229 Jy
! Component: 150  -  total flux cleaned = 0.00717044 Jy
! Component: 200  -  total flux cleaned = 0.00875595 Jy
! Total flux subtracted in 200 components = 0.00875595 Jy
! Clean residual min=-0.003167 max=0.004078 Jy/beam
! Clean residual mean=0.000071 rms=0.000743 Jy/beam
! Combined flux in latest and established models = 1.49068 Jy
! Adding 22 model components to the UV plane model.
! The established model now contains 75 components and 1.49068 Jy
! Inverting map 
! Added new window around map position (-7.5, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00141976 Jy
! Component: 100  -  total flux cleaned = 0.00229557 Jy
! Component: 150  -  total flux cleaned = 0.00295475 Jy
! Component: 200  -  total flux cleaned = 0.00390137 Jy
! Total flux subtracted in 200 components = 0.00390137 Jy
! Clean residual min=-0.002913 max=0.003286 Jy/beam
! Clean residual mean=0.000055 rms=0.000673 Jy/beam
! Combined flux in latest and established models = 1.49458 Jy
! Adding 25 model components to the UV plane model.
! The established model now contains 83 components and 1.49458 Jy
! Inverting map 
! Added new window around map position (-6.5, -8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00130388 Jy
! Component: 100  -  total flux cleaned = 0.00187162 Jy
! Component: 150  -  total flux cleaned = 0.00228287 Jy
! Component: 200  -  total flux cleaned = 0.00280934 Jy
! Total flux subtracted in 200 components = 0.00280934 Jy
! Clean residual min=-0.002673 max=0.002450 Jy/beam
! Clean residual mean=0.000045 rms=0.000626 Jy/beam
! Combined flux in latest and established models = 1.49739 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 97 components and 1.49739 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.663 mas, bmaj=8.781 mas, bpa=3.571 degrees
! Estimated noise=443.253 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0040931 Jy
! Component: 100  -  total flux cleaned = 0.00667961 Jy
! Component: 150  -  total flux cleaned = 0.00830661 Jy
! Component: 200  -  total flux cleaned = 0.00924153 Jy
! Total flux subtracted in 200 components = 0.00924153 Jy
! Clean residual min=-0.002498 max=0.001791 Jy/beam
! Clean residual mean=0.000039 rms=0.000545 Jy/beam
! Combined flux in latest and established models = 1.50663 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.000686555 Jy
! Component: 100  -  total flux cleaned = 0.0011886 Jy
! Component: 150  -  total flux cleaned = 0.00155349 Jy
! Component: 200  -  total flux cleaned = 0.00191177 Jy
! Total flux subtracted in 200 components = 0.00191177 Jy
! Clean residual min=-0.002150 max=0.001824 Jy/beam
! Clean residual mean=0.000019 rms=0.000500 Jy/beam
! Combined flux in latest and established models = 1.50854 Jy
! Adding 91 model components to the UV plane model.
! The established model now contains 184 components and 1.50854 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.651 mas, bmaj=4.394 mas, bpa=-5.275 degrees
! Estimated noise=326.466 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00122091 Jy
! Component: 100  -  total flux cleaned = -0.00110012 Jy
! Component: 150  -  total flux cleaned = -0.000986832 Jy
! Component: 200  -  total flux cleaned = -0.000877364 Jy
! Total flux subtracted in 200 components = -0.000877364 Jy
! Clean residual min=-0.002371 max=0.002136 Jy/beam
! Clean residual mean=0.000010 rms=0.000554 Jy/beam
! Combined flux in latest and established models = 1.50766 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 189 components and 1.50766 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319399Jy  sigma=0.001315
! Fit after  self-cal, rms=0.319558Jy  sigma=0.001314
wmodel J1407+2827_S_2001_07_05_pus_map.mod
! Writing 189 model components to file: J1407+2827_S_2001_07_05_pus_map.mod
wobs J1407+2827_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J1407+2827_S_2001_07_05_pus_uvs.fits
wwins J1407+2827_S_2001_07_05_pus_map.win
! wwins: Wrote 7 windows to J1407+2827_S_2001_07_05_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.000224058 Jy
! Component: 100  -  total flux cleaned = -0.000144249 Jy
! Component: 150  -  total flux cleaned = -0.000106094 Jy
! Component: 200  -  total flux cleaned = -3.12599e-05 Jy
! Component: 250  -  total flux cleaned = 4.20575e-05 Jy
! Component: 300  -  total flux cleaned = 0.000114205 Jy
! Component: 350  -  total flux cleaned = 0.000220771 Jy
! Component: 400  -  total flux cleaned = 0.0002908 Jy
! Component: 450  -  total flux cleaned = 0.000221415 Jy
! Component: 500  -  total flux cleaned = 0.000325191 Jy
! Component: 550  -  total flux cleaned = 0.000325316 Jy
! Component: 600  -  total flux cleaned = 0.000325358 Jy
! Component: 650  -  total flux cleaned = 0.000358971 Jy
! Component: 700  -  total flux cleaned = 0.000292157 Jy
! Component: 750  -  total flux cleaned = 0.000292374 Jy
! Component: 800  -  total flux cleaned = 0.000357868 Jy
! Component: 850  -  total flux cleaned = 0.000292808 Jy
! Component: 900  -  total flux cleaned = 0.000325551 Jy
! Component: 950  -  total flux cleaned = 0.000357795 Jy
! Component: 1000  -  total flux cleaned = 0.000357762 Jy
! Component: 1050  -  total flux cleaned = 0.000421018 Jy
! Component: 1100  -  total flux cleaned = 0.000483725 Jy
! Component: 1150  -  total flux cleaned = 0.000483498 Jy
! Component: 1200  -  total flux cleaned = 0.000483623 Jy
! Component: 1250  -  total flux cleaned = 0.000514486 Jy
! Component: 1300  -  total flux cleaned = 0.00048385 Jy
! Component: 1350  -  total flux cleaned = 0.000575387 Jy
! Component: 1400  -  total flux cleaned = 0.000605735 Jy
! Component: 1450  -  total flux cleaned = 0.000635846 Jy
! Component: 1500  -  total flux cleaned = 0.000666071 Jy
! Component: 1550  -  total flux cleaned = 0.000725973 Jy
! Component: 1600  -  total flux cleaned = 0.000755793 Jy
! Component: 1650  -  total flux cleaned = 0.000785334 Jy
! Component: 1700  -  total flux cleaned = 0.000844044 Jy
! Component: 1750  -  total flux cleaned = 0.000873023 Jy
! Component: 1800  -  total flux cleaned = 0.000873152 Jy
! Component: 1850  -  total flux cleaned = 0.000930922 Jy
! Component: 1900  -  total flux cleaned = 0.00101658 Jy
! Component: 1950  -  total flux cleaned = 0.00104521 Jy
! Component: 2000  -  total flux cleaned = 0.00110165 Jy
! Total flux subtracted in 2048 components = 0.00110194 Jy
! Clean residual min=-0.001758 max=0.001598 Jy/beam
! Clean residual mean=0.000006 rms=0.000477 Jy/beam
! Combined flux in latest and established models = 1.50877 Jy
keep
! Adding 109 model components to the UV plane model.
! The established model now contains 281 components and 1.50877 Jy
wmap "J1407+2827_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.651 x 4.394 at -5.275 degrees (North through East)
! Clean map  min=-0.0018974  max=1.0705 Jy/beam
! Writing clean map to FITS file: J1407+2827_S_2001_07_05_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.07047 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000477468 
device "J1407+2827_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J1407+2827_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.13381 0.13381 0.267621 0.535242 1.07048 2.14097 4.28193 8.56387 17.1277 34.2555 68.511
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.07 
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.651 x 4.394 at -5.275 degrees (North through East)
! Clean map  min=-0.0018974  max=1.0705 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1407+2827_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J1407+2827_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1407+2827_S_2001_07_05_pus_uvs.log closed on Fri Aug 10 01:33:41 2007