! Started logfile: J0102+5824_S_2001_07_05_pus_uvs.log on Thu Aug  9 23:37:31 2007
obs J0102+5824_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0102+5824_S_2001_07_05_pus_uva.fits
! AN table 1: 154 integrations on 171 of 171 possible baselines.
! AN table 2: 301 integrations on 171 of 171 possible baselines.
! AN table 3: 101 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.259329 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0102+5824
! 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 98624 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 2055 telescope corrections were flagged in sub-array 1.
!  A total of 3185 telescope corrections were flagged in sub-array 2.
!  A total of 748 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 2055 telescope corrections were flagged in sub-array 1.
!  A total of 3185 telescope corrections were flagged in sub-array 2.
!  A total of 748 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 2055 telescope corrections were flagged in sub-array 1.
!  A total of 3185 telescope corrections were flagged in sub-array 2.
!  A total of 748 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 2055 telescope corrections were flagged in sub-array 1.
!  A total of 3185 telescope corrections were flagged in sub-array 2.
!  A total of 775 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.795714Jy  sigma=0.006250
! Fit after  self-cal, rms=0.537134Jy  sigma=0.004189
! 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.875 mas, bmaj=2.234 mas, bpa=-5.833 degrees
! Estimated noise=585.685 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.371966 Jy
! Component: 100  -  total flux cleaned = 0.469948 Jy
! Total flux subtracted in 100 components = 0.469948 Jy
! Clean residual min=-0.007653 max=0.046336 Jy/beam
! Clean residual mean=0.000033 rms=0.002421 Jy/beam
! Combined flux in latest and established models = 0.469948 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 10 components and 0.469948 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.267020Jy  sigma=0.001938
! Fit after  self-cal, rms=0.266892Jy  sigma=0.001937
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0565573 Jy
! Component: 100  -  total flux cleaned = 0.095001 Jy
! Total flux subtracted in 100 components = 0.095001 Jy
! Clean residual min=-0.006596 max=0.021661 Jy/beam
! Clean residual mean=0.000017 rms=0.001714 Jy/beam
! Combined flux in latest and established models = 0.564949 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 18 components and 0.564949 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.243991Jy  sigma=0.001682
! Fit after  self-cal, rms=0.243715Jy  sigma=0.001681
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0282746 Jy
! Component: 100  -  total flux cleaned = 0.0485158 Jy
! Total flux subtracted in 100 components = 0.0485158 Jy
! Clean residual min=-0.006511 max=0.015749 Jy/beam
! Clean residual mean=0.000009 rms=0.001460 Jy/beam
! Combined flux in latest and established models = 0.613465 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 23 components and 0.613465 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237017Jy  sigma=0.001600
! Fit after  self-cal, rms=0.236916Jy  sigma=0.001600
! Inverting map 
! Added new window around map position (-3, -1.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0173376 Jy
! Component: 100  -  total flux cleaned = 0.0302438 Jy
! Total flux subtracted in 100 components = 0.0302438 Jy
! Clean residual min=-0.006393 max=0.007587 Jy/beam
! Clean residual mean=0.000004 rms=0.001346 Jy/beam
! Combined flux in latest and established models = 0.643709 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 30 components and 0.643709 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.234304Jy  sigma=0.001567
! Fit after  self-cal, rms=0.234183Jy  sigma=0.001567
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0108264 Jy
! Component: 100  -  total flux cleaned = 0.0192123 Jy
! Total flux subtracted in 100 components = 0.0192123 Jy
! Clean residual min=-0.006052 max=0.006364 Jy/beam
! Clean residual mean=0.000001 rms=0.001291 Jy/beam
! Combined flux in latest and established models = 0.662921 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 34 components and 0.662921 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233086Jy  sigma=0.001553
! Fit after  self-cal, rms=0.233032Jy  sigma=0.001552
! 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.205 mas, bmaj=2.803 mas, bpa=-9.022 degrees
! Estimated noise=286.365 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.0153898 Jy
! Component: 100  -  total flux cleaned = 0.0250033 Jy
! Component: 150  -  total flux cleaned = 0.0313452 Jy
! Component: 200  -  total flux cleaned = 0.0356182 Jy
! Total flux subtracted in 200 components = 0.0356182 Jy
! Clean residual min=-0.004312 max=0.007513 Jy/beam
! Clean residual mean=0.000162 rms=0.001074 Jy/beam
! Combined flux in latest and established models = 0.698539 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 51 components and 0.698539 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232085Jy  sigma=0.001539
! Fit after  self-cal, rms=0.231993Jy  sigma=0.001539
! Inverting map 
! Added new window around map position (-7.5, -2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00722109 Jy
! Component: 100  -  total flux cleaned = 0.0114194 Jy
! Component: 150  -  total flux cleaned = 0.0138556 Jy
! Component: 200  -  total flux cleaned = 0.0149388 Jy
! Total flux subtracted in 200 components = 0.0149388 Jy
! Clean residual min=-0.004212 max=0.003739 Jy/beam
! Clean residual mean=0.000081 rms=0.000957 Jy/beam
! Combined flux in latest and established models = 0.713478 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 68 components and 0.713478 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231754Jy  sigma=0.001536
! Fit after  self-cal, rms=0.231722Jy  sigma=0.001536
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 204 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.02     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.02     KP        1.04     
!   LA        1.04     MC        1.02     MK        1.07     NL        1.01     
!   NY        1.05     OV        1.04     PT        1.01     SC        0.94     
!   TS        1.03     WF        1.01     WZ        1.01     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.02     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.02     KP        0.97     
!   LA        1.02     MC        1.14     MK        1.01     NL        1.01     
!   NY        1.00     OV        1.01     PT        0.99     SC        1.04     
!   TS        1.03     WF        1.04     WZ        1.05     
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.99     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.02     KP        1.04     
!   LA        1.03     MC        1.18     MK        1.04     NL        0.97     
!   NY        1.00     OV        0.97     PT        0.96     SC        1.01     
!   TS        1.09     WF        0.98     WZ        1.06     
! 
! 
! Correcting IF 2.
!  A total of 204 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.04     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00     KP        1.14     
!   LA        1.01     MC        0.98     MK        1.05     NL        0.98     
!   NY        1.04     OV        1.08     PT        1.04     SC        0.96     
!   TS        0.99     WF        0.97     WZ        0.98     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.02     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.02     KP        0.96     
!   LA        0.98     MC        1.01     MK        0.98     NL        0.98     
!   NY        0.99     OV        1.02     PT        1.02     SC        1.06     
!   TS        1.00     WF        1.02     WZ        1.01     
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        0.99     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.04     KP        0.94     
!   LA        0.98     MC        0.94     MK        1.01     NL        0.93     
!   NY        0.99     OV        0.99     PT        0.99     SC        1.00     
!   TS        1.06     WF        0.98     WZ        1.03     
! 
! 
! Correcting IF 3.
!  A total of 204 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.98     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.06     KP        1.06     
!   LA        1.01     MC        1.21     MK        1.05     NL        1.01     
!   NY        1.00     OV        1.08     PT        1.01     SC        0.95     
!   TS        0.95     WF        0.98     WZ        0.98     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.96     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.01     KP        1.02     
!   LA        1.01     MC        1.25     MK        0.99     NL        1.01     
!   NY        0.99     OV        1.05     PT        1.00     SC        1.05     
!   TS        0.96     WF        1.00     WZ        1.03     
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.95     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.01     KP        1.01     
!   LA        0.97     MC        1.17     MK        1.02     NL        0.98     
!   NY        0.96     OV        0.99     PT        0.98     SC        0.98     
!   TS        1.02     WF        1.00     WZ        1.04     
! 
! 
! Correcting IF 4.
!  A total of 204 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.01     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.00     KP        1.04     
!   LA        1.00     MC        0.86     MK        1.01     NL        0.98     
!   NY        1.03     OV        1.04     PT        1.04     SC        0.92     
!   TS        0.97     WF        1.02     WZ        0.94     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.98     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.03     KP        1.04     
!   LA        1.00     MC        0.75     MK        0.98     NL        0.99     
!   NY        1.00     OV        0.99     PT        1.03     SC        1.01     
!   TS        0.98     WF        1.03     WZ        1.00     
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        0.97     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.90     KK        0.99     KP        1.02     
!   LA        0.97     MC        0.91     MK        1.00     NL        0.96     
!   NY        0.99     OV        1.00     PT        1.04     SC        1.00     
!   TS        1.02     WF        0.97     WZ        0.99     
! 
! 
! Fit before self-cal, rms=0.231722Jy  sigma=0.001536
! Fit after  self-cal, rms=0.219066Jy  sigma=0.001505
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.216 mas, bmaj=2.799 mas, bpa=-8.39 degrees
! Estimated noise=287.857 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 (-21.5, -1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00303093 Jy
! Component: 100  -  total flux cleaned = 0.00408376 Jy
! Component: 150  -  total flux cleaned = 0.00456593 Jy
! Component: 200  -  total flux cleaned = 0.00505606 Jy
! Total flux subtracted in 200 components = 0.00505606 Jy
! Clean residual min=-0.002595 max=0.002778 Jy/beam
! Clean residual mean=0.000032 rms=0.000652 Jy/beam
! Combined flux in latest and established models = 0.718534 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 84 components and 0.718534 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.218984Jy  sigma=0.001504
! Fit after  self-cal, rms=0.219174Jy  sigma=0.001504
! 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.219174Jy  sigma=0.001504
! Fit after  self-cal, rms=0.222777Jy  sigma=0.001476
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.216 mas, bmaj=2.804 mas, bpa=-8.484 degrees
! Estimated noise=288.332 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00223825 Jy
! Component: 100  -  total flux cleaned = 0.00314161 Jy
! Component: 150  -  total flux cleaned = 0.00364322 Jy
! Component: 200  -  total flux cleaned = 0.00393439 Jy
! Total flux subtracted in 200 components = 0.00393439 Jy
! Clean residual min=-0.001776 max=0.002161 Jy/beam
! Clean residual mean=0.000072 rms=0.000486 Jy/beam
! Combined flux in latest and established models = 0.722469 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 104 components and 0.722469 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222735Jy  sigma=0.001476
! Fit after  self-cal, rms=0.222850Jy  sigma=0.001475
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 (-14, -3.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00198641 Jy
! Component: 100  -  total flux cleaned = 0.0025039 Jy
! Component: 150  -  total flux cleaned = 0.00269785 Jy
! Component: 200  -  total flux cleaned = 0.00286857 Jy
! Total flux subtracted in 200 components = 0.00286857 Jy
! Clean residual min=-0.001684 max=0.002191 Jy/beam
! Clean residual mean=0.000059 rms=0.000474 Jy/beam
! Combined flux in latest and established models = 0.725337 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 119 components and 0.725337 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222819Jy  sigma=0.001475
! Fit after  self-cal, rms=0.222819Jy  sigma=0.001475
! Inverting map 
! Added new window around map position (-42, -5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000936166 Jy
! Component: 100  -  total flux cleaned = 0.00133374 Jy
! Component: 150  -  total flux cleaned = 0.0016369 Jy
! Component: 200  -  total flux cleaned = 0.00175571 Jy
! Total flux subtracted in 200 components = 0.00175571 Jy
! Clean residual min=-0.001700 max=0.002100 Jy/beam
! Clean residual mean=0.000048 rms=0.000468 Jy/beam
! Combined flux in latest and established models = 0.727093 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 127 components and 0.727093 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222795Jy  sigma=0.001475
! Fit after  self-cal, rms=0.222794Jy  sigma=0.001475
! Inverting map 
! Added new window around map position (-63, 32).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00211644 Jy
! Component: 100  -  total flux cleaned = 0.00323461 Jy
! Component: 150  -  total flux cleaned = 0.0036009 Jy
! Component: 200  -  total flux cleaned = 0.00386215 Jy
! Total flux subtracted in 200 components = 0.00386215 Jy
! Clean residual min=-0.001646 max=0.001778 Jy/beam
! Clean residual mean=0.000030 rms=0.000448 Jy/beam
! Combined flux in latest and established models = 0.730955 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 142 components and 0.730955 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222769Jy  sigma=0.001474
! Fit after  self-cal, rms=0.222768Jy  sigma=0.001474
! 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.222768Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224173Jy  sigma=0.001474
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.216 mas, bmaj=2.805 mas, bpa=-8.451 degrees
! Estimated noise=288.484 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00128169 Jy
! Component: 100  -  total flux cleaned = 0.00228749 Jy
! Component: 150  -  total flux cleaned = 0.00262546 Jy
! Component: 200  -  total flux cleaned = 0.00283798 Jy
! Total flux subtracted in 200 components = 0.00283798 Jy
! Clean residual min=-0.001675 max=0.001769 Jy/beam
! Clean residual mean=0.000022 rms=0.000443 Jy/beam
! Combined flux in latest and established models = 0.733793 Jy
selfcal
! Performing phase self-cal
! Adding 43 model components to the UV plane model.
! The established model now contains 148 components and 0.733793 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224159Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224172Jy  sigma=0.001474
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.000471859 Jy
! Component: 100  -  total flux cleaned = 0.00067278 Jy
! Component: 150  -  total flux cleaned = 0.00080011 Jy
! Component: 200  -  total flux cleaned = 0.00092208 Jy
! Total flux subtracted in 200 components = 0.00092208 Jy
! Clean residual min=-0.001653 max=0.001768 Jy/beam
! Clean residual mean=0.000019 rms=0.000440 Jy/beam
! Combined flux in latest and established models = 0.734715 Jy
! Performing phase self-cal
! Adding 50 model components to the UV plane model.
! The established model now contains 153 components and 0.734715 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224163Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224163Jy  sigma=0.001474
! 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.224163Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224413Jy  sigma=0.001474
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.851 mas, bmaj=8.166 mas, bpa=19.14 degrees
! Estimated noise=460.535 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00235143 Jy
! Component: 100  -  total flux cleaned = 0.00363218 Jy
! Component: 150  -  total flux cleaned = 0.00427587 Jy
! Component: 200  -  total flux cleaned = 0.00447245 Jy
! Total flux subtracted in 200 components = 0.00447245 Jy
! Clean residual min=-0.001899 max=0.002499 Jy/beam
! Clean residual mean=0.000002 rms=0.000659 Jy/beam
! Combined flux in latest and established models = 0.739187 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 168 components and 0.739188 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224414Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224415Jy  sigma=0.001474
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.000652864 Jy
! Component: 100  -  total flux cleaned = 0.000803689 Jy
! Component: 150  -  total flux cleaned = 0.000848266 Jy
! Component: 200  -  total flux cleaned = 0.00095058 Jy
! Total flux subtracted in 200 components = 0.00095058 Jy
! Clean residual min=-0.001890 max=0.002521 Jy/beam
! Clean residual mean=-0.000005 rms=0.000661 Jy/beam
! Combined flux in latest and established models = 0.740138 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 175 components and 0.740138 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224416Jy  sigma=0.001474
! Fit after  self-cal, rms=0.224414Jy  sigma=0.001474
! 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.216 mas, bmaj=2.805 mas, bpa=-8.452 degrees
! Estimated noise=288.617 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.216 x 2.805 at -8.452 degrees (North through East)
! Clean map  min=-0.0014989  max=0.51746 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.224414Jy  sigma=0.001474
! Fit after  self-cal, rms=0.453272Jy  sigma=0.001398
! Inverting map and beam 
! Estimated beam: bmin=2.215 mas, bmaj=2.803 mas, bpa=-8.516 degrees
! Estimated noise=288.717 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000474365 Jy
! Component: 100  -  total flux cleaned = -0.00058704 Jy
! Component: 150  -  total flux cleaned = -0.000620394 Jy
! Component: 200  -  total flux cleaned = -0.000651476 Jy
! Total flux subtracted in 200 components = -0.000651476 Jy
! Clean residual min=-0.001634 max=0.001688 Jy/beam
! Clean residual mean=0.000006 rms=0.000424 Jy/beam
! Combined flux in latest and established models = 0.739487 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 190 components and 0.739487 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.453260Jy  sigma=0.001398
! Fit after  self-cal, rms=0.453262Jy  sigma=0.001398
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -5.91337e-05 Jy
! Component: 100  -  total flux cleaned = -0.000115939 Jy
! Component: 150  -  total flux cleaned = -0.000143057 Jy
! Component: 200  -  total flux cleaned = -0.000142701 Jy
! Total flux subtracted in 200 components = -0.000142701 Jy
! Clean residual min=-0.001631 max=0.001679 Jy/beam
! Clean residual mean=0.000006 rms=0.000423 Jy/beam
! Combined flux in latest and established models = 0.739344 Jy
! Performing phase self-cal
! Adding 44 model components to the UV plane model.
! The established model now contains 199 components and 0.739344 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.453255Jy  sigma=0.001398
! Fit after  self-cal, rms=0.453255Jy  sigma=0.001398
! 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.453255Jy  sigma=0.001398
! Fit after  self-cal, rms=0.750542Jy  sigma=0.001398
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.876 mas, bmaj=2.231 mas, bpa=-5.917 degrees
! Estimated noise=589.737 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.372939 Jy
! Component: 100  -  total flux cleaned = 0.474127 Jy
! Component: 150  -  total flux cleaned = 0.532717 Jy
! Component: 200  -  total flux cleaned = 0.571927 Jy
! Total flux subtracted in 200 components = 0.571927 Jy
! Clean residual min=-0.004918 max=0.021876 Jy/beam
! Clean residual mean=0.000030 rms=0.001520 Jy/beam
! Combined flux in latest and established models = 0.571927 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 15 model components to the UV plane model.
! The established model now contains 15 components and 0.571927 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.214 mas, bmaj=2.803 mas, bpa=-8.52 degrees
! Estimated noise=288.845 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.0518689 Jy
! Component: 100  -  total flux cleaned = 0.0823876 Jy
! Component: 150  -  total flux cleaned = 0.101707 Jy
! Component: 200  -  total flux cleaned = 0.115085 Jy
! Total flux subtracted in 200 components = 0.115085 Jy
! Clean residual min=-0.002215 max=0.007512 Jy/beam
! Clean residual mean=0.000285 rms=0.000918 Jy/beam
! Combined flux in latest and established models = 0.687012 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 54 components and 0.687012 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00961002 Jy
! Component: 100  -  total flux cleaned = 0.0166331 Jy
! Component: 150  -  total flux cleaned = 0.0220012 Jy
! Component: 200  -  total flux cleaned = 0.0263152 Jy
! Total flux subtracted in 200 components = 0.0263152 Jy
! Clean residual min=-0.001902 max=0.002775 Jy/beam
! Clean residual mean=0.000142 rms=0.000574 Jy/beam
! Combined flux in latest and established models = 0.713328 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 78 components and 0.713328 Jy
! Inverting map 
! Added new window around map position (-15, 1.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00362916 Jy
! Component: 100  -  total flux cleaned = 0.00674118 Jy
! Component: 150  -  total flux cleaned = 0.0094538 Jy
! Component: 200  -  total flux cleaned = 0.0113923 Jy
! Total flux subtracted in 200 components = 0.0113923 Jy
! Clean residual min=-0.001797 max=0.002032 Jy/beam
! Clean residual mean=0.000080 rms=0.000495 Jy/beam
! Combined flux in latest and established models = 0.72472 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 99 components and 0.72472 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.854 mas, bmaj=8.169 mas, bpa=19.22 degrees
! Estimated noise=461.13 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00519467 Jy
! Component: 100  -  total flux cleaned = 0.00865094 Jy
! Component: 150  -  total flux cleaned = 0.0110678 Jy
! Component: 200  -  total flux cleaned = 0.0128533 Jy
! Total flux subtracted in 200 components = 0.0128533 Jy
! Clean residual min=-0.002264 max=0.002602 Jy/beam
! Clean residual mean=0.000064 rms=0.000669 Jy/beam
! Combined flux in latest and established models = 0.737573 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.00134243 Jy
! Component: 100  -  total flux cleaned = 0.00236065 Jy
! Component: 150  -  total flux cleaned = 0.00314182 Jy
! Component: 200  -  total flux cleaned = 0.00354246 Jy
! Total flux subtracted in 200 components = 0.00354246 Jy
! Clean residual min=-0.002098 max=0.002401 Jy/beam
! Clean residual mean=-0.000014 rms=0.000617 Jy/beam
! Combined flux in latest and established models = 0.741116 Jy
! Adding 84 model components to the UV plane model.
! The established model now contains 174 components and 0.741116 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.214 mas, bmaj=2.803 mas, bpa=-8.52 degrees
! Estimated noise=288.845 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000117135 Jy
! Component: 100  -  total flux cleaned = -0.000107853 Jy
! Component: 150  -  total flux cleaned = -0.000283568 Jy
! Component: 200  -  total flux cleaned = -0.000445495 Jy
! Total flux subtracted in 200 components = -0.000445495 Jy
! Clean residual min=-0.001701 max=0.001778 Jy/beam
! Clean residual mean=0.000002 rms=0.000438 Jy/beam
! Combined flux in latest and established models = 0.74067 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 183 components and 0.74067 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.750560Jy  sigma=0.001399
! Fit after  self-cal, rms=0.750560Jy  sigma=0.001399
wmodel J0102+5824_S_2001_07_05_pus_map.mod
! Writing 183 model components to file: J0102+5824_S_2001_07_05_pus_map.mod
wobs J0102+5824_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0102+5824_S_2001_07_05_pus_uvs.fits
wwins J0102+5824_S_2001_07_05_pus_map.win
! wwins: Wrote 8 windows to J0102+5824_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.000201106 Jy
! Component: 100  -  total flux cleaned = 0.000324069 Jy
! Component: 150  -  total flux cleaned = 0.000472958 Jy
! Component: 200  -  total flux cleaned = 0.000530793 Jy
! Component: 250  -  total flux cleaned = 0.000587269 Jy
! Component: 300  -  total flux cleaned = 0.000504412 Jy
! Component: 350  -  total flux cleaned = 0.000423352 Jy
! Component: 400  -  total flux cleaned = 0.000450255 Jy
! Component: 450  -  total flux cleaned = 0.000397296 Jy
! Component: 500  -  total flux cleaned = 0.000345416 Jy
! Component: 550  -  total flux cleaned = 0.000319934 Jy
! Component: 600  -  total flux cleaned = 0.000345566 Jy
! Component: 650  -  total flux cleaned = 0.0003204 Jy
! Component: 700  -  total flux cleaned = 0.000295346 Jy
! Component: 750  -  total flux cleaned = 0.000270439 Jy
! Component: 800  -  total flux cleaned = 0.000196514 Jy
! Component: 850  -  total flux cleaned = 0.000123585 Jy
! Component: 900  -  total flux cleaned = 9.93909e-05 Jy
! Component: 950  -  total flux cleaned = 7.53477e-05 Jy
! Component: 1000  -  total flux cleaned = 5.14914e-05 Jy
! Component: 1050  -  total flux cleaned = -1.95507e-05 Jy
! Component: 1100  -  total flux cleaned = -4.29329e-05 Jy
! Component: 1150  -  total flux cleaned = 3.99867e-06 Jy
! Component: 1200  -  total flux cleaned = -4.24645e-05 Jy
! Component: 1250  -  total flux cleaned = 3.79119e-06 Jy
! Component: 1300  -  total flux cleaned = 3.79392e-06 Jy
! Component: 1350  -  total flux cleaned = 3.75132e-06 Jy
! Component: 1400  -  total flux cleaned = 3.7385e-06 Jy
! Component: 1450  -  total flux cleaned = 2.6487e-05 Jy
! Component: 1500  -  total flux cleaned = 4.90324e-05 Jy
! Component: 1550  -  total flux cleaned = 2.66754e-05 Jy
! Component: 1600  -  total flux cleaned = 9.37092e-05 Jy
! Component: 1650  -  total flux cleaned = 0.000115947 Jy
! Component: 1700  -  total flux cleaned = 4.95435e-05 Jy
! Component: 1750  -  total flux cleaned = 0.000137653 Jy
! Component: 1800  -  total flux cleaned = 0.00013767 Jy
! Component: 1850  -  total flux cleaned = 0.00018112 Jy
! Component: 1900  -  total flux cleaned = 0.000202764 Jy
! Component: 1950  -  total flux cleaned = 0.000181198 Jy
! Component: 2000  -  total flux cleaned = 0.000202706 Jy
! Total flux subtracted in 2048 components = 0.000181319 Jy
! Clean residual min=-0.001309 max=0.001438 Jy/beam
! Clean residual mean=0.000005 rms=0.000392 Jy/beam
! Combined flux in latest and established models = 0.740852 Jy
keep
! Adding 172 model components to the UV plane model.
! The established model now contains 354 components and 0.740852 Jy
wmap "J0102+5824_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.214 x 2.803 at -8.52 degrees (North through East)
! Clean map  min=-0.0013582  max=0.51834 Jy/beam
! Writing clean map to FITS file: J0102+5824_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 0.518342 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000392132 
device "J0102+5824_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0102+5824_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.226954 0.226954 0.453908 0.907815 1.81563 3.63126 7.26252 14.525 29.0501 58.1002
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.518 
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.214 x 2.803 at -8.52 degrees (North through East)
! Clean map  min=-0.0013582  max=0.51834 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0102+5824_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0102+5824_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0102+5824_S_2001_07_05_pus_uvs.log closed on Thu Aug  9 23:41:31 2007