! Started logfile: J0426+0518_X_1997_01_11_pus_uvs.log on Tue Feb 14 14:09:30 2006
obs J0426+0518_X_1997_01_11_pus_uva.fits
! Reading UV FITS file: J0426+0518_X_1997_01_11_pus_uva.fits
! AN table 1: 268 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.629685 visibilities/baseline/integration-bin.
! Found source: J0426+0518
! 
! 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 465 lines of history.
! 
! Reading 30376 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 561 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 561 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 561 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 561 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.827052Jy  sigma=0.006655
! Fit after  self-cal, rms=0.797168Jy  sigma=0.006434
! 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.8188 mas, bmaj=1.793 mas, bpa=0.7205 degrees
! Estimated noise=726.049 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.167266 Jy
! Component: 100  -  total flux cleaned = 0.214211 Jy
! Total flux subtracted in 100 components = 0.214211 Jy
! Clean residual min=-0.015326 max=0.034400 Jy/beam
! Clean residual mean=-0.000256 rms=0.004074 Jy/beam
! Combined flux in latest and established models = 0.214211 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 15 components and 0.214211 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.218449Jy  sigma=0.001688
! Fit after  self-cal, rms=0.218278Jy  sigma=0.001687
! Inverting map 
! Added new window around map position (1.8, -2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0343003 Jy
! Component: 100  -  total flux cleaned = 0.0565662 Jy
! Total flux subtracted in 100 components = 0.0565662 Jy
! Clean residual min=-0.011616 max=0.014881 Jy/beam
! Clean residual mean=-0.000152 rms=0.002822 Jy/beam
! Combined flux in latest and established models = 0.270777 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 36 components and 0.270777 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.210155Jy  sigma=0.001615
! Fit after  self-cal, rms=0.209511Jy  sigma=0.001610
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0195291 Jy
! Component: 100  -  total flux cleaned = 0.0327942 Jy
! Total flux subtracted in 100 components = 0.0327942 Jy
! Clean residual min=-0.008679 max=0.010612 Jy/beam
! Clean residual mean=-0.000090 rms=0.002169 Jy/beam
! Combined flux in latest and established models = 0.303572 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 42 components and 0.303572 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.206842Jy  sigma=0.001586
! Fit after  self-cal, rms=0.206649Jy  sigma=0.001584
! 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=1.034 mas, bmaj=2.11 mas, bpa=-0.6475 degrees
! Estimated noise=504.602 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.8, -2.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0160473 Jy
! Component: 100  -  total flux cleaned = 0.0250017 Jy
! Component: 150  -  total flux cleaned = 0.030578 Jy
! Component: 200  -  total flux cleaned = 0.0330616 Jy
! Total flux subtracted in 200 components = 0.0330616 Jy
! Clean residual min=-0.005471 max=0.008040 Jy/beam
! Clean residual mean=0.000001 rms=0.001759 Jy/beam
! Combined flux in latest and established models = 0.336633 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 69 components and 0.336633 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.205377Jy  sigma=0.001572
! Fit after  self-cal, rms=0.205261Jy  sigma=0.001571
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.98     HN        1.00*    KP        0.94     
!   LA        0.93     MK        1.01     NL        1.07     OV        0.93     
!   PT        1.09     SC        0.91     
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.96     HN        1.00*    KP        0.96     
!   LA        0.93     MK        0.99     NL        1.08     OV        0.95     
!   PT        1.11     SC        0.99     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        0.96     HN        1.00*    KP        0.94     
!   LA        0.94     MK        1.02     NL        1.12     OV        0.94     
!   PT        1.10     SC        1.08     
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.96     HN        1.00*    KP        0.97     
!   LA        0.98     MK        0.98     NL        1.06     OV        0.93     
!   PT        1.12     SC        1.03     
! 
! 
! Fit before self-cal, rms=0.205261Jy  sigma=0.001571
! Fit after  self-cal, rms=0.207470Jy  sigma=0.001563
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=1.037 mas, bmaj=2.124 mas, bpa=-0.4346 degrees
! Estimated noise=499.491 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.00389372 Jy
! Component: 100  -  total flux cleaned = 0.00379504 Jy
! Component: 150  -  total flux cleaned = 0.00373209 Jy
! Component: 200  -  total flux cleaned = 0.00356006 Jy
! Total flux subtracted in 200 components = 0.00356006 Jy
! Clean residual min=-0.003345 max=0.003824 Jy/beam
! Clean residual mean=0.000015 rms=0.001072 Jy/beam
! Combined flux in latest and established models = 0.340193 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 90 components and 0.340193 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207356Jy  sigma=0.001562
! Fit after  self-cal, rms=0.207651Jy  sigma=0.001561
! 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.207651Jy  sigma=0.001561
! Fit after  self-cal, rms=0.207833Jy  sigma=0.001559
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.039 mas, bmaj=2.119 mas, bpa=-0.3139 degrees
! Estimated noise=499.317 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00217621 Jy
! Component: 100  -  total flux cleaned = 0.00190951 Jy
! Component: 150  -  total flux cleaned = 0.00175947 Jy
! Component: 200  -  total flux cleaned = 0.00158738 Jy
! Total flux subtracted in 200 components = 0.00158738 Jy
! Clean residual min=-0.002992 max=0.003536 Jy/beam
! Clean residual mean=0.000007 rms=0.000879 Jy/beam
! Combined flux in latest and established models = 0.341781 Jy
selfcal
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 101 components and 0.341781 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207788Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207835Jy  sigma=0.001558
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.000297501 Jy
! Component: 100  -  total flux cleaned = 0.000296963 Jy
! Component: 150  -  total flux cleaned = 0.00021566 Jy
! Component: 200  -  total flux cleaned = 0.000144412 Jy
! Total flux subtracted in 200 components = 0.000144412 Jy
! Clean residual min=-0.002913 max=0.003449 Jy/beam
! Clean residual mean=0.000008 rms=0.000865 Jy/beam
! Combined flux in latest and established models = 0.341925 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 110 components and 0.341925 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207815Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207811Jy  sigma=0.001558
! 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.207811Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207789Jy  sigma=0.001558
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.04 mas, bmaj=2.117 mas, bpa=-0.2983 degrees
! Estimated noise=498.655 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00138358 Jy
! Component: 100  -  total flux cleaned = 0.00148251 Jy
! Component: 150  -  total flux cleaned = 0.00137047 Jy
! Component: 200  -  total flux cleaned = 0.00133684 Jy
! Total flux subtracted in 200 components = 0.00133684 Jy
! Clean residual min=-0.002831 max=0.003446 Jy/beam
! Clean residual mean=0.000007 rms=0.000835 Jy/beam
! Combined flux in latest and established models = 0.343262 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 112 components and 0.343262 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207767Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207769Jy  sigma=0.001558
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.000184086 Jy
! Component: 100  -  total flux cleaned = 0.000225278 Jy
! Component: 150  -  total flux cleaned = 0.00016333 Jy
! Component: 200  -  total flux cleaned = 0.000135433 Jy
! Total flux subtracted in 200 components = 0.000135433 Jy
! Clean residual min=-0.002827 max=0.003385 Jy/beam
! Clean residual mean=0.000007 rms=0.000825 Jy/beam
! Combined flux in latest and established models = 0.343398 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 116 components and 0.343398 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207757Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207753Jy  sigma=0.001558
! 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.207753Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207762Jy  sigma=0.001558
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.582 mas, bmaj=3.393 mas, bpa=10.87 degrees
! Estimated noise=605.081 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00097217 Jy
! Component: 100  -  total flux cleaned = 0.00101458 Jy
! Component: 150  -  total flux cleaned = 0.000954541 Jy
! Component: 200  -  total flux cleaned = 0.000878002 Jy
! Total flux subtracted in 200 components = 0.000878002 Jy
! Clean residual min=-0.003578 max=0.003792 Jy/beam
! Clean residual mean=0.000012 rms=0.000981 Jy/beam
! Combined flux in latest and established models = 0.344276 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 129 components and 0.344276 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207754Jy  sigma=0.001557
! Fit after  self-cal, rms=0.207752Jy  sigma=0.001557
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 = -6.65285e-05 Jy
! Component: 100  -  total flux cleaned = 4.189e-05 Jy
! Component: 150  -  total flux cleaned = 4.55619e-05 Jy
! Component: 200  -  total flux cleaned = 7.39297e-06 Jy
! Total flux subtracted in 200 components = 7.39297e-06 Jy
! Clean residual min=-0.003643 max=0.003790 Jy/beam
! Clean residual mean=0.000012 rms=0.000974 Jy/beam
! Combined flux in latest and established models = 0.344283 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 129 components and 0.344283 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207748Jy  sigma=0.001557
! Fit after  self-cal, rms=0.207744Jy  sigma=0.001557
! 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=1.042 mas, bmaj=2.115 mas, bpa=-0.2859 degrees
! Estimated noise=498.317 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.042 x 2.115 at -0.2859 degrees (North through East)
! Clean map  min=-0.0027343  max=0.20676 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.8258 mas, bmaj=1.802 mas, bpa=1.034 degrees
! Estimated noise=715.939 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.16382 Jy
! Component: 100  -  total flux cleaned = 0.221739 Jy
! Component: 150  -  total flux cleaned = 0.256653 Jy
! Component: 200  -  total flux cleaned = 0.279455 Jy
! Total flux subtracted in 200 components = 0.279455 Jy
! Clean residual min=-0.007360 max=0.012427 Jy/beam
! Clean residual mean=-0.000123 rms=0.002047 Jy/beam
! Combined flux in latest and established models = 0.279455 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 32 model components to the UV plane model.
! The established model now contains 32 components and 0.279455 Jy
! Inverting map and beam 
! Estimated beam: bmin=1.042 mas, bmaj=2.115 mas, bpa=-0.2859 degrees
! Estimated noise=498.317 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.0241424 Jy
! Component: 100  -  total flux cleaned = 0.0384948 Jy
! Component: 150  -  total flux cleaned = 0.0474701 Jy
! Component: 200  -  total flux cleaned = 0.0532357 Jy
! Total flux subtracted in 200 components = 0.0532357 Jy
! Clean residual min=-0.003631 max=0.003581 Jy/beam
! Clean residual mean=-0.000018 rms=0.000943 Jy/beam
! Combined flux in latest and established models = 0.332691 Jy
! Adding 52 model components to the UV plane model.
! The established model now contains 74 components and 0.332691 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.582 mas, bmaj=3.393 mas, bpa=10.87 degrees
! Estimated noise=605.081 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00510667 Jy
! Component: 100  -  total flux cleaned = 0.00788766 Jy
! Component: 150  -  total flux cleaned = 0.00951955 Jy
! Component: 200  -  total flux cleaned = 0.0105064 Jy
! Total flux subtracted in 200 components = 0.0105064 Jy
! Clean residual min=-0.003662 max=0.003712 Jy/beam
! Clean residual mean=0.000009 rms=0.000982 Jy/beam
! Combined flux in latest and established models = 0.343197 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.000603969 Jy
! Component: 100  -  total flux cleaned = 0.000760308 Jy
! Component: 150  -  total flux cleaned = 0.000822425 Jy
! Component: 200  -  total flux cleaned = 0.000821891 Jy
! Total flux subtracted in 200 components = 0.000821891 Jy
! Clean residual min=-0.003657 max=0.003772 Jy/beam
! Clean residual mean=0.000012 rms=0.000978 Jy/beam
! Combined flux in latest and established models = 0.344019 Jy
! Adding 52 model components to the UV plane model.
! The established model now contains 116 components and 0.344019 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=1.042 mas, bmaj=2.115 mas, bpa=-0.2859 degrees
! Estimated noise=498.317 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000350727 Jy
! Component: 100  -  total flux cleaned = 0.000353125 Jy
! Component: 150  -  total flux cleaned = 0.000315213 Jy
! Component: 200  -  total flux cleaned = 0.000278829 Jy
! Total flux subtracted in 200 components = 0.000278829 Jy
! Clean residual min=-0.002876 max=0.003266 Jy/beam
! Clean residual mean=0.000007 rms=0.000812 Jy/beam
! Combined flux in latest and established models = 0.344298 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 127 components and 0.344298 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207769Jy  sigma=0.001558
! Fit after  self-cal, rms=0.207744Jy  sigma=0.001557
wmodel J0426+0518_X_1997_01_11_pus_map.mod
! Writing 127 model components to file: J0426+0518_X_1997_01_11_pus_map.mod
wobs J0426+0518_X_1997_01_11_pus_uvs.fits
! Writing UV FITS file: J0426+0518_X_1997_01_11_pus_uvs.fits
wwins J0426+0518_X_1997_01_11_pus_map.win
! wwins: Wrote 3 windows to J0426+0518_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.000822838 Jy
! Component: 100  -  total flux cleaned = 0.00107903 Jy
! Component: 150  -  total flux cleaned = 0.0012252 Jy
! Component: 200  -  total flux cleaned = 0.00108752 Jy
! Component: 250  -  total flux cleaned = 0.000908518 Jy
! Component: 300  -  total flux cleaned = 0.000648314 Jy
! Component: 350  -  total flux cleaned = 0.000478503 Jy
! Component: 400  -  total flux cleaned = 0.000107567 Jy
! Component: 450  -  total flux cleaned = -9.36285e-05 Jy
! Component: 500  -  total flux cleaned = -0.000369974 Jy
! Component: 550  -  total flux cleaned = -0.000525317 Jy
! Component: 600  -  total flux cleaned = -0.000677424 Jy
! Component: 650  -  total flux cleaned = -0.000900722 Jy
! Component: 700  -  total flux cleaned = -0.000900551 Jy
! Component: 750  -  total flux cleaned = -0.00104475 Jy
! Component: 800  -  total flux cleaned = -0.00108052 Jy
! Component: 850  -  total flux cleaned = -0.00128843 Jy
! Component: 900  -  total flux cleaned = -0.00139026 Jy
! Component: 950  -  total flux cleaned = -0.00145722 Jy
! Component: 1000  -  total flux cleaned = -0.00165512 Jy
! Component: 1050  -  total flux cleaned = -0.00168763 Jy
! Component: 1100  -  total flux cleaned = -0.0019122 Jy
! Component: 1150  -  total flux cleaned = -0.00203885 Jy
! Component: 1200  -  total flux cleaned = -0.00213257 Jy
! Component: 1250  -  total flux cleaned = -0.00231776 Jy
! Component: 1300  -  total flux cleaned = -0.00243965 Jy
! Component: 1350  -  total flux cleaned = -0.00252932 Jy
! Component: 1400  -  total flux cleaned = -0.0026478 Jy
! Component: 1450  -  total flux cleaned = -0.00273581 Jy
! Component: 1500  -  total flux cleaned = -0.00288055 Jy
! Component: 1550  -  total flux cleaned = -0.00293715 Jy
! Component: 1600  -  total flux cleaned = -0.00307817 Jy
! Component: 1650  -  total flux cleaned = -0.00307827 Jy
! Component: 1700  -  total flux cleaned = -0.00316158 Jy
! Component: 1750  -  total flux cleaned = -0.00329816 Jy
! Component: 1800  -  total flux cleaned = -0.00337902 Jy
! Component: 1850  -  total flux cleaned = -0.00345946 Jy
! Component: 1900  -  total flux cleaned = -0.00353867 Jy
! Component: 1950  -  total flux cleaned = -0.00359089 Jy
! Component: 2000  -  total flux cleaned = -0.00366857 Jy
! Total flux subtracted in 2048 components = -0.0036686 Jy
! Clean residual min=-0.001505 max=0.001478 Jy/beam
! Clean residual mean=0.000003 rms=0.000499 Jy/beam
! Combined flux in latest and established models = 0.340629 Jy
keep
! Adding 151 model components to the UV plane model.
! The established model now contains 278 components and 0.340629 Jy
wmap "J0426+0518_X_1997_01_11_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.042 x 2.115 at -0.2859 degrees (North through East)
! Clean map  min=-0.0020644  max=0.2052 Jy/beam
! Writing clean map to FITS file: J0426+0518_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.205196 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000499288 
device "J0426+0518_X_1997_01_11_pus\_map.eps/VPS"
! Attempting to open device: 'J0426+0518_X_1997_01_11_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.729969 0.729969 1.45994 2.91987 5.83975 11.6795 23.359 46.718 93.436
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.205 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.042 x 2.115 at -0.2859 degrees (North through East)
! Clean map  min=-0.0020644  max=0.2052 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0426+0518_X_1997_01_11_pus\_map.gif/vgif"
! Attempting to open device: 'J0426+0518_X_1997_01_11_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0426+0518_X_1997_01_11_pus_uvs.log closed on Tue Feb 14 14:10:32 2006