! Started logfile: J1632+8232_X_2006_02_23_yyk_uvs.log on Wed Jul  5 12:58:43 2006
obs J1632+8232_X_2006_02_23_yyk_uva.fits
! Reading UV FITS file: J1632+8232_X_2006_02_23_yyk_uva.fits
! AN table 1: 883 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.992098 visibilities/baseline/integration-bin.
! Found source: J1632+8232
! 
! 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.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2397 lines of history.
! 
! Reading 157684 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
![@muppet J1632+8232_X_2006_02_23_yyk]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.04
float dynam
dynam = 6.0
float amp_soltime1
amp_soltime1 = 10
float amp_soltime2
amp_soltime2 = 1
float phase_soltime1
phase_soltime1=10
float phase_soltime2
phase_soltime2=0.5
float phase_soltime
phase_soltime=phase_soltime1
float ampcor_selflim
ampcor_selflim=1.20
float thresh
thresh = 0.10
float win_mult
win_mult = 1.8
float time_av
time_av = 30
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.
uvav time_av, true
! Averaging into 30 second bins.
! 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
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 0.451295 Jy 
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.6029 mas, bmaj=2.706 mas, bpa=5.092 degrees
! Estimated noise=1.23405 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.308346 Jy
! Component: 100  -  total flux cleaned = 0.400582 Jy
! Total flux subtracted in 100 components = 0.400582 Jy
! Clean residual min=-0.027783 max=0.056839 Jy/beam
! Clean residual mean=-0.000075 rms=0.009181 Jy/beam
! Combined flux in latest and established models = 0.400582 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.400582 Jy
! 
! Correcting IF 1.
!  A total of 1 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 1 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 1 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 1 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.192396Jy  sigma=3.693451
! Fit after  self-cal, rms=0.192089Jy  sigma=3.684857
! Inverting map and beam 
! Estimated beam: bmin=0.6029 mas, bmaj=2.706 mas, bpa=5.092 degrees
! Estimated noise=1.23405 mJy/beam.
! Added new window around map position (-1, 0.6).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0658948 Jy
! Component: 100  -  total flux cleaned = 0.10373 Jy
! Total flux subtracted in 100 components = 0.10373 Jy
! Clean residual min=-0.027398 max=0.049634 Jy/beam
! Clean residual mean=-0.000047 rms=0.007119 Jy/beam
! Combined flux in latest and established models = 0.504312 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 30 model components to the UV plane model.
! The established model now contains 38 components and 0.504312 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.162565Jy  sigma=2.954267
! Fit after  self-cal, rms=0.160854Jy  sigma=2.922548
! Inverting map 
! Added new window around map position (-2.4, 1).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0533406 Jy
! Component: 100  -  total flux cleaned = 0.0846895 Jy
! Total flux subtracted in 100 components = 0.0846895 Jy
! Clean residual min=-0.019241 max=0.019754 Jy/beam
! Clean residual mean=-0.000019 rms=0.004769 Jy/beam
! Combined flux in latest and established models = 0.589001 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 20 model components to the UV plane model.
! The established model now contains 52 components and 0.589001 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.140809Jy  sigma=2.407058
! Fit after  self-cal, rms=0.140361Jy  sigma=2.394712
! Inverting map 
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! 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.8483 mas, bmaj=2.926 mas, bpa=4.192 degrees
! Estimated noise=0.651592 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0465354 Jy
! Component: 100  -  total flux cleaned = 0.0736403 Jy
! Component: 150  -  total flux cleaned = 0.0902326 Jy
! Component: 200  -  total flux cleaned = 0.100233 Jy
! Total flux subtracted in 200 components = 0.100233 Jy
! Clean residual min=-0.014856 max=0.014051 Jy/beam
! Clean residual mean=-0.000021 rms=0.003412 Jy/beam
! Combined flux in latest and established models = 0.689234 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 44 model components to the UV plane model.
! The established model now contains 82 components and 0.689234 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.130446Jy  sigma=2.107771
! Fit after  self-cal, rms=0.130138Jy  sigma=2.094634
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8483 x 2.926 at 4.192 degrees (North through East)
! Clean map  min=-0.011479  max=0.40497 Jy/beam
if(peak(flux) < thresh*2)
  selflims ampcor_selflim
  end if
