! Started logfile: J0345+1453_X_1997_01_11_pus_uvs.log on Sun Feb 12 22:34:54 2006
obs J0345+1453_X_1997_01_11_pus_uva.fits
! Reading UV FITS file: J0345+1453_X_1997_01_11_pus_uva.fits
! AN table 1: 202 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.913311 visibilities/baseline/integration-bin.
! Found source: J0345+1453
! 
! 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  8.15049e+09        4e+06          1        4e+06
!  02        2  8.23236e+09        4e+06          1        4e+06
!  03        3  8.41236e+09        4e+06          1        4e+06
!  04        4  8.55236e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 458 lines of history.
! 
! Reading 33208 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
float field_size
field_size = 512
float field_cell
field_cell = 0.2
float taper_size
taper_size = 70.
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.200x0.200 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 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.817917Jy  sigma=0.006349
! Fit after  self-cal, rms=0.786510Jy  sigma=0.006129
! 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=0.7793 mas, bmaj=1.675 mas, bpa=0.6104 degrees
! Estimated noise=980.804 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.181814 Jy
! Component: 100  -  total flux cleaned = 0.235768 Jy
! Total flux subtracted in 100 components = 0.235768 Jy
! Clean residual min=-0.012285 max=0.023011 Jy/beam
! Clean residual mean=-0.000031 rms=0.003484 Jy/beam
! Combined flux in latest and established models = 0.235768 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.235768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228154Jy  sigma=0.001649
! Fit after  self-cal, rms=0.228076Jy  sigma=0.001648
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0260284 Jy
! Component: 100  -  total flux cleaned = 0.0386223 Jy
! Total flux subtracted in 100 components = 0.0386223 Jy
! Clean residual min=-0.010586 max=0.016684 Jy/beam
! Clean residual mean=0.000010 rms=0.002819 Jy/beam
! Combined flux in latest and established models = 0.27439 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 11 components and 0.27439 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224880Jy  sigma=0.001617
! Fit after  self-cal, rms=0.224832Jy  sigma=0.001617
! Inverting map 
! Added new window around map position (-1.4, -0.6).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.015008 Jy
! Component: 100  -  total flux cleaned = 0.0210966 Jy
! Total flux subtracted in 100 components = 0.0210966 Jy
! Clean residual min=-0.009613 max=0.013754 Jy/beam
! Clean residual mean=0.000029 rms=0.002582 Jy/beam
! Combined flux in latest and established models = 0.295487 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 25 components and 0.295487 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.223929Jy  sigma=0.001609
! Fit after  self-cal, rms=0.223771Jy  sigma=0.001607
! 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=0.9603 mas, bmaj=1.963 mas, bpa=0.5679 degrees
! Estimated noise=498.957 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.00721655 Jy
! Component: 100  -  total flux cleaned = 0.00814406 Jy
! Component: 150  -  total flux cleaned = 0.00825744 Jy
! Component: 200  -  total flux cleaned = 0.008253 Jy
! Total flux subtracted in 200 components = 0.008253 Jy
! Clean residual min=-0.008717 max=0.008009 Jy/beam
! Clean residual mean=0.000019 rms=0.001990 Jy/beam
! Combined flux in latest and established models = 0.30374 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 33 components and 0.30374 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.223526Jy  sigma=0.001605
! Fit after  self-cal, rms=0.223494Jy  sigma=0.001604
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.94     HN        1.23     KP        0.99     
!   LA        0.98     MK        0.93     NL        1.03     OV        0.92     
!   PT        1.15     SC        0.89     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.96     HN        1.20     KP        0.98     
!   LA        0.97     MK        0.94     NL        1.08     OV        0.90     
!   PT        1.10     SC        1.00     
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.97     HN        1.25     KP        0.96     
!   LA        0.98     MK        0.91     NL        1.04     OV        0.91     
!   PT        1.14     SC        1.04     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.98     HN        1.34     KP        0.98     
!   LA        0.99     MK        0.92     NL        1.01     OV        0.92     
!   PT        1.14     SC        1.02     
! 
! 
! Fit before self-cal, rms=0.223494Jy  sigma=0.001604
! Fit after  self-cal, rms=0.233758Jy  sigma=0.001589
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9529 mas, bmaj=1.949 mas, bpa=1.036 degrees
! Estimated noise=498.514 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 (-6.6, 0.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00796016 Jy
! Component: 100  -  total flux cleaned = 0.00836477 Jy
! Component: 150  -  total flux cleaned = 0.00834599 Jy
! Component: 200  -  total flux cleaned = 0.0083518 Jy
! Total flux subtracted in 200 components = 0.0083518 Jy
! Clean residual min=-0.003897 max=0.003504 Jy/beam
! Clean residual mean=0.000005 rms=0.000947 Jy/beam
! Combined flux in latest and established models = 0.312091 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 57 components and 0.312091 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233464Jy  sigma=0.001586
! Fit after  self-cal, rms=0.233818Jy  sigma=0.001586
! 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.233818Jy  sigma=0.001586
! Fit after  self-cal, rms=0.235912Jy  sigma=0.001584
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9563 mas, bmaj=1.945 mas, bpa=1.108 degrees
! Estimated noise=499.27 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00118556 Jy
! Component: 100  -  total flux cleaned = 0.0014736 Jy
! Component: 150  -  total flux cleaned = 0.00132311 Jy
! Component: 200  -  total flux cleaned = 0.00119413 Jy
! Total flux subtracted in 200 components = 0.00119413 Jy
! Clean residual min=-0.003099 max=0.003200 Jy/beam
! Clean residual mean=0.000005 rms=0.000804 Jy/beam
! Combined flux in latest and established models = 0.313286 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 75 components and 0.313286 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.235841Jy  sigma=0.001583
! Fit after  self-cal, rms=0.235906Jy  sigma=0.001583
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.000377953 Jy
! Component: 100  -  total flux cleaned = 0.000318852 Jy
! Component: 150  -  total flux cleaned = 0.000212619 Jy
! Component: 200  -  total flux cleaned = 0.000116194 Jy
! Total flux subtracted in 200 components = 0.000116194 Jy
! Clean residual min=-0.003026 max=0.003035 Jy/beam
! Clean residual mean=0.000005 rms=0.000788 Jy/beam
! Combined flux in latest and established models = 0.313402 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 85 components and 0.313402 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.235874Jy  sigma=0.001583
! Fit after  self-cal, rms=0.235872Jy  sigma=0.001583
! 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.235872Jy  sigma=0.001583
! Fit after  self-cal, rms=0.236963Jy  sigma=0.001583
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9563 mas, bmaj=1.943 mas, bpa=1.164 degrees
! Estimated noise=499.404 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000257075 Jy
! Component: 100  -  total flux cleaned = 0.000535259 Jy
! Component: 150  -  total flux cleaned = 0.000536614 Jy
! Component: 200  -  total flux cleaned = 0.000493069 Jy
! Total flux subtracted in 200 components = 0.000493069 Jy
! Clean residual min=-0.002995 max=0.002941 Jy/beam
! Clean residual mean=0.000006 rms=0.000763 Jy/beam
! Combined flux in latest and established models = 0.313895 Jy
selfcal
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 98 components and 0.313895 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.236934Jy  sigma=0.001583
! Fit after  self-cal, rms=0.236951Jy  sigma=0.001583
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 = 2.44658e-05 Jy
! Component: 100  -  total flux cleaned = 0.000107272 Jy
! Component: 150  -  total flux cleaned = 0.000107211 Jy
! Component: 200  -  total flux cleaned = 0.000107215 Jy
! Total flux subtracted in 200 components = 0.000107215 Jy
! Clean residual min=-0.002965 max=0.002904 Jy/beam
! Clean residual mean=0.000006 rms=0.000755 Jy/beam
! Combined flux in latest and established models = 0.314002 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 102 components and 0.314002 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.236933Jy  sigma=0.001583
! Fit after  self-cal, rms=0.236931Jy  sigma=0.001583
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 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.236931Jy  sigma=0.001583
! Fit after  self-cal, rms=0.237489Jy  sigma=0.001583
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.277 mas, bmaj=2.954 mas, bpa=-0.08451 degrees
! Estimated noise=619.262 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000139631 Jy
! Component: 100  -  total flux cleaned = 0.000148829 Jy
! Component: 150  -  total flux cleaned = 8.98893e-05 Jy
! Component: 200  -  total flux cleaned = 6.40575e-05 Jy
! Total flux subtracted in 200 components = 6.40575e-05 Jy
! Clean residual min=-0.002742 max=0.002756 Jy/beam
! Clean residual mean=0.000012 rms=0.000897 Jy/beam
! Combined flux in latest and established models = 0.314066 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 116 components and 0.314066 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237481Jy  sigma=0.001583
! Fit after  self-cal, rms=0.237494Jy  sigma=0.001583
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.000112146 Jy
! Component: 100  -  total flux cleaned = 0.000164554 Jy
! Component: 150  -  total flux cleaned = 0.000189067 Jy
! Component: 200  -  total flux cleaned = 0.00019087 Jy
! Total flux subtracted in 200 components = 0.00019087 Jy
! Clean residual min=-0.002728 max=0.002779 Jy/beam
! Clean residual mean=0.000012 rms=0.000892 Jy/beam
! Combined flux in latest and established models = 0.314257 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 121 components and 0.314257 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237490Jy  sigma=0.001583
! Fit after  self-cal, rms=0.237491Jy  sigma=0.001583
! 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=0.9562 mas, bmaj=1.942 mas, bpa=1.212 degrees
! Estimated noise=499.419 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9562 x 1.942 at 1.212 degrees (North through East)
! Clean map  min=-0.0027102  max=0.23752 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=0.7786 mas, bmaj=1.661 mas, bpa=1.478 degrees
! Estimated noise=979.939 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.180779 Jy
! Component: 100  -  total flux cleaned = 0.23652 Jy
! Component: 150  -  total flux cleaned = 0.262974 Jy
! Component: 200  -  total flux cleaned = 0.277938 Jy
! Total flux subtracted in 200 components = 0.277938 Jy
! Clean residual min=-0.006737 max=0.007883 Jy/beam
! Clean residual mean=-0.000001 rms=0.001849 Jy/beam
! Combined flux in latest and established models = 0.277938 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 12 model components to the UV plane model.
! The established model now contains 12 components and 0.277938 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9562 mas, bmaj=1.942 mas, bpa=1.212 degrees
! Estimated noise=499.419 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.0132632 Jy
! Component: 100  -  total flux cleaned = 0.0214887 Jy
! Component: 150  -  total flux cleaned = 0.0271484 Jy
! Component: 200  -  total flux cleaned = 0.0312523 Jy
! Total flux subtracted in 200 components = 0.0312523 Jy
! Clean residual min=-0.003243 max=0.003227 Jy/beam
! Clean residual mean=0.000000 rms=0.000875 Jy/beam
! Combined flux in latest and established models = 0.30919 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 44 components and 0.30919 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.277 mas, bmaj=2.954 mas, bpa=-0.08451 degrees
! Estimated noise=619.262 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00472242 Jy
! Component: 100  -  total flux cleaned = 0.00574424 Jy
! Component: 150  -  total flux cleaned = 0.00574426 Jy
! Component: 200  -  total flux cleaned = 0.00580619 Jy
! Total flux subtracted in 200 components = 0.0058062 Jy
! Clean residual min=-0.003024 max=0.002845 Jy/beam
! Clean residual mean=0.000012 rms=0.000928 Jy/beam
! Combined flux in latest and established models = 0.314996 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 = -4.98142e-06 Jy
! Component: 100  -  total flux cleaned = -4.59957e-06 Jy
! Component: 150  -  total flux cleaned = 3.81502e-05 Jy
! Component: 200  -  total flux cleaned = 7.29916e-05 Jy
! Total flux subtracted in 200 components = 7.29916e-05 Jy
! Clean residual min=-0.002821 max=0.002868 Jy/beam
! Clean residual mean=0.000013 rms=0.000900 Jy/beam
! Combined flux in latest and established models = 0.315069 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 77 components and 0.315069 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9562 mas, bmaj=1.942 mas, bpa=1.212 degrees
! Estimated noise=499.419 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000156957 Jy
! Component: 100  -  total flux cleaned = -0.000308492 Jy
! Component: 150  -  total flux cleaned = -0.000189734 Jy
! Component: 200  -  total flux cleaned = -0.000135918 Jy
! Total flux subtracted in 200 components = -0.000135918 Jy
! Clean residual min=-0.002827 max=0.003025 Jy/beam
! Clean residual mean=0.000007 rms=0.000758 Jy/beam
! Combined flux in latest and established models = 0.314933 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 92 components and 0.314933 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237513Jy  sigma=0.001583
! Fit after  self-cal, rms=0.237500Jy  sigma=0.001583
wmodel J0345+1453_X_1997_01_11_pus_map.mod
! Writing 92 model components to file: J0345+1453_X_1997_01_11_pus_map.mod
wobs J0345+1453_X_1997_01_11_pus_uvs.fits
! Writing UV FITS file: J0345+1453_X_1997_01_11_pus_uvs.fits
wwins J0345+1453_X_1997_01_11_pus_map.win
! wwins: Wrote 3 windows to J0345+1453_X_1997_01_11_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.00015783 Jy
! Component: 100  -  total flux cleaned = -0.000400501 Jy
! Component: 150  -  total flux cleaned = -0.000633078 Jy
! Component: 200  -  total flux cleaned = -0.000855406 Jy
! Component: 250  -  total flux cleaned = -0.00102743 Jy
! Component: 300  -  total flux cleaned = -0.00115307 Jy
! Component: 350  -  total flux cleaned = -0.0012764 Jy
! Component: 400  -  total flux cleaned = -0.00147663 Jy
! Component: 450  -  total flux cleaned = -0.00135939 Jy
! Component: 500  -  total flux cleaned = -0.00151496 Jy
! Component: 550  -  total flux cleaned = -0.00159059 Jy
! Component: 600  -  total flux cleaned = -0.00155361 Jy
! Component: 650  -  total flux cleaned = -0.00155414 Jy
! Component: 700  -  total flux cleaned = -0.0014817 Jy
! Component: 750  -  total flux cleaned = -0.00144631 Jy
! Component: 800  -  total flux cleaned = -0.00137651 Jy
! Component: 850  -  total flux cleaned = -0.00134178 Jy
! Component: 900  -  total flux cleaned = -0.00113587 Jy
! Component: 950  -  total flux cleaned = -0.000865489 Jy
! Component: 1000  -  total flux cleaned = -0.000798902 Jy
! Component: 1050  -  total flux cleaned = -0.000567812 Jy
! Component: 1100  -  total flux cleaned = -0.000503446 Jy
! Component: 1150  -  total flux cleaned = -0.000277547 Jy
! Component: 1200  -  total flux cleaned = -0.000245622 Jy
! Component: 1250  -  total flux cleaned = -0.000119563 Jy
! Component: 1300  -  total flux cleaned = 5.19646e-06 Jy
! Component: 1350  -  total flux cleaned = 3.60201e-05 Jy
! Component: 1400  -  total flux cleaned = 0.000249932 Jy
! Component: 1450  -  total flux cleaned = 0.000339815 Jy
! Component: 1500  -  total flux cleaned = 0.000459275 Jy
! Component: 1550  -  total flux cleaned = 0.00060742 Jy
! Component: 1600  -  total flux cleaned = 0.000753004 Jy
! Component: 1650  -  total flux cleaned = 0.00078181 Jy
! Component: 1700  -  total flux cleaned = 0.000867567 Jy
! Component: 1750  -  total flux cleaned = 0.000867792 Jy
! Component: 1800  -  total flux cleaned = 0.00103618 Jy
! Component: 1850  -  total flux cleaned = 0.0010359 Jy
! Component: 1900  -  total flux cleaned = 0.0010911 Jy
! Component: 1950  -  total flux cleaned = 0.00122761 Jy
! Component: 2000  -  total flux cleaned = 0.00122713 Jy
! Total flux subtracted in 2048 components = 0.00125402 Jy
! Clean residual min=-0.001393 max=0.001620 Jy/beam
! Clean residual mean=0.000005 rms=0.000521 Jy/beam
! Combined flux in latest and established models = 0.316187 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 239 components and 0.316187 Jy
wmap "J0345+1453_X_1997_01_11_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9562 x 1.942 at 1.212 degrees (North through East)
! Clean map  min=-0.0024871  max=0.23797 Jy/beam
! Writing clean map to FITS file: J0345+1453_X_1997_01_11_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.237967 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000520325 
device "J0345+1453_X_1997_01_11_pus\_map.eps/VPS"
! Attempting to open device: 'J0345+1453_X_1997_01_11_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.655963 0.655963 1.31193 2.62385 5.2477 10.4954 20.9908 41.9816 83.9632
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.237 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9562 x 1.942 at 1.212 degrees (North through East)
! Clean map  min=-0.0024871  max=0.23797 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0345+1453_X_1997_01_11_pus\_map.gif/vgif"
! Attempting to open device: 'J0345+1453_X_1997_01_11_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0345+1453_X_1997_01_11_pus_uvs.log closed on Sun Feb 12 22:35:51 2006