! Started logfile: J0927+3902_S_2001_07_05_pus_uvs.log on Fri Aug 10 00:47:06 2007
obs J0927+3902_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0927+3902_S_2001_07_05_pus_uva.fits
! AN table 1: 299 integrations on 171 of 171 possible baselines.
! AN table 2: 36 integrations on 171 of 171 possible baselines.
! AN table 3: 83 integrations on 171 of 171 possible baselines.
! AN table 4: 105 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.240471 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0927+3902
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1774 lines of history.
! 
! Reading 86024 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 2806 telescope corrections were flagged in sub-array 1.
!  A total of 304 telescope corrections were flagged in sub-array 2.
!  A total of 953 telescope corrections were flagged in sub-array 3.
!  A total of 1497 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 2808 telescope corrections were flagged in sub-array 1.
!  A total of 304 telescope corrections were flagged in sub-array 2.
!  A total of 953 telescope corrections were flagged in sub-array 3.
!  A total of 1499 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 2826 telescope corrections were flagged in sub-array 1.
!  A total of 304 telescope corrections were flagged in sub-array 2.
!  A total of 953 telescope corrections were flagged in sub-array 3.
!  A total of 1499 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 2849 telescope corrections were flagged in sub-array 1.
!  A total of 304 telescope corrections were flagged in sub-array 2.
!  A total of 953 telescope corrections were flagged in sub-array 3.
!  A total of 1498 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=3.131774Jy  sigma=0.025203
! Fit after  self-cal, rms=2.784598Jy  sigma=0.022404
! 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.906 mas, bmaj=2.91 mas, bpa=0.01064 degrees
! Estimated noise=756.851 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 = 2.62603 Jy
! Component: 100  -  total flux cleaned = 3.38288 Jy
! Total flux subtracted in 100 components = 3.38288 Jy
! Clean residual min=-0.056933 max=0.345209 Jy/beam
! Clean residual mean=0.000458 rms=0.017390 Jy/beam
! Combined flux in latest and established models = 3.38288 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 3.38288 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.899748Jy  sigma=0.006104
! Fit after  self-cal, rms=0.899336Jy  sigma=0.006103
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.374754 Jy
! Component: 100  -  total flux cleaned = 0.572603 Jy
! Total flux subtracted in 100 components = 0.572603 Jy
! Clean residual min=-0.037415 max=0.101614 Jy/beam
! Clean residual mean=0.000163 rms=0.008835 Jy/beam
! Combined flux in latest and established models = 3.95549 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 14 components and 3.95549 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.688409Jy  sigma=0.003556
! Fit after  self-cal, rms=0.686526Jy  sigma=0.003539
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.125538 Jy
! Component: 100  -  total flux cleaned = 0.204969 Jy
! Total flux subtracted in 100 components = 0.204969 Jy
! Clean residual min=-0.030315 max=0.046212 Jy/beam
! Clean residual mean=0.000057 rms=0.007003 Jy/beam
! Combined flux in latest and established models = 4.16046 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 18 components and 4.16046 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.662875Jy  sigma=0.003117
! Fit after  self-cal, rms=0.662648Jy  sigma=0.003115
! Inverting map 
! Added new window around map position (-2, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0556966 Jy
! Component: 100  -  total flux cleaned = 0.0927657 Jy
! Total flux subtracted in 100 components = 0.0927657 Jy
! Clean residual min=-0.026668 max=0.027033 Jy/beam
! Clean residual mean=0.000010 rms=0.006575 Jy/beam
! Combined flux in latest and established models = 4.25322 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 22 components and 4.25322 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.661284Jy  sigma=0.003057
! Fit after  self-cal, rms=0.661180Jy  sigma=0.003055
! 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.37 mas, bmaj=4.167 mas, bpa=-5.085 degrees
! Estimated noise=316.298 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.0203398 Jy
! Component: 100  -  total flux cleaned = -0.0232028 Jy
! Component: 150  -  total flux cleaned = -0.0254719 Jy
! Component: 200  -  total flux cleaned = -0.0262758 Jy
! Total flux subtracted in 200 components = -0.0262758 Jy
! Clean residual min=-0.032340 max=0.030750 Jy/beam
! Clean residual mean=-0.001217 rms=0.008712 Jy/beam
! Combined flux in latest and established models = 4.22695 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 26 components and 4.22695 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.660341Jy  sigma=0.003047
! Fit after  self-cal, rms=0.660248Jy  sigma=0.003046
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 36 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.01     GC        0.99     GG        1.00*    
!   HH        1.05     HN        0.97     KK        0.99     KP        1.07     
!   LA        1.03     MC        0.99     MK        1.02     NL        1.00     
!   NY        1.01     OV        1.00     PT        0.99     SC        1.03     
!   TS        1.03     WF        1.04     WZ        1.03     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.99     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.07     KP        1.04     
!   LA        1.01     MC        1.12     MK        1.05     NL        0.98     
!   NY        1.01     OV        1.00     PT        0.99     SC        1.02     
!   TS        1.00*    WF        1.03     WZ        1.10     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.08     FD        1.12     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.00*    KP        1.00*    
!   LA        1.09     MC        1.00*    MK        1.00*    NL        1.04     
!   NY        1.00*    OV        1.00*    PT        1.10     SC        1.00*    
!   TS        1.00*    WF        1.00     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.00     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.04     KP        0.98     
!   LA        1.00     MC        1.07     MK        1.02     NL        0.98     
!   NY        1.02     OV        1.00     PT        0.97     SC        1.00*    
!   TS        1.01     WF        1.05     WZ        1.11     
! 
! 
! Correcting IF 2.
!  A total of 39 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.02     GC        0.94     GG        1.00*    
!   HH        1.13     HN        0.96     KK        0.97     KP        1.01     
!   LA        0.98     MC        0.96     MK        0.98     NL        0.96     
!   NY        1.00     OV        1.02     PT        1.01     SC        1.04     
!   TS        1.00     WF        1.01     WZ        0.98     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.00     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.91     KK        1.06     KP        0.96     
!   LA        0.96     MC        1.03     MK        1.02     NL        0.95     
!   NY        1.00     OV        1.02     PT        0.99     SC        1.03     
!   TS        1.00*    WF        1.00     WZ        1.06     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.07     FD        1.12     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        1.00*    
!   LA        1.04     MC        1.00*    MK        1.00*    NL        1.01     
!   NY        1.00*    OV        1.00*    PT        1.13     SC        1.00*    
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.00     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.04     KP        0.95     
!   LA        0.95     MC        1.10     MK        0.99     NL        0.95     
!   NY        1.01     OV        1.02     PT        0.99     SC        1.00*    
!   TS        0.98     WF        1.03     WZ        1.08     
! 
! 
! Correcting IF 3.
!  A total of 33 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.95     GC        0.97     GG        1.00*    
!   HH        1.05     HN        1.02     KK        0.98     KP        1.07     
!   LA        0.99     MC        1.06     MK        0.99     NL        0.99     
!   NY        0.99     OV        1.02     PT        0.98     SC        1.00     
!   TS        0.99     WF        0.98     WZ        0.98     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.93     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.66     KP        1.03     
!   LA        0.98     MC        1.02     MK        1.02     NL        0.99     
!   NY        0.99     OV        1.00     PT        0.99     SC        0.99     
!   TS        1.00*    WF        1.06     WZ        1.06     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.07     FD        1.03     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.00*    KP        1.00*    
!   LA        1.05     MC        1.00*    MK        1.00*    NL        1.02     
!   NY        1.00*    OV        1.00*    PT        1.08     SC        1.00*    
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        0.92     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.05     KP        1.01     
!   LA        0.97     MC        0.98     MK        1.00     NL        0.98     
!   NY        1.01     OV        1.00     PT        0.96     SC        1.00*    
!   TS        0.97     WF        1.10     WZ        1.08     
! 
! 
! Correcting IF 4.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.97     GC        0.93     GG        1.00*    
!   HH        0.91     HN        0.90     KK        0.94     KP        1.13     
!   LA        0.98     MC        1.10     MK        0.95     NL        0.96     
!   NY        0.99     OV        0.95     PT        0.97     SC        1.00     
!   TS        0.99     WF        1.01     WZ        0.96     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        0.96     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.86     KK        0.91     KP        1.04     
!   LA        0.98     MC        1.28     MK        1.01     NL        0.95     
!   NY        1.00     OV        0.95     PT        1.12     SC        0.99     
!   TS        1.00*    WF        0.99     WZ        1.04     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.07     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.00*    KP        1.00*    
!   LA        1.04     MC        1.00*    MK        1.00*    NL        1.00     
!   NY        1.00*    OV        1.00*    PT        1.13     SC        1.00*    
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.96     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        0.98     KP        1.00     
!   LA        0.96     MC        1.03     MK        0.99     NL        0.95     
!   NY        1.02     OV        0.95     PT        0.96     SC        1.00*    
!   TS        0.97     WF        1.01     WZ        1.12     
! 
! 
! Fit before self-cal, rms=0.660248Jy  sigma=0.003046
! Fit after  self-cal, rms=0.612510Jy  sigma=0.002329
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.371 mas, bmaj=4.178 mas, bpa=-5.054 degrees
! Estimated noise=316.236 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (4, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0195327 Jy
! Component: 100  -  total flux cleaned = 0.0204462 Jy
! Component: 150  -  total flux cleaned = 0.0204483 Jy
! Component: 200  -  total flux cleaned = 0.0207596 Jy
! Total flux subtracted in 200 components = 0.0207596 Jy
! Clean residual min=-0.017890 max=0.014043 Jy/beam
! Clean residual mean=-0.000230 rms=0.003908 Jy/beam
! Combined flux in latest and established models = 4.24771 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 43 components and 4.24771 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.611692Jy  sigma=0.002316
! Fit after  self-cal, rms=0.611783Jy  sigma=0.002315
! 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.611783Jy  sigma=0.002315
! Fit after  self-cal, rms=0.581453Jy  sigma=0.002033
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.37 mas, bmaj=4.179 mas, bpa=-5.108 degrees
! Estimated noise=316.63 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0172977 Jy
! Component: 100  -  total flux cleaned = 0.0256714 Jy
! Component: 150  -  total flux cleaned = 0.0275073 Jy
! Component: 200  -  total flux cleaned = 0.0280775 Jy
! Total flux subtracted in 200 components = 0.0280775 Jy
! Clean residual min=-0.005338 max=0.006111 Jy/beam
! Clean residual mean=0.000396 rms=0.001565 Jy/beam
! Combined flux in latest and established models = 4.27578 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 62 components and 4.27578 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.580875Jy  sigma=0.002024
! Fit after  self-cal, rms=0.581133Jy  sigma=0.002023
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.00168994 Jy
! Component: 100  -  total flux cleaned = 0.00201357 Jy
! Component: 150  -  total flux cleaned = 0.00215852 Jy
! Component: 200  -  total flux cleaned = 0.00216036 Jy
! Total flux subtracted in 200 components = 0.00216036 Jy
! Clean residual min=-0.005246 max=0.006066 Jy/beam
! Clean residual mean=0.000364 rms=0.001515 Jy/beam
! Combined flux in latest and established models = 4.27794 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 67 components and 4.27794 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.581044Jy  sigma=0.002022
! Fit after  self-cal, rms=0.581044Jy  sigma=0.002022
! 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.581044Jy  sigma=0.002022
! Fit after  self-cal, rms=0.579676Jy  sigma=0.002019
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.37 mas, bmaj=4.175 mas, bpa=-5.107 degrees
! Estimated noise=316.829 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00947861 Jy
! Component: 100  -  total flux cleaned = 0.0145605 Jy
! Component: 150  -  total flux cleaned = 0.0166871 Jy
! Component: 200  -  total flux cleaned = 0.0173872 Jy
! Total flux subtracted in 200 components = 0.0173872 Jy
! Clean residual min=-0.004919 max=0.005332 Jy/beam
! Clean residual mean=0.000280 rms=0.001283 Jy/beam
! Combined flux in latest and established models = 4.29533 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 73 components and 4.29533 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.579459Jy  sigma=0.002016
! Fit after  self-cal, rms=0.579441Jy  sigma=0.002016
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.000844702 Jy
! Component: 100  -  total flux cleaned = 0.00123003 Jy
! Component: 150  -  total flux cleaned = 0.0013997 Jy
! Component: 200  -  total flux cleaned = 0.00163106 Jy
! Total flux subtracted in 200 components = 0.00163106 Jy
! Clean residual min=-0.004829 max=0.005318 Jy/beam
! Clean residual mean=0.000256 rms=0.001266 Jy/beam
! Combined flux in latest and established models = 4.29696 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 75 components and 4.29696 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.579406Jy  sigma=0.002016
! Fit after  self-cal, rms=0.579406Jy  sigma=0.002016
! 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.579406Jy  sigma=0.002016
! Fit after  self-cal, rms=0.578408Jy  sigma=0.002014
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.338 mas, bmaj=8.882 mas, bpa=16.14 degrees
! Estimated noise=451.587 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00819205 Jy
! Component: 100  -  total flux cleaned = 0.0116869 Jy
! Component: 150  -  total flux cleaned = 0.0135416 Jy
! Component: 200  -  total flux cleaned = 0.0145881 Jy
! Total flux subtracted in 200 components = 0.0145881 Jy
! Clean residual min=-0.004218 max=0.005716 Jy/beam
! Clean residual mean=0.000479 rms=0.001601 Jy/beam
! Combined flux in latest and established models = 4.31155 Jy
selfcal
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 88 components and 4.31155 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.578325Jy  sigma=0.002014
! Fit after  self-cal, rms=0.578312Jy  sigma=0.002014
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.000940902 Jy
! Component: 100  -  total flux cleaned = 0.00105578 Jy
! Component: 150  -  total flux cleaned = 0.00107399 Jy
! Component: 200  -  total flux cleaned = 0.00110942 Jy
! Total flux subtracted in 200 components = 0.00110942 Jy
! Clean residual min=-0.004236 max=0.005778 Jy/beam
! Clean residual mean=0.000432 rms=0.001599 Jy/beam
! Combined flux in latest and established models = 4.31266 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 91 components and 4.31266 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.578312Jy  sigma=0.002014
! Fit after  self-cal, rms=0.578311Jy  sigma=0.002014
! 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.37 mas, bmaj=4.173 mas, bpa=-5.111 degrees
! Estimated noise=316.983 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.37 x 4.173 at -5.111 degrees (North through East)
! Clean map  min=-0.0042044  max=3.5871 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.578311Jy  sigma=0.002014
! Fit after  self-cal, rms=1.978286Jy  sigma=0.001407
! Inverting map and beam 
! Estimated beam: bmin=2.37 mas, bmaj=4.174 mas, bpa=-5.133 degrees
! Estimated noise=317.095 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00374886 Jy
! Component: 100  -  total flux cleaned = 0.00500236 Jy
! Component: 150  -  total flux cleaned = 0.00515079 Jy
! Component: 200  -  total flux cleaned = 0.00515264 Jy
! Total flux subtracted in 200 components = 0.00515264 Jy
! Clean residual min=-0.002410 max=0.002769 Jy/beam
! Clean residual mean=0.000023 rms=0.000691 Jy/beam
! Combined flux in latest and established models = 4.31781 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 100 components and 4.31781 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.978275Jy  sigma=0.001406
! Fit after  self-cal, rms=1.978275Jy  sigma=0.001406
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 9.77125e-05 Jy
! Component: 100  -  total flux cleaned = 9.84903e-05 Jy
! Component: 150  -  total flux cleaned = 0.000157086 Jy
! Component: 200  -  total flux cleaned = 0.000155888 Jy
! Total flux subtracted in 200 components = 0.000155888 Jy
! Clean residual min=-0.002406 max=0.002663 Jy/beam
! Clean residual mean=0.000021 rms=0.000685 Jy/beam
! Combined flux in latest and established models = 4.31796 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 103 components and 4.31797 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.978274Jy  sigma=0.001406
! Fit after  self-cal, rms=1.978276Jy  sigma=0.001406
! 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.978276Jy  sigma=0.001406
! Fit after  self-cal, rms=1.965734Jy  sigma=0.001406
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.915 mas, bmaj=2.93 mas, bpa=-0.1928 degrees
! Estimated noise=756.281 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 2.62248 Jy
! Component: 100  -  total flux cleaned = 3.36966 Jy
! Component: 150  -  total flux cleaned = 3.73959 Jy
! Component: 200  -  total flux cleaned = 3.93053 Jy
! Total flux subtracted in 200 components = 3.93053 Jy
! Clean residual min=-0.018519 max=0.094030 Jy/beam
! Clean residual mean=0.000196 rms=0.005535 Jy/beam
! Combined flux in latest and established models = 3.93053 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 11 model components to the UV plane model.
! The established model now contains 11 components and 3.93053 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.37 mas, bmaj=4.173 mas, bpa=-5.139 degrees
! Estimated noise=317.122 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.175742 Jy
! Component: 100  -  total flux cleaned = 0.263542 Jy
! Component: 150  -  total flux cleaned = 0.314425 Jy
! Component: 200  -  total flux cleaned = 0.345375 Jy
! Total flux subtracted in 200 components = 0.345375 Jy
! Clean residual min=-0.003934 max=0.015940 Jy/beam
! Clean residual mean=0.000676 rms=0.001831 Jy/beam
! Combined flux in latest and established models = 4.27591 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 31 components and 4.27591 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0190761 Jy
! Component: 100  -  total flux cleaned = 0.0310963 Jy
! Component: 150  -  total flux cleaned = 0.0388196 Jy
! Component: 200  -  total flux cleaned = 0.0414986 Jy
! Total flux subtracted in 200 components = 0.0414986 Jy
! Clean residual min=-0.003373 max=0.004148 Jy/beam
! Clean residual mean=0.000074 rms=0.000798 Jy/beam
! Combined flux in latest and established models = 4.31741 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 49 components and 4.31741 Jy
! Inverting map 
! Added new window around map position (9, -2.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00166499 Jy
! Component: 100  -  total flux cleaned = 0.00252987 Jy
! Component: 150  -  total flux cleaned = 0.00315912 Jy
! Component: 200  -  total flux cleaned = 0.0034515 Jy
! Total flux subtracted in 200 components = 0.0034515 Jy
! Clean residual min=-0.003578 max=0.003293 Jy/beam
! Clean residual mean=0.000022 rms=0.000738 Jy/beam
! Combined flux in latest and established models = 4.32086 Jy
! Adding 26 model components to the UV plane model.
! The established model now contains 59 components and 4.32086 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=8.331 mas, bmaj=8.878 mas, bpa=16.07 degrees
! Estimated noise=452.301 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00253018 Jy
! Component: 100  -  total flux cleaned = 0.00264741 Jy
! Component: 150  -  total flux cleaned = 0.00276849 Jy
! Component: 200  -  total flux cleaned = 0.00290246 Jy
! Total flux subtracted in 200 components = 0.00290246 Jy
! Clean residual min=-0.002644 max=0.002992 Jy/beam
! Clean residual mean=-0.000057 rms=0.000919 Jy/beam
! Combined flux in latest and established models = 4.32376 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 = 8.74917e-05 Jy
! Component: 100  -  total flux cleaned = 0.000166456 Jy
! Component: 150  -  total flux cleaned = 0.000165635 Jy
! Component: 200  -  total flux cleaned = 0.000188428 Jy
! Total flux subtracted in 200 components = 0.000188428 Jy
! Clean residual min=-0.002609 max=0.002920 Jy/beam
! Clean residual mean=-0.000066 rms=0.000913 Jy/beam
! Combined flux in latest and established models = 4.32395 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 90 components and 4.32395 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.37 mas, bmaj=4.173 mas, bpa=-5.139 degrees
! Estimated noise=317.122 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00110855 Jy
! Component: 100  -  total flux cleaned = -0.000974132 Jy
! Component: 150  -  total flux cleaned = -0.000853586 Jy
! Component: 200  -  total flux cleaned = -0.000854499 Jy
! Total flux subtracted in 200 components = -0.000854499 Jy
! Clean residual min=-0.003517 max=0.002915 Jy/beam
! Clean residual mean=-0.000011 rms=0.000696 Jy/beam
! Combined flux in latest and established models = 4.32309 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 91 components and 4.32309 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.965859Jy  sigma=0.001409
! Fit after  self-cal, rms=1.965780Jy  sigma=0.001409
wmodel J0927+3902_S_2001_07_05_pus_map.mod
! Writing 91 model components to file: J0927+3902_S_2001_07_05_pus_map.mod
wobs J0927+3902_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0927+3902_S_2001_07_05_pus_uvs.fits
wwins J0927+3902_S_2001_07_05_pus_map.win
! wwins: Wrote 4 windows to J0927+3902_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.000412173 Jy
! Component: 100  -  total flux cleaned = 2.88547e-05 Jy
! Component: 150  -  total flux cleaned = 0.000402538 Jy
! Component: 200  -  total flux cleaned = 0.000581015 Jy
! Component: 250  -  total flux cleaned = 0.00071154 Jy
! Component: 300  -  total flux cleaned = 0.000923455 Jy
! Component: 350  -  total flux cleaned = 0.00125456 Jy
! Component: 400  -  total flux cleaned = 0.00153814 Jy
! Component: 450  -  total flux cleaned = 0.00165757 Jy
! Component: 500  -  total flux cleaned = 0.00181481 Jy
! Component: 550  -  total flux cleaned = 0.00200826 Jy
! Component: 600  -  total flux cleaned = 0.0020458 Jy
! Component: 650  -  total flux cleaned = 0.00204579 Jy
! Component: 700  -  total flux cleaned = 0.00215818 Jy
! Component: 750  -  total flux cleaned = 0.00223232 Jy
! Component: 800  -  total flux cleaned = 0.00226906 Jy
! Component: 850  -  total flux cleaned = 0.00230533 Jy
! Component: 900  -  total flux cleaned = 0.00230534 Jy
! Component: 950  -  total flux cleaned = 0.00234124 Jy
! Component: 1000  -  total flux cleaned = 0.00237706 Jy
! Component: 1050  -  total flux cleaned = 0.00234158 Jy
! Component: 1100  -  total flux cleaned = 0.00241167 Jy
! Component: 1150  -  total flux cleaned = 0.00244645 Jy
! Component: 1200  -  total flux cleaned = 0.00241186 Jy
! Component: 1250  -  total flux cleaned = 0.00248063 Jy
! Component: 1300  -  total flux cleaned = 0.00244648 Jy
! Component: 1350  -  total flux cleaned = 0.00251451 Jy
! Component: 1400  -  total flux cleaned = 0.00244704 Jy
! Component: 1450  -  total flux cleaned = 0.00251426 Jy
! Component: 1500  -  total flux cleaned = 0.00244743 Jy
! Component: 1550  -  total flux cleaned = 0.00248072 Jy
! Component: 1600  -  total flux cleaned = 0.00251354 Jy
! Component: 1650  -  total flux cleaned = 0.00238222 Jy
! Component: 1700  -  total flux cleaned = 0.00241475 Jy
! Component: 1750  -  total flux cleaned = 0.00241479 Jy
! Component: 1800  -  total flux cleaned = 0.00241491 Jy
! Component: 1850  -  total flux cleaned = 0.00238287 Jy
! Component: 1900  -  total flux cleaned = 0.0024149 Jy
! Component: 1950  -  total flux cleaned = 0.002415 Jy
! Component: 2000  -  total flux cleaned = 0.00238351 Jy
! Total flux subtracted in 2048 components = 0.00241498 Jy
! Clean residual min=-0.001860 max=0.002045 Jy/beam
! Clean residual mean=-0.000048 rms=0.000572 Jy/beam
! Combined flux in latest and established models = 4.32551 Jy
keep
! Adding 146 model components to the UV plane model.
! The established model now contains 228 components and 4.32551 Jy
wmap "J0927+3902_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.37 x 4.173 at -5.139 degrees (North through East)
! Clean map  min=-0.0034916  max=3.5872 Jy/beam
! Writing clean map to FITS file: J0927+3902_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 3.58719 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000571453 
device "J0927+3902_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0927+3902_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0477911 0.0477911 0.0955823 0.191165 0.382329 0.764658 1.52932 3.05863 6.11727 12.2345 24.4691 48.9381 97.8763
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 3.587 
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.37 x 4.173 at -5.139 degrees (North through East)
! Clean map  min=-0.0034916  max=3.5872 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0927+3902_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0927+3902_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0927+3902_S_2001_07_05_pus_uvs.log closed on Fri Aug 10 00:50:17 2007