gscale
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Amplitude normalization factor in sub-array 1: 0.981051
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.93     FD        1.04     HN        1.08     KP        0.99     
!   LA        0.99     MK        1.00     NL        1.01     OV        1.00     
!   PT        0.98     SC        1.18     
! 
! 
! Correcting IF 2.
!  Amplitude normalization factor in sub-array 1: 1.00041
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.04     HN        1.04     KP        0.92     
!   LA        0.95     MK        0.97     NL        1.00     OV        0.97     
!   PT        1.02     SC        1.15     
! 
! 
! Correcting IF 3.
!  Amplitude normalization factor in sub-array 1: 1.01517
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.06     HN        0.94     KP        0.84     
!   LA        0.96     MK        0.96     NL        0.95     OV        1.00     
!   PT        1.03     SC        1.09     
! 
! 
! Correcting IF 4.
!  Amplitude normalization factor in sub-array 1: 0.994947
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.09     HN        0.96     KP        0.88     
!   LA        0.96     MK        0.98     NL        0.95     OV        1.02     
!   PT        1.10     SC        1.15     
! 
! 
! Fit before self-cal, rms=0.130138Jy  sigma=2.094634
! Fit after  self-cal, rms=0.130473Jy  sigma=1.975957
selfcal false, false, phase_soltime
! Performing phase self-cal over 10 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.130473Jy  sigma=1.975957
! Fit after  self-cal, rms=0.130470Jy  sigma=1.976612
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.8748 mas, bmaj=2.904 mas, bpa=4.489 degrees
! Estimated noise=0.644353 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00131157 Jy
! Component: 100  -  total flux cleaned = 0.00128664 Jy
! Component: 150  -  total flux cleaned = 0.00143825 Jy
! Component: 200  -  total flux cleaned = 0.00168704 Jy
! Total flux subtracted in 200 components = 0.00168704 Jy
! Clean residual min=-0.005247 max=0.005732 Jy/beam
! Clean residual mean=-0.000037 rms=0.001430 Jy/beam
! Combined flux in latest and established models = 0.690921 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 26 model components to the UV plane model.
! The established model now contains 95 components and 0.690921 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.129830Jy  sigma=1.963343
! Fit after  self-cal, rms=0.129915Jy  sigma=1.963307
! Inverting map 
print "************** FINISHED AMPLITUDE GSCALE SELF-CAL **************"
! ************** FINISHED AMPLITUDE GSCALE SELF-CAL ************** 
! 
phase_soltime=phase_soltime2
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.129915Jy  sigma=1.963307
! Fit after  self-cal, rms=0.089029Jy  sigma=1.156735
dynam = dynam - 0.5
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 false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-2, -14.8).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00721415 Jy
! Component: 100  -  total flux cleaned = 0.00907498 Jy
! Component: 150  -  total flux cleaned = 0.0103744 Jy
! Component: 200  -  total flux cleaned = 0.0118308 Jy
! Total flux subtracted in 200 components = 0.0118308 Jy
! Clean residual min=-0.005800 max=0.005754 Jy/beam
! Clean residual mean=-0.000026 rms=0.001400 Jy/beam
! Combined flux in latest and established models = 0.702752 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 31 model components to the UV plane model.
! The established model now contains 120 components and 0.702752 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.087565Jy  sigma=1.121546
! Fit after  self-cal, rms=0.086986Jy  sigma=1.096556
! Inverting map 
print "*** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime ***"
! *** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime *** 
! 
dynam = dynam - 0.25
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8748 x 2.904 at 4.489 degrees (North through East)
! Clean map  min=-0.0051795  max=0.41174 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true, amp_soltime1
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true, amp_soltime2
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  print "************** FINISHED AMPLITUDE SELF-CAL **************"
  end if
