! Started logfile: J0204+1514_S_2000_05_22_pus_uvs.log on Tue Nov 20 14:24:57 2007
obs J0204+1514_S_2000_05_22_pus_uva.fits
! Reading UV FITS file: J0204+1514_S_2000_05_22_pus_uva.fits
! AN table 1: 37 integrations on 190 of 190 possible baselines.
! AN table 2: 56 integrations on 190 of 190 possible baselines.
! AN table 3: 67 integrations on 190 of 190 possible baselines.
! AN table 4: 324 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.167584 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0204+1514
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2007 lines of history.
! 
! Reading 61644 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 J0204+1514_S_2000_05_22_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 541 telescope corrections were flagged in sub-array 1.
!  A total of 842 telescope corrections were flagged in sub-array 2.
!  A total of 721 telescope corrections were flagged in sub-array 3.
!  A total of 4220 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 544 telescope corrections were flagged in sub-array 1.
!  A total of 842 telescope corrections were flagged in sub-array 2.
!  A total of 712 telescope corrections were flagged in sub-array 3.
!  A total of 4221 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 545 telescope corrections were flagged in sub-array 1.
!  A total of 842 telescope corrections were flagged in sub-array 2.
!  A total of 711 telescope corrections were flagged in sub-array 3.
!  A total of 4220 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 541 telescope corrections were flagged in sub-array 1.
!  A total of 842 telescope corrections were flagged in sub-array 2.
!  A total of 711 telescope corrections were flagged in sub-array 3.
!  A total of 4220 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.897070Jy  sigma=0.008050
! Fit after  self-cal, rms=0.416857Jy  sigma=0.003796
! 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.857 mas, bmaj=3.616 mas, bpa=4.335 degrees
! Estimated noise=845.858 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.707376 Jy
! Component: 100  -  total flux cleaned = 0.921149 Jy
! Total flux subtracted in 100 components = 0.921149 Jy
! Clean residual min=-0.035648 max=0.147196 Jy/beam
! Clean residual mean=0.000359 rms=0.011562 Jy/beam
! Combined flux in latest and established models = 0.921149 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.921149 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409036Jy  sigma=0.003871
! Fit after  self-cal, rms=0.408709Jy  sigma=0.003869
! Inverting map 
! Added new window around map position (-3, 2.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.146443 Jy
! Component: 100  -  total flux cleaned = 0.238287 Jy
! Total flux subtracted in 100 components = 0.238287 Jy
! Clean residual min=-0.025039 max=0.052963 Jy/beam
! Clean residual mean=0.000219 rms=0.007822 Jy/beam
! Combined flux in latest and established models = 1.15944 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 28 components and 1.15944 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.312210Jy  sigma=0.002763
! Fit after  self-cal, rms=0.305675Jy  sigma=0.002722
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0773369 Jy
! Component: 100  -  total flux cleaned = 0.130847 Jy
! Total flux subtracted in 100 components = 0.130847 Jy
! Clean residual min=-0.019813 max=0.030822 Jy/beam
! Clean residual mean=0.000143 rms=0.005837 Jy/beam
! Combined flux in latest and established models = 1.29028 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 48 components and 1.29028 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.267796Jy  sigma=0.002240
! Fit after  self-cal, rms=0.264612Jy  sigma=0.002220
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0469088 Jy
! Component: 100  -  total flux cleaned = 0.080938 Jy
! Total flux subtracted in 100 components = 0.080938 Jy
! Clean residual min=-0.017184 max=0.022112 Jy/beam
! Clean residual mean=0.000096 rms=0.004904 Jy/beam
! Combined flux in latest and established models = 1.37122 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 62 components and 1.37122 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248226Jy  sigma=0.001990
! Fit after  self-cal, rms=0.246849Jy  sigma=0.001982
! 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.306 mas, bmaj=6.356 mas, bpa=-3.498 degrees
! Estimated noise=322.265 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.0638856 Jy
! Component: 100  -  total flux cleaned = 0.100891 Jy
! Component: 150  -  total flux cleaned = 0.124969 Jy
! Component: 200  -  total flux cleaned = 0.141054 Jy
! Total flux subtracted in 200 components = 0.141054 Jy
! Clean residual min=-0.012571 max=0.015811 Jy/beam
! Clean residual mean=0.000180 rms=0.003913 Jy/beam
! Combined flux in latest and established models = 1.51227 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 87 components and 1.51227 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232465Jy  sigma=0.001753
! Fit after  self-cal, rms=0.231840Jy  sigma=0.001747
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.04     GC        1.04     GG        1.00*    
!   HH        0.97     HN        1.11     KK        1.00     KP        1.04     
!   MA        1.32     MC        1.08     MK        1.00*    NL        1.01     
!   NY        1.08     OV        1.00     PT        0.97     SC        1.00*    
!   TS        0.93     WF        1.12     WZ        1.02     LA        1.05     
! 
!  A total of 75 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.08     GC        1.09     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.93     KP        1.10     
!   MA        1.00*    MC        1.00*    MK        0.96     NL        1.00*    
!   NY        1.04     OV        1.04     PT        1.00     SC        1.00*    
!   TS        1.00     WF        1.00*    WZ        1.00*    LA        1.06     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        0.95     GC        1.16     GG        1.00*    
!   HH        1.00     HN        0.98     KK        0.98     KP        1.00     
!   MA        0.96     MC        1.17     MK        1.02     NL        0.99     
!   NY        1.01     OV        1.01     PT        0.99     SC        0.98     
!   TS        0.95     WF        1.12     WZ        0.92     LA        0.97     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.96     FD        0.96     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        0.98     KP        1.00     
!   MA        1.00*    MC        1.00*    MK        1.03     NL        0.98     
!   NY        1.84     OV        0.99     PT        0.96     SC        0.99     
!   TS        1.00*    WF        1.01     WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.06     GC        1.03     GG        1.00*    
!   HH        0.91     HN        1.18     KK        0.99     KP        0.98     
!   MA        0.91     MC        1.11     MK        1.00*    NL        1.02     
!   NY        1.05     OV        0.98     PT        0.98     SC        1.00*    
!   TS        0.95     WF        1.04     WZ        0.99     LA        1.00     
! 
!  A total of 75 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.09     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.96     KP        1.05     
!   MA        1.00*    MC        1.00*    MK        0.92     NL        1.00*    
!   NY        1.07     OV        1.02     PT        1.03     SC        1.00*    
!   TS        1.03     WF        1.00*    WZ        1.00*    LA        1.02     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.97     GC        1.14     GG        1.00*    
!   HH        0.97     HN        1.12     KK        0.97     KP        0.98     
!   MA        1.19     MC        1.05     MK        0.96     NL        1.02     
!   NY        1.01     OV        1.00     PT        1.00     SC        1.04     
!   TS        0.96     WF        1.07     WZ        0.91     LA        0.93     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.96     FD        0.97     GC        0.94     GG        1.00*    
!   HH        1.00*    HN        1.05     KK        1.02     KP        0.98     
!   MA        1.00*    MC        1.00*    MK        0.98     NL        1.00     
!   NY        1.00*    OV        0.98     PT        0.97     SC        1.00     
!   TS        1.00*    WF        1.00     WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.04     GC        1.01     GG        1.00*    
!   HH        0.87     HN        1.16     KK        0.94     KP        0.95     
!   MA        0.87     MC        0.76     MK        1.00*    NL        0.98     
!   NY        1.01     OV        1.03     PT        0.98     SC        1.00*    
!   TS        0.96     WF        1.05     WZ        1.10     LA        1.05     
! 
!  A total of 75 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.09     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.93     KP        1.09     
!   MA        1.00*    MC        1.00*    MK        0.93     NL        1.00*    
!   NY        1.04     OV        1.07     PT        1.02     SC        1.00*    
!   TS        1.07     WF        1.00*    WZ        1.00*    LA        1.06     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.97     GC        1.10     GG        1.00*    
!   HH        0.92     HN        1.02     KK        0.94     KP        1.00     
!   MA        1.44     MC        2.62     MK        0.98     NL        0.96     
!   NY        1.04     OV        1.03     PT        0.99     SC        1.00     
!   TS        0.98     WF        1.12     WZ        0.96     LA        0.98     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        0.98     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.98     KP        0.99     
!   MA        1.00*    MC        1.00*    MK        0.98     NL        0.96     
!   NY        0.90     OV        1.02     PT        0.96     SC        0.98     
!   TS        1.00*    WF        0.98     WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.00     GC        0.95     GG        1.00*    
!   HH        0.95     HN        1.15     KK        0.98     KP        0.99     
!   MA        1.04     MC        0.78     MK        1.00*    NL        1.01     
!   NY        0.98     OV        0.99     PT        0.98     SC        1.00*    
!   TS        1.00     WF        1.05     WZ        1.05     LA        1.06     
! 
!  A total of 75 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.08     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.96     KP        1.07     
!   MA        1.00*    MC        1.00*    MK        0.98     NL        1.00*    
!   NY        1.01     OV        1.04     PT        1.04     SC        1.00*    
!   TS        1.06     WF        1.00*    WZ        1.00*    LA        1.06     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        0.98     GC        1.10     GG        1.00*    
!   HH        1.14     HN        1.03     KK        0.98     KP        1.00     
!   MA        1.00     MC        2.11     MK        1.03     NL        0.97     
!   NY        0.98     OV        0.99     PT        1.01     SC        0.98     
!   TS        0.98     WF        1.06     WZ        0.93     LA        0.99     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.96     FD        0.98     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.01     KP        1.00     
!   MA        1.00*    MC        1.00*    MK        1.03     NL        0.98     
!   NY        0.96     OV        0.99     PT        1.01     SC        0.97     
!   TS        1.00*    WF        1.09     WZ        1.00*    LA        1.00*    
! 
! 
! Fit before self-cal, rms=0.231840Jy  sigma=0.001747
! Fit after  self-cal, rms=0.259429Jy  sigma=0.001624
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.325 mas, bmaj=6.384 mas, bpa=-3.526 degrees
! Estimated noise=321.85 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.00354948 Jy
! Component: 100  -  total flux cleaned = 0.00248805 Jy
! Component: 150  -  total flux cleaned = 0.00192099 Jy
! Component: 200  -  total flux cleaned = 0.00222706 Jy
! Total flux subtracted in 200 components = 0.00222706 Jy
! Clean residual min=-0.010188 max=0.008174 Jy/beam
! Clean residual mean=0.000105 rms=0.002625 Jy/beam
! Combined flux in latest and established models = 1.5145 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 98 components and 1.5145 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258865Jy  sigma=0.001618
! Fit after  self-cal, rms=0.259529Jy  sigma=0.001617
! 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.259529Jy  sigma=0.001617
! Fit after  self-cal, rms=0.262208Jy  sigma=0.001610
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.329 mas, bmaj=6.38 mas, bpa=-3.497 degrees
! Estimated noise=321.163 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000595759 Jy
! Component: 100  -  total flux cleaned = -0.000931836 Jy
! Component: 150  -  total flux cleaned = -0.000795258 Jy
! Component: 200  -  total flux cleaned = -0.000686017 Jy
! Total flux subtracted in 200 components = -0.000686017 Jy
! Clean residual min=-0.009824 max=0.007904 Jy/beam
! Clean residual mean=0.000128 rms=0.002501 Jy/beam
! Combined flux in latest and established models = 1.51382 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 100 components and 1.51382 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.261993Jy  sigma=0.001608
! Fit after  self-cal, rms=0.262002Jy  sigma=0.001608
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.000582507 Jy
! Component: 100  -  total flux cleaned = 0.000904121 Jy
! Component: 150  -  total flux cleaned = 0.00109313 Jy
! Component: 200  -  total flux cleaned = 0.00126729 Jy
! Total flux subtracted in 200 components = 0.00126729 Jy
! Clean residual min=-0.009583 max=0.007875 Jy/beam
! Clean residual mean=0.000128 rms=0.002460 Jy/beam
! Combined flux in latest and established models = 1.51508 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 101 components and 1.51508 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.261925Jy  sigma=0.001607
! Fit after  self-cal, rms=0.261902Jy  sigma=0.001607
! 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.261902Jy  sigma=0.001607
! Fit after  self-cal, rms=0.263995Jy  sigma=0.001606
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.332 mas, bmaj=6.381 mas, bpa=-3.508 degrees
! Estimated noise=321.081 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00145139 Jy
! Component: 100  -  total flux cleaned = -0.00146857 Jy
! Component: 150  -  total flux cleaned = -0.0013028 Jy
! Component: 200  -  total flux cleaned = -0.00115068 Jy
! Total flux subtracted in 200 components = -0.00115068 Jy
! Clean residual min=-0.008954 max=0.007888 Jy/beam
! Clean residual mean=0.000128 rms=0.002427 Jy/beam
! Combined flux in latest and established models = 1.51393 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 103 components and 1.51393 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.263922Jy  sigma=0.001605
! Fit after  self-cal, rms=0.263924Jy  sigma=0.001605
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.000280806 Jy
! Component: 100  -  total flux cleaned = 0.000569556 Jy
! Component: 150  -  total flux cleaned = 0.0006968 Jy
! Component: 200  -  total flux cleaned = 0.000820681 Jy
! Total flux subtracted in 200 components = 0.000820682 Jy
! Clean residual min=-0.008723 max=0.007863 Jy/beam
! Clean residual mean=0.000129 rms=0.002410 Jy/beam
! Combined flux in latest and established models = 1.51475 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 108 components and 1.51475 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.263889Jy  sigma=0.001605
! Fit after  self-cal, rms=0.263879Jy  sigma=0.001605
! 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.263879Jy  sigma=0.001605
! Fit after  self-cal, rms=0.265236Jy  sigma=0.001605
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.571 mas, bmaj=10.94 mas, bpa=-11.61 degrees
! Estimated noise=450.929 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000270264 Jy
! Component: 100  -  total flux cleaned = -0.000254149 Jy
! Component: 150  -  total flux cleaned = -0.000169948 Jy
! Component: 200  -  total flux cleaned = 2.28422e-05 Jy
! Total flux subtracted in 200 components = 2.28422e-05 Jy
! Clean residual min=-0.017319 max=0.016773 Jy/beam
! Clean residual mean=0.000386 rms=0.005903 Jy/beam
! Combined flux in latest and established models = 1.51478 Jy
selfcal
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 110 components and 1.51478 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265345Jy  sigma=0.001605
! Fit after  self-cal, rms=0.265226Jy  sigma=0.001604
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 = -4.29636e-05 Jy
! Component: 100  -  total flux cleaned = -6.41226e-05 Jy
! Component: 150  -  total flux cleaned = 8.8209e-05 Jy
! Component: 200  -  total flux cleaned = 0.000197496 Jy
! Total flux subtracted in 200 components = 0.000197496 Jy
! Clean residual min=-0.017169 max=0.016608 Jy/beam
! Clean residual mean=0.000388 rms=0.005911 Jy/beam
! Combined flux in latest and established models = 1.51497 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 111 components and 1.51497 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265368Jy  sigma=0.001605
! Fit after  self-cal, rms=0.265284Jy  sigma=0.001604
! 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.335 mas, bmaj=6.381 mas, bpa=-3.516 degrees
! Estimated noise=321.142 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.335 x 6.381 at -3.516 degrees (North through East)
! Clean map  min=-0.0069865  max=0.96534 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.265284Jy  sigma=0.001604
! Fit after  self-cal, rms=0.900968Jy  sigma=0.001320
! Inverting map and beam 
! Estimated beam: bmin=2.34 mas, bmaj=6.382 mas, bpa=-3.563 degrees
! Estimated noise=321.159 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000206261 Jy
! Component: 100  -  total flux cleaned = -0.000555131 Jy
! Component: 150  -  total flux cleaned = -0.000732261 Jy
! Component: 200  -  total flux cleaned = -0.000730736 Jy
! Total flux subtracted in 200 components = -0.000730736 Jy
! Clean residual min=-0.006799 max=0.008208 Jy/beam
! Clean residual mean=0.000100 rms=0.002325 Jy/beam
! Combined flux in latest and established models = 1.51424 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 113 components and 1.51424 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.900913Jy  sigma=0.001319
! Fit after  self-cal, rms=0.900923Jy  sigma=0.001319
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000266909 Jy
! Component: 100  -  total flux cleaned = 0.000328722 Jy
! Component: 150  -  total flux cleaned = 0.000387609 Jy
! Component: 200  -  total flux cleaned = 0.000501535 Jy
! Total flux subtracted in 200 components = 0.000501535 Jy
! Clean residual min=-0.006841 max=0.008304 Jy/beam
! Clean residual mean=0.000099 rms=0.002312 Jy/beam
! Combined flux in latest and established models = 1.51474 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 113 components and 1.51474 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.900904Jy  sigma=0.001319
! Fit after  self-cal, rms=0.900893Jy  sigma=0.001319
! 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.900893Jy  sigma=0.001319
! Fit after  self-cal, rms=0.904947Jy  sigma=0.001319
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.899 mas, bmaj=3.584 mas, bpa=4.696 degrees
! Estimated noise=864.841 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.7174 Jy
! Component: 100  -  total flux cleaned = 0.959323 Jy
! Component: 150  -  total flux cleaned = 1.10576 Jy
! Component: 200  -  total flux cleaned = 1.20314 Jy
! Total flux subtracted in 200 components = 1.20314 Jy
! Clean residual min=-0.018447 max=0.053783 Jy/beam
! Clean residual mean=0.000170 rms=0.005445 Jy/beam
! Combined flux in latest and established models = 1.20314 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 26 model components to the UV plane model.
! The established model now contains 26 components and 1.20314 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.341 mas, bmaj=6.381 mas, bpa=-3.565 degrees
! Estimated noise=321.217 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.11717 Jy
! Component: 100  -  total flux cleaned = 0.183824 Jy
! Component: 150  -  total flux cleaned = 0.225697 Jy
! Component: 200  -  total flux cleaned = 0.253213 Jy
! Total flux subtracted in 200 components = 0.253213 Jy
! Clean residual min=-0.009558 max=0.017337 Jy/beam
! Clean residual mean=0.000092 rms=0.003462 Jy/beam
! Combined flux in latest and established models = 1.45636 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 72 components and 1.45636 Jy
! Inverting map 
! Added new window around map position (0, 5.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0194348 Jy
! Component: 100  -  total flux cleaned = 0.0326699 Jy
! Component: 150  -  total flux cleaned = 0.0419096 Jy
! Component: 200  -  total flux cleaned = 0.0486193 Jy
! Total flux subtracted in 200 components = 0.0486193 Jy
! Clean residual min=-0.007096 max=0.008289 Jy/beam
! Clean residual mean=0.000105 rms=0.002316 Jy/beam
! Combined flux in latest and established models = 1.50498 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 98 components and 1.50498 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.565 mas, bmaj=10.94 mas, bpa=-11.66 degrees
! Estimated noise=450.597 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00814814 Jy
! Component: 100  -  total flux cleaned = 0.0117727 Jy
! Component: 150  -  total flux cleaned = 0.0136655 Jy
! Component: 200  -  total flux cleaned = 0.0141823 Jy
! Total flux subtracted in 200 components = 0.0141823 Jy
! Clean residual min=-0.016265 max=0.016900 Jy/beam
! Clean residual mean=0.000335 rms=0.005848 Jy/beam
! Combined flux in latest and established models = 1.51916 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 = -3.52614e-05 Jy
! Component: 100  -  total flux cleaned = -3.25338e-05 Jy
! Component: 150  -  total flux cleaned = -3.28397e-05 Jy
! Component: 200  -  total flux cleaned = -6.29568e-05 Jy
! Total flux subtracted in 200 components = -6.29568e-05 Jy
! Clean residual min=-0.016221 max=0.016902 Jy/beam
! Clean residual mean=0.000334 rms=0.005843 Jy/beam
! Combined flux in latest and established models = 1.5191 Jy
! Adding 44 model components to the UV plane model.
! The established model now contains 137 components and 1.5191 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.341 mas, bmaj=6.381 mas, bpa=-3.565 degrees
! Estimated noise=321.217 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0022568 Jy
! Component: 100  -  total flux cleaned = -0.00205407 Jy
! Component: 150  -  total flux cleaned = -0.00186281 Jy
! Component: 200  -  total flux cleaned = -0.00176951 Jy
! Total flux subtracted in 200 components = -0.00176951 Jy
! Clean residual min=-0.006695 max=0.008204 Jy/beam
! Clean residual mean=0.000110 rms=0.002202 Jy/beam
! Combined flux in latest and established models = 1.51733 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 147 components and 1.51733 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.904955Jy  sigma=0.001318
! Fit after  self-cal, rms=0.905049Jy  sigma=0.001317
wmodel J0204+1514_S_2000_05_22_pus_map.mod
! Writing 147 model components to file: J0204+1514_S_2000_05_22_pus_map.mod
wobs J0204+1514_S_2000_05_22_pus_uvs.fits
! Writing UV FITS file: J0204+1514_S_2000_05_22_pus_uvs.fits
wwins J0204+1514_S_2000_05_22_pus_map.win
! wwins: Wrote 3 windows to J0204+1514_S_2000_05_22_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.00236938 Jy
! Component: 100  -  total flux cleaned = 0.00296087 Jy
! Component: 150  -  total flux cleaned = 0.00318212 Jy
! Component: 200  -  total flux cleaned = 0.00265294 Jy
! Component: 250  -  total flux cleaned = 0.00214929 Jy
! Component: 300  -  total flux cleaned = 0.00156847 Jy
! Component: 350  -  total flux cleaned = 0.00119409 Jy
! Component: 400  -  total flux cleaned = 0.000736573 Jy
! Component: 450  -  total flux cleaned = 0.000470329 Jy
! Component: 500  -  total flux cleaned = 0.000211993 Jy
! Component: 550  -  total flux cleaned = 4.38295e-05 Jy
! Component: 600  -  total flux cleaned = -0.00020329 Jy
! Component: 650  -  total flux cleaned = -0.000284518 Jy
! Component: 700  -  total flux cleaned = -0.000364315 Jy
! Component: 750  -  total flux cleaned = -0.000364792 Jy
! Component: 800  -  total flux cleaned = -0.000516379 Jy
! Component: 850  -  total flux cleaned = -0.000367044 Jy
! Component: 900  -  total flux cleaned = -0.000439772 Jy
! Component: 950  -  total flux cleaned = -0.00043827 Jy
! Component: 1000  -  total flux cleaned = -0.000298195 Jy
! Component: 1050  -  total flux cleaned = -2.23673e-05 Jy
! Component: 1100  -  total flux cleaned = 0.000386414 Jy
! Component: 1150  -  total flux cleaned = 0.000855842 Jy
! Component: 1200  -  total flux cleaned = 0.00125126 Jy
! Component: 1250  -  total flux cleaned = 0.00157598 Jy
! Component: 1300  -  total flux cleaned = 0.00183372 Jy
! Component: 1350  -  total flux cleaned = 0.00215199 Jy
! Component: 1400  -  total flux cleaned = 0.00252807 Jy
! Component: 1450  -  total flux cleaned = 0.00277604 Jy
! Component: 1500  -  total flux cleaned = 0.00302174 Jy
! Component: 1550  -  total flux cleaned = 0.00350717 Jy
! Component: 1600  -  total flux cleaned = 0.00404571 Jy
! Component: 1650  -  total flux cleaned = 0.00439999 Jy
! Component: 1700  -  total flux cleaned = 0.00486855 Jy
! Component: 1750  -  total flux cleaned = 0.00515816 Jy
! Component: 1800  -  total flux cleaned = 0.00567365 Jy
! Component: 1850  -  total flux cleaned = 0.00607105 Jy
! Component: 1900  -  total flux cleaned = 0.00657756 Jy
! Component: 1950  -  total flux cleaned = 0.00702245 Jy
! Component: 2000  -  total flux cleaned = 0.00740839 Jy
! Total flux subtracted in 2048 components = 0.00773655 Jy
! Clean residual min=-0.003649 max=0.003728 Jy/beam
! Clean residual mean=0.000092 rms=0.001305 Jy/beam
! Combined flux in latest and established models = 1.52506 Jy
keep
! Adding 208 model components to the UV plane model.
! The established model now contains 355 components and 1.52506 Jy
![Exited script file: muppet]
wmap "J0204+1514_S_2000_05_22_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.341 x 6.381 at -3.565 degrees (North through East)
! Clean map  min=-0.0050192  max=0.97002 Jy/beam
! Writing clean map to FITS file: J0204+1514_S_2000_05_22_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.970019 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00128726 
device "J0204+1514_S_2000_05_22_pus\_map.eps/VPS"
! Attempting to open device: 'J0204+1514_S_2000_05_22_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.398114 0.398114 0.796227 1.59245 3.18491 6.36982 12.7396 25.4793 50.9585
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0038 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.97 
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.341 x 6.381 at -3.565 degrees (North through East)
! Clean map  min=-0.0050192  max=0.97002 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0204+1514_S_2000_05_22_pus\_map.gif/vgif"
! Attempting to open device: 'J0204+1514_S_2000_05_22_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0204+1514_S_2000_05_22_pus_uvs.log closed on Tue Nov 20 14:25:22 2007