! Started logfile: J0808+4950_S_2001_04_09_pus_uvs.log on Fri Oct  5 15:56:40 2007
obs J0808+4950_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J0808+4950_S_2001_04_09_pus_uva.fits
! AN table 1: 70 integrations on 190 of 190 possible baselines.
! AN table 2: 212 integrations on 190 of 190 possible baselines.
! AN table 3: 40 integrations on 190 of 190 possible baselines.
! AN table 4: 57 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.243244 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0808+4950
! 
! 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 1949 lines of history.
! 
! Reading 70064 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J0808+4950_S_2001_04_09_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 780 telescope corrections were flagged in sub-array 1.
!  A total of 2770 telescope corrections were flagged in sub-array 2.
!  A total of 355 telescope corrections were flagged in sub-array 3.
!  A total of 388 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 780 telescope corrections were flagged in sub-array 1.
!  A total of 2770 telescope corrections were flagged in sub-array 2.
!  A total of 355 telescope corrections were flagged in sub-array 3.
!  A total of 388 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 780 telescope corrections were flagged in sub-array 1.
!  A total of 2770 telescope corrections were flagged in sub-array 2.
!  A total of 355 telescope corrections were flagged in sub-array 3.
!  A total of 388 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 780 telescope corrections were flagged in sub-array 1.
!  A total of 2770 telescope corrections were flagged in sub-array 2.
!  A total of 355 telescope corrections were flagged in sub-array 3.
!  A total of 388 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.926899Jy  sigma=0.006747
! Fit after  self-cal, rms=0.589127Jy  sigma=0.004208
! 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.856 mas, bmaj=2.5 mas, bpa=-3.536 degrees
! Estimated noise=669.203 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.365136 Jy
! Component: 100  -  total flux cleaned = 0.472484 Jy
! Total flux subtracted in 100 components = 0.472484 Jy
! Clean residual min=-0.007151 max=0.047259 Jy/beam
! Clean residual mean=0.000032 rms=0.002414 Jy/beam
! Combined flux in latest and established models = 0.472484 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.472484 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.297850Jy  sigma=0.001804
! Fit after  self-cal, rms=0.297474Jy  sigma=0.001803
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0525327 Jy
! Component: 100  -  total flux cleaned = 0.0854691 Jy
! Total flux subtracted in 100 components = 0.0854691 Jy
! Clean residual min=-0.005631 max=0.018078 Jy/beam
! Clean residual mean=0.000016 rms=0.001660 Jy/beam
! Combined flux in latest and established models = 0.557953 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 17 components and 0.557953 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285079Jy  sigma=0.001673
! Fit after  self-cal, rms=0.284780Jy  sigma=0.001672
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.02384 Jy
! Component: 100  -  total flux cleaned = 0.0407329 Jy
! Total flux subtracted in 100 components = 0.0407329 Jy
! Clean residual min=-0.005704 max=0.010613 Jy/beam
! Clean residual mean=0.000009 rms=0.001451 Jy/beam
! Combined flux in latest and established models = 0.598686 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 23 components and 0.598686 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.282104Jy  sigma=0.001644
! Fit after  self-cal, rms=0.281972Jy  sigma=0.001644
! Inverting map 
! Added new window around map position (1, -3).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0131981 Jy
! Component: 100  -  total flux cleaned = 0.0228693 Jy
! Total flux subtracted in 100 components = 0.0228693 Jy
! Clean residual min=-0.005830 max=0.006194 Jy/beam
! Clean residual mean=0.000005 rms=0.001379 Jy/beam
! Combined flux in latest and established models = 0.621555 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 32 components and 0.621555 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281248Jy  sigma=0.001636
! Fit after  self-cal, rms=0.281172Jy  sigma=0.001636
! 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.06 mas, bmaj=3.013 mas, bpa=-4.326 degrees
! Estimated noise=366.744 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.00747407 Jy
! Component: 100  -  total flux cleaned = 0.0117364 Jy
! Component: 150  -  total flux cleaned = 0.0145239 Jy
! Component: 200  -  total flux cleaned = 0.0151198 Jy
! Total flux subtracted in 200 components = 0.0151198 Jy
! Clean residual min=-0.006399 max=0.005983 Jy/beam
! Clean residual mean=0.000193 rms=0.001379 Jy/beam
! Combined flux in latest and established models = 0.636675 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 47 components and 0.636675 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280924Jy  sigma=0.001634
! Fit after  self-cal, rms=0.280869Jy  sigma=0.001634
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.93     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        0.95     KP        0.97     
!   LA        0.93     MA        1.08     MC        0.99     MK        0.96     
!   NL        0.96     NY        0.94     OV        0.98     PT        0.91     
!   SC        0.96     TS        0.96     WF        0.95     WZ        1.05     
! 
!  A total of 87 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.96     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        0.97     KP        1.01     
!   LA        1.02     MA        0.87     MC        1.07     MK        0.97     
!   NL        1.04     NY        0.95     OV        1.01     PT        0.99     
!   SC        0.96     TS        0.93     WF        0.98     WZ        1.04     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.06     FD        1.10     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00*    KP        1.00*    
!   LA        1.04     MA        0.91     MC        0.90     MK        1.00*    
!   NL        0.99     NY        0.94     OV        1.00*    PT        1.06     
!   SC        1.01     TS        1.08     WF        0.98     WZ        0.96     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.99     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.91     KK        1.02     KP        1.03     
!   LA        0.99     MA        1.13     MC        0.96     MK        1.03     
!   NL        0.96     NY        0.97     OV        1.08     PT        0.97     
!   SC        0.99     TS        1.00*    WF        0.85     WZ        1.01     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.93     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        0.95     KP        0.94     
!   LA        0.93     MA        0.99     MC        1.03     MK        0.97     
!   NL        0.95     NY        0.99     OV        0.94     PT        0.93     
!   SC        1.00     TS        0.99     WF        0.99     WZ        1.05     
! 
!  A total of 87 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.96     GC        0.94     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.93     KP        0.96     
!   LA        1.04     MA        0.79     MC        1.00     MK        1.01     
!   NL        1.05     NY        0.97     OV        0.99     PT        1.03     
!   SC        1.00     TS        0.98     WF        0.99     WZ        1.07     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.11     GC        0.94     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        1.00*    
!   LA        1.08     MA        1.02     MC        0.96     MK        1.00*    
!   NL        1.04     NY        1.02     OV        1.00*    PT        1.09     
!   SC        1.01     TS        1.15     WF        0.98     WZ        0.99     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        0.98     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        1.01     KP        1.23     
!   LA        1.00     MA        1.08     MC        1.06     MK        1.04     
!   NL        0.97     NY        1.00     OV        1.08     PT        1.01     
!   SC        0.98     TS        1.00*    WF        0.97     WZ        0.98     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.96     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        0.97     KP        0.96     
!   LA        0.91     MA        1.10     MC        1.47     MK        0.94     
!   NL        0.97     NY        0.97     OV        0.96     PT        0.95     
!   SC        0.98     TS        1.01     WF        0.98     WZ        1.06     
! 
!  A total of 87 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        0.98     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.96     KP        1.02     
!   LA        1.00     MA        1.09     MC        1.04     MK        0.99     
!   NL        1.05     NY        0.96     OV        1.00     PT        1.02     
!   SC        0.98     TS        1.00     WF        1.01     WZ        1.04     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.09     FD        1.11     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.00*    KP        1.00*    
!   LA        1.02     MA        1.23     MC        0.94     MK        1.00*    
!   NL        1.02     NY        0.97     OV        1.00*    PT        1.09     
!   SC        1.03     TS        1.15     WF        1.02     WZ        0.98     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     FD        1.00     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.03     KP        1.04     
!   LA        0.97     MA        0.99     MC        1.01     MK        1.01     
!   NL        0.99     NY        0.96     OV        1.06     PT        1.01     
!   SC        1.00     TS        1.00*    WF        0.99     WZ        0.99     
! 
! 
! Correcting IF 4.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.95     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.06     KK        0.92     KP        0.96     
!   LA        0.96     MA        1.07     MC        0.72     MK        0.93     
!   NL        0.99     NY        0.97     OV        0.94     PT        0.97     
!   SC        0.96     TS        1.05     WF        0.98     WZ        1.11     
! 
!  A total of 87 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.97     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.92     KP        1.03     
!   LA        1.03     MA        1.17     MC        0.60     MK        0.97     
!   NL        1.05     NY        1.02     OV        1.01     PT        1.05     
!   SC        0.98     TS        0.95     WF        0.98     WZ        1.13     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.12     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        1.00*    
!   LA        1.07     MA        1.44     MC        1.52     MK        1.00*    
!   NL        1.04     NY        1.08     OV        1.00*    PT        1.12     
!   SC        1.03     TS        1.05     WF        0.99     WZ        1.02     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.02     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.99     KP        1.06     
!   LA        1.02     MA        1.07     MC        0.99     MK        1.00     
!   NL        0.99     NY        1.01     OV        1.06     PT        1.04     
!   SC        1.01     TS        1.00*    WF        0.99     WZ        1.03     
! 
! 
! Fit before self-cal, rms=0.280869Jy  sigma=0.001634
! Fit after  self-cal, rms=0.278192Jy  sigma=0.001589
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.063 mas, bmaj=3 mas, bpa=-4.188 degrees
! Estimated noise=366.697 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.00288897 Jy
! Component: 100  -  total flux cleaned = 0.00377606 Jy
! Component: 150  -  total flux cleaned = 0.00436747 Jy
! Component: 200  -  total flux cleaned = 0.00490141 Jy
! Total flux subtracted in 200 components = 0.00490141 Jy
! Clean residual min=-0.003724 max=0.003198 Jy/beam
! Clean residual mean=-0.000100 rms=0.000928 Jy/beam
! Combined flux in latest and established models = 0.641577 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 51 components and 0.641576 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.278129Jy  sigma=0.001588
! Fit after  self-cal, rms=0.279764Jy  sigma=0.001585
! 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.279764Jy  sigma=0.001585
! Fit after  self-cal, rms=0.283036Jy  sigma=0.001565
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.063 mas, bmaj=3.004 mas, bpa=-4.342 degrees
! Estimated noise=367.413 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00272571 Jy
! Component: 100  -  total flux cleaned = 0.00344533 Jy
! Component: 150  -  total flux cleaned = 0.00369135 Jy
! Component: 200  -  total flux cleaned = 0.00377295 Jy
! Total flux subtracted in 200 components = 0.00377295 Jy
! Clean residual min=-0.002872 max=0.003016 Jy/beam
! Clean residual mean=0.000021 rms=0.000732 Jy/beam
! Combined flux in latest and established models = 0.645349 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 56 components and 0.645349 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.283006Jy  sigma=0.001565
! Fit after  self-cal, rms=0.283727Jy  sigma=0.001565
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.000430268 Jy
! Component: 100  -  total flux cleaned = 0.000593184 Jy
! Component: 150  -  total flux cleaned = 0.000700767 Jy
! Component: 200  -  total flux cleaned = 0.00076429 Jy
! Total flux subtracted in 200 components = 0.00076429 Jy
! Clean residual min=-0.002980 max=0.002962 Jy/beam
! Clean residual mean=0.000013 rms=0.000751 Jy/beam
! Combined flux in latest and established models = 0.646114 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 59 components and 0.646114 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.283716Jy  sigma=0.001565
! Fit after  self-cal, rms=0.283719Jy  sigma=0.001564
! 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.283719Jy  sigma=0.001564
! Fit after  self-cal, rms=0.290640Jy  sigma=0.001565
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.062 mas, bmaj=3.002 mas, bpa=-4.469 degrees
! Estimated noise=367.882 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00192204 Jy
! Component: 100  -  total flux cleaned = 0.00272977 Jy
! Component: 150  -  total flux cleaned = 0.00292738 Jy
! Component: 200  -  total flux cleaned = 0.00309362 Jy
! Total flux subtracted in 200 components = 0.00309362 Jy
! Clean residual min=-0.002976 max=0.003008 Jy/beam
! Clean residual mean=-0.000016 rms=0.000755 Jy/beam
! Combined flux in latest and established models = 0.649207 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 61 components and 0.649207 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290628Jy  sigma=0.001565
! Fit after  self-cal, rms=0.291154Jy  sigma=0.001564
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.000159135 Jy
! Component: 100  -  total flux cleaned = 0.000214425 Jy
! Component: 150  -  total flux cleaned = 0.000286384 Jy
! Component: 200  -  total flux cleaned = 0.000308687 Jy
! Total flux subtracted in 200 components = 0.000308687 Jy
! Clean residual min=-0.003005 max=0.002953 Jy/beam
! Clean residual mean=-0.000019 rms=0.000761 Jy/beam
! Combined flux in latest and established models = 0.649516 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 65 components and 0.649516 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.291148Jy  sigma=0.001564
! Fit after  self-cal, rms=0.291152Jy  sigma=0.001564
! 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.291152Jy  sigma=0.001564
! Fit after  self-cal, rms=0.292556Jy  sigma=0.001564
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.019 mas, bmaj=8.552 mas, bpa=24.97 degrees
! Estimated noise=638.611 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00343667 Jy
! Component: 100  -  total flux cleaned = 0.0046211 Jy
! Component: 150  -  total flux cleaned = 0.00472844 Jy
! Component: 200  -  total flux cleaned = 0.00480002 Jy
! Total flux subtracted in 200 components = 0.00480002 Jy
! Clean residual min=-0.005823 max=0.005182 Jy/beam
! Clean residual mean=-0.000200 rms=0.001873 Jy/beam
! Combined flux in latest and established models = 0.654316 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 66 components and 0.654316 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.292568Jy  sigma=0.001564
! Fit after  self-cal, rms=0.292727Jy  sigma=0.001564
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.000394685 Jy
! Component: 100  -  total flux cleaned = 0.000394423 Jy
! Component: 150  -  total flux cleaned = 0.000414868 Jy
! Component: 200  -  total flux cleaned = 0.000482435 Jy
! Total flux subtracted in 200 components = 0.000482435 Jy
! Clean residual min=-0.005851 max=0.005202 Jy/beam
! Clean residual mean=-0.000213 rms=0.001868 Jy/beam
! Combined flux in latest and established models = 0.654798 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 68 components and 0.654798 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.292732Jy  sigma=0.001565
! Fit after  self-cal, rms=0.292740Jy  sigma=0.001565
! 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.061 mas, bmaj=3 mas, bpa=-4.546 degrees
! Estimated noise=368.364 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.061 x 3 at -4.546 degrees (North through East)
! Clean map  min=-0.0026549  max=0.4872 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
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.857 mas, bmaj=2.503 mas, bpa=-3.317 degrees
! Estimated noise=656.819 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.35902 Jy
! Component: 100  -  total flux cleaned = 0.467617 Jy
! Component: 150  -  total flux cleaned = 0.520011 Jy
! Component: 200  -  total flux cleaned = 0.552797 Jy
! Total flux subtracted in 200 components = 0.552797 Jy
! Clean residual min=-0.004694 max=0.017894 Jy/beam
! Clean residual mean=0.000018 rms=0.001415 Jy/beam
! Combined flux in latest and established models = 0.552797 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 17 model components to the UV plane model.
! The established model now contains 17 components and 0.552797 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.061 mas, bmaj=3 mas, bpa=-4.546 degrees
! Estimated noise=368.364 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.035656 Jy
! Component: 100  -  total flux cleaned = 0.0572325 Jy
! Component: 150  -  total flux cleaned = 0.0711445 Jy
! Component: 200  -  total flux cleaned = 0.080481 Jy
! Total flux subtracted in 200 components = 0.080481 Jy
! Clean residual min=-0.003007 max=0.006130 Jy/beam
! Clean residual mean=0.000092 rms=0.000931 Jy/beam
! Combined flux in latest and established models = 0.633278 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 49 components and 0.633278 Jy
! Inverting map 
! Added new window around map position (1, -6.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0066737 Jy
! Component: 100  -  total flux cleaned = 0.0112308 Jy
! Component: 150  -  total flux cleaned = 0.0144599 Jy
! Component: 200  -  total flux cleaned = 0.0168311 Jy
! Total flux subtracted in 200 components = 0.0168311 Jy
! Clean residual min=-0.002978 max=0.003314 Jy/beam
! Clean residual mean=-0.000018 rms=0.000770 Jy/beam
! Combined flux in latest and established models = 0.650109 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 64 components and 0.650109 Jy
! Inverting map 
! Added new window around map position (-7, 10).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00263925 Jy
! Component: 100  -  total flux cleaned = 0.00368798 Jy
! Component: 150  -  total flux cleaned = 0.00452654 Jy
! Component: 200  -  total flux cleaned = 0.0049571 Jy
! Total flux subtracted in 200 components = 0.0049571 Jy
! Clean residual min=-0.002907 max=0.002893 Jy/beam
! Clean residual mean=-0.000050 rms=0.000747 Jy/beam
! Combined flux in latest and established models = 0.655066 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 76 components and 0.655066 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.019 mas, bmaj=8.552 mas, bpa=24.97 degrees
! Estimated noise=638.611 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00225897 Jy
! Component: 100  -  total flux cleaned = 0.00351467 Jy
! Component: 150  -  total flux cleaned = 0.00381983 Jy
! Component: 200  -  total flux cleaned = 0.00403427 Jy
! Total flux subtracted in 200 components = 0.00403427 Jy
! Clean residual min=-0.006057 max=0.005069 Jy/beam
! Clean residual mean=-0.000331 rms=0.001784 Jy/beam
! Combined flux in latest and established models = 0.659101 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.000132156 Jy
! Component: 100  -  total flux cleaned = 0.00022824 Jy
! Component: 150  -  total flux cleaned = 0.000279978 Jy
! Component: 200  -  total flux cleaned = 0.000296817 Jy
! Total flux subtracted in 200 components = 0.000296817 Jy
! Clean residual min=-0.006006 max=0.005106 Jy/beam
! Clean residual mean=-0.000340 rms=0.001778 Jy/beam
! Combined flux in latest and established models = 0.659398 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 96 components and 0.659398 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.061 mas, bmaj=3 mas, bpa=-4.546 degrees
! Estimated noise=368.364 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000629312 Jy
! Component: 100  -  total flux cleaned = -0.000905457 Jy
! Component: 150  -  total flux cleaned = -0.000947078 Jy
! Component: 200  -  total flux cleaned = -0.000909856 Jy
! Total flux subtracted in 200 components = -0.000909856 Jy
! Clean residual min=-0.002874 max=0.002825 Jy/beam
! Clean residual mean=-0.000073 rms=0.000735 Jy/beam
! Combined flux in latest and established models = 0.658488 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 104 components and 0.658488 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.292675Jy  sigma=0.001564
! Fit after  self-cal, rms=0.292675Jy  sigma=0.001564
wmodel J0808+4950_S_2001_04_09_pus_map.mod
! Writing 104 model components to file: J0808+4950_S_2001_04_09_pus_map.mod
wobs J0808+4950_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J0808+4950_S_2001_04_09_pus_uvs.fits
wwins J0808+4950_S_2001_04_09_pus_map.win
! wwins: Wrote 4 windows to J0808+4950_S_2001_04_09_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.000384188 Jy
! Component: 100  -  total flux cleaned = -0.000484415 Jy
! Component: 150  -  total flux cleaned = -0.000580757 Jy
! Component: 200  -  total flux cleaned = -0.000811931 Jy
! Component: 250  -  total flux cleaned = -0.00103654 Jy
! Component: 300  -  total flux cleaned = -0.00130025 Jy
! Component: 350  -  total flux cleaned = -0.00151528 Jy
! Component: 400  -  total flux cleaned = -0.00168344 Jy
! Component: 450  -  total flux cleaned = -0.00176594 Jy
! Component: 500  -  total flux cleaned = -0.00192847 Jy
! Component: 550  -  total flux cleaned = -0.00200857 Jy
! Component: 600  -  total flux cleaned = -0.00200875 Jy
! Component: 650  -  total flux cleaned = -0.00196998 Jy
! Component: 700  -  total flux cleaned = -0.00189319 Jy
! Component: 750  -  total flux cleaned = -0.0019701 Jy
! Component: 800  -  total flux cleaned = -0.00196974 Jy
! Component: 850  -  total flux cleaned = -0.00185715 Jy
! Component: 900  -  total flux cleaned = -0.00189414 Jy
! Component: 950  -  total flux cleaned = -0.00182074 Jy
! Component: 1000  -  total flux cleaned = -0.00182074 Jy
! Component: 1050  -  total flux cleaned = -0.00178464 Jy
! Component: 1100  -  total flux cleaned = -0.00185656 Jy
! Component: 1150  -  total flux cleaned = -0.00178496 Jy
! Component: 1200  -  total flux cleaned = -0.00182061 Jy
! Component: 1250  -  total flux cleaned = -0.00178527 Jy
! Component: 1300  -  total flux cleaned = -0.00178533 Jy
! Component: 1350  -  total flux cleaned = -0.00178534 Jy
! Component: 1400  -  total flux cleaned = -0.00175062 Jy
! Component: 1450  -  total flux cleaned = -0.0017162 Jy
! Component: 1500  -  total flux cleaned = -0.00171614 Jy
! Component: 1550  -  total flux cleaned = -0.00168218 Jy
! Component: 1600  -  total flux cleaned = -0.00168208 Jy
! Component: 1650  -  total flux cleaned = -0.00171569 Jy
! Component: 1700  -  total flux cleaned = -0.0016822 Jy
! Component: 1750  -  total flux cleaned = -0.00164905 Jy
! Component: 1800  -  total flux cleaned = -0.00161615 Jy
! Component: 1850  -  total flux cleaned = -0.00158343 Jy
! Component: 1900  -  total flux cleaned = -0.0016492 Jy
! Component: 1950  -  total flux cleaned = -0.00164891 Jy
! Component: 2000  -  total flux cleaned = -0.00161644 Jy
! Total flux subtracted in 2048 components = -0.00164868 Jy
! Clean residual min=-0.001813 max=0.002087 Jy/beam
! Clean residual mean=-0.000050 rms=0.000615 Jy/beam
! Combined flux in latest and established models = 0.656839 Jy
keep
! Adding 189 model components to the UV plane model.
! The established model now contains 293 components and 0.656839 Jy
![Exited script file: muppet]
wmap "J0808+4950_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.061 x 3 at -4.546 degrees (North through East)
! Clean map  min=-0.0024173  max=0.48769 Jy/beam
! Writing clean map to FITS file: J0808+4950_S_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.487693 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000615223 
device "J0808+4950_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J0808+4950_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.378449 0.378449 0.756897 1.51379 3.02759 6.05518 12.1104 24.2207 48.4414 96.8828
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0018 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.487 
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.061 x 3 at -4.546 degrees (North through East)
! Clean map  min=-0.0024173  max=0.48769 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0808+4950_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J0808+4950_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0808+4950_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 15:57:04 2007