! Performing amp+phase self-cal over 10 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.086986Jy  sigma=1.096556
! Fit after  self-cal, rms=0.082612Jy  sigma=1.035195
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082612Jy  sigma=1.035195
! Fit after  self-cal, rms=0.082696Jy  sigma=1.032507
! Inverting map and beam 
! Estimated beam: bmin=0.8543 mas, bmaj=2.93 mas, bpa=4.265 degrees
! Estimated noise=0.636786 mJy/beam.
! Added new window around map position (-5, 3).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00569437 Jy
! Component: 100  -  total flux cleaned = 0.0091047 Jy
! Component: 150  -  total flux cleaned = 0.0106888 Jy
! Component: 200  -  total flux cleaned = 0.0115535 Jy
! Total flux subtracted in 200 components = 0.0115535 Jy
! Clean residual min=-0.003612 max=0.003053 Jy/beam
! Clean residual mean=0.000004 rms=0.000795 Jy/beam
! Combined flux in latest and established models = 0.714306 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 35 model components to the UV plane model.
! The established model now contains 151 components and 0.714306 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082412Jy  sigma=1.021325
! Fit after  self-cal, rms=0.082438Jy  sigma=1.020219
! Inverting map 
! Performing amp+phase self-cal over 1 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082438Jy  sigma=1.020219
! Fit after  self-cal, rms=0.082418Jy  sigma=0.981196
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082418Jy  sigma=0.981196
! Fit after  self-cal, rms=0.082415Jy  sigma=0.980924
! Inverting map and beam 
! Estimated beam: bmin=0.8542 mas, bmaj=2.928 mas, bpa=4.221 degrees
! Estimated noise=0.636092 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0022644 Jy
! Component: 100  -  total flux cleaned = 0.00305212 Jy
! Component: 150  -  total flux cleaned = 0.00348814 Jy
! Component: 200  -  total flux cleaned = 0.00388034 Jy
! Total flux subtracted in 200 components = 0.00388034 Jy
! Clean residual min=-0.003069 max=0.002571 Jy/beam
! Clean residual mean=0.000004 rms=0.000694 Jy/beam
! Combined flux in latest and established models = 0.718186 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 36 model components to the UV plane model.
! The established model now contains 172 components and 0.718186 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082333Jy  sigma=0.978033
! Fit after  self-cal, rms=0.082339Jy  sigma=0.977682
! Inverting map 
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
win_mult = win_mult * 1.4
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.106 mas, bmaj=3.507 mas, bpa=0.5016 degrees
! Estimated noise=0.818636 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.000893666 Jy
! Component: 100  -  total flux cleaned = 0.00116947 Jy
! Component: 150  -  total flux cleaned = 0.00122722 Jy
! Component: 200  -  total flux cleaned = 0.00127922 Jy
! Total flux subtracted in 200 components = 0.00127922 Jy
! Clean residual min=-0.003101 max=0.002848 Jy/beam
! Clean residual mean=0.000012 rms=0.000883 Jy/beam
! Combined flux in latest and established models = 0.719465 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 26 model components to the UV plane model.
! The established model now contains 191 components and 0.719465 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082318Jy  sigma=0.976653
! Fit after  self-cal, rms=0.082331Jy  sigma=0.976481
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
win_mult = win_mult / 1.4
print "************** FINISHED TAPERING SELF-CAL CLEAN **************"
! ************** FINISHED TAPERING SELF-CAL CLEAN ************** 
! 
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true,true,true
! clrmod: Cleared the established, tentative and continuum 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.603 mas, bmaj=2.707 mas, bpa=5.057 degrees
! Estimated noise=1.20184 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.314535 Jy
! Component: 100  -  total flux cleaned = 0.416657 Jy
! Component: 150  -  total flux cleaned = 0.481728 Jy
! Component: 200  -  total flux cleaned = 0.526976 Jy
! Total flux subtracted in 200 components = 0.526976 Jy
! Clean residual min=-0.013064 max=0.019931 Jy/beam
! Clean residual mean=-0.000049 rms=0.004486 Jy/beam
! Combined flux in latest and established models = 0.526975 Jy
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 27 model components to the UV plane model.
! The established model now contains 27 components and 0.526975 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.8542 mas, bmaj=2.928 mas, bpa=4.221 degrees
! Estimated noise=0.636092 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.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0661912 Jy
! Component: 100  -  total flux cleaned = 0.10428 Jy
! Component: 150  -  total flux cleaned = 0.127313 Jy
! Component: 200  -  total flux cleaned = 0.141536 Jy
! Total flux subtracted in 200 components = 0.141536 Jy
! Clean residual min=-0.006058 max=0.007739 Jy/beam
! Clean residual mean=-0.000082 rms=0.001909 Jy/beam
! Combined flux in latest and established models = 0.668511 Jy
! Adding 39 model components to the UV plane model.
! The established model now contains 52 components and 0.668511 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.106 mas, bmaj=3.507 mas, bpa=0.5016 degrees
! Estimated noise=0.818636 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.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.017062 Jy
! Component: 100  -  total flux cleaned = 0.0272497 Jy
! Component: 150  -  total flux cleaned = 0.0340979 Jy
! Component: 200  -  total flux cleaned = 0.0389943 Jy
! Total flux subtracted in 200 components = 0.0389943 Jy
! Clean residual min=-0.004325 max=0.003397 Jy/beam
! Clean residual mean=-0.000027 rms=0.001202 Jy/beam
! Combined flux in latest and established models = 0.707505 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 92 components and 0.707506 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.8542 mas, bmaj=2.928 mas, bpa=4.221 degrees
! Estimated noise=0.636092 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00160808 Jy
! Component: 100  -  total flux cleaned = 0.00279031 Jy
! Component: 150  -  total flux cleaned = 0.00388881 Jy
! Component: 200  -  total flux cleaned = 0.00463447 Jy
! Total flux subtracted in 200 components = 0.00463447 Jy
! Clean residual min=-0.003364 max=0.003580 Jy/beam
! Clean residual mean=-0.000003 rms=0.000818 Jy/beam
! Combined flux in latest and established models = 0.71214 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 29 model components to the UV plane model.
! The established model now contains 121 components and 0.71214 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.082767Jy  sigma=0.989740
! Fit after  self-cal, rms=0.082698Jy  sigma=0.988144
wmodel J1632+8232_X_2006_02_23_yyk\_map.mod
! Writing 121 model components to file: J1632+8232_X_2006_02_23_yyk_map.mod
wobs J1632+8232_X_2006_02_23_yyk\_uvs.fits
! Writing UV FITS file: J1632+8232_X_2006_02_23_yyk_uvs.fits
wwins J1632+8232_X_2006_02_23_yyk\_map.win
! wwins: Wrote 5 windows to J1632+8232_X_2006_02_23_yyk_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 = 4.82019e-05 Jy
! Component: 100  -  total flux cleaned = -0.000420916 Jy
! Component: 150  -  total flux cleaned = -0.000748442 Jy
! Component: 200  -  total flux cleaned = -0.00110312 Jy
! Component: 250  -  total flux cleaned = -0.00148012 Jy
! Component: 300  -  total flux cleaned = -0.00160014 Jy
! Component: 350  -  total flux cleaned = -0.00179165 Jy
! Component: 400  -  total flux cleaned = -0.00186589 Jy
! Component: 450  -  total flux cleaned = -0.00186671 Jy
! Component: 500  -  total flux cleaned = -0.00190281 Jy
! Component: 550  -  total flux cleaned = -0.00200379 Jy
! Component: 600  -  total flux cleaned = -0.00203567 Jy
! Component: 650  -  total flux cleaned = -0.00209817 Jy
! Component: 700  -  total flux cleaned = -0.00212856 Jy
! Component: 750  -  total flux cleaned = -0.00221814 Jy
! Component: 800  -  total flux cleaned = -0.00236307 Jy
! Component: 850  -  total flux cleaned = -0.0023634 Jy
! Component: 900  -  total flux cleaned = -0.00255854 Jy
! Component: 950  -  total flux cleaned = -0.00280338 Jy
! Component: 1000  -  total flux cleaned = -0.00291031 Jy
! Component: 1050  -  total flux cleaned = -0.00314676 Jy
! Component: 1100  -  total flux cleaned = -0.00332687 Jy
! Component: 1150  -  total flux cleaned = -0.00345312 Jy
! Component: 1200  -  total flux cleaned = -0.00365164 Jy
! Component: 1250  -  total flux cleaned = -0.00382153 Jy
! Component: 1300  -  total flux cleaned = -0.00394146 Jy
! Component: 1350  -  total flux cleaned = -0.00405946 Jy
! Component: 1400  -  total flux cleaned = -0.00419891 Jy
! Component: 1450  -  total flux cleaned = -0.00431341 Jy
! Component: 1500  -  total flux cleaned = -0.00447152 Jy
! Component: 1550  -  total flux cleaned = -0.0046495 Jy
! Component: 1600  -  total flux cleaned = -0.0047375 Jy
! Component: 1650  -  total flux cleaned = -0.00482427 Jy
! Component: 1700  -  total flux cleaned = -0.00491021 Jy
! Component: 1750  -  total flux cleaned = -0.00505874 Jy
! Component: 1800  -  total flux cleaned = -0.00514233 Jy
! Component: 1850  -  total flux cleaned = -0.00522546 Jy
! Component: 1900  -  total flux cleaned = -0.0053077 Jy
! Component: 1950  -  total flux cleaned = -0.00546982 Jy
! Component: 2000  -  total flux cleaned = -0.00557003 Jy
! Total flux subtracted in 2048 components = -0.00555005 Jy
! Clean residual min=-0.001035 max=0.001159 Jy/beam
! Clean residual mean=-0.000004 rms=0.000378 Jy/beam
! Combined flux in latest and established models = 0.70659 Jy
keep
! Adding 131 model components to the UV plane model.
! The established model now contains 252 components and 0.70659 Jy
![Exited script file: muppet]
wmap "J1632+8232_X_2006_02_23_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8542 x 2.928 at 4.221 degrees (North through East)
! Clean map  min=-0.0022775  max=0.40892 Jy/beam
! Writing clean map to FITS file: J1632+8232_X_2006_02_23_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.40892 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000375392 
device "J1632+8232_X_2006_02_23_yyk\_map.eps/VPS"
! Attempting to open device: 'J1632+8232_X_2006_02_23_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.275403 0.275403 0.550805 1.10161 2.20322 4.40644 8.81288 17.6258 35.2515 70.5031
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.408 
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.8542 x 2.928 at 4.221 degrees (North through East)
! Clean map  min=-0.0022775  max=0.40892 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1632+8232_X_2006_02_23_yyk\_map.gif/gif"
! Attempting to open device: 'J1632+8232_X_2006_02_23_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1632+8232_X_2006_02_23_yyk_uvs.log closed on Wed Jul  5 12:59:22 2006