! Started logfile: J1539+1604_S_1996_03_13_yyk_uvs.log on Sun Jan  7 18:47:19 2007
obs J1539+1604_S_1996_03_13_yyk_uva.fits
! Reading UV FITS file: J1539+1604_S_1996_03_13_yyk_uva.fits
! AN table 1: 127 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.895713 visibilities/baseline/integration-bin.
! Found source: J1539+1604
! 
! 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.22049e+09        4e+06          1        4e+06
!  02        2  2.23236e+09        4e+06          1        4e+06
!  03        3  2.29236e+09        4e+06          1        4e+06
!  04        4  2.32236e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 655 lines of history.
! 
! Reading 20476 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 J1539+1604_S_1996_03_13_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.500x0.500 milli-arcsec cellsize.
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 0.473003 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=2.961 mas, bmaj=7.172 mas, bpa=-2.967 degrees
! Estimated noise=1218.32 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.210055 Jy
! Component: 100  -  total flux cleaned = 0.246681 Jy
! Total flux subtracted in 100 components = 0.246681 Jy
! Clean residual min=-0.024041 max=0.045476 Jy/beam
! Clean residual mean=0.000367 rms=0.008346 Jy/beam
! Combined flux in latest and established models = 0.246681 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 10 model components to the UV plane model.
! The established model now contains 10 components and 0.246681 Jy
! 
! Correcting IF 1.
!  A total of 76 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 76 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 76 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 76 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.393494Jy  sigma=0.001942
! Fit after  self-cal, rms=0.393023Jy  sigma=0.001938
! Inverting map and beam 
! Estimated beam: bmin=2.961 mas, bmaj=7.172 mas, bpa=-2.967 degrees
! Estimated noise=1218.55 mJy/beam.
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=3.744 mas, bmaj=8.471 mas, bpa=-4.239 degrees
! Estimated noise=908.467 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.0331209 Jy
! Component: 100  -  total flux cleaned = 0.0472198 Jy
! Component: 150  -  total flux cleaned = 0.0511699 Jy
! Component: 200  -  total flux cleaned = 0.0534084 Jy
! Total flux subtracted in 200 components = 0.0534084 Jy
! Clean residual min=-0.022610 max=0.058205 Jy/beam
! Clean residual mean=0.000748 rms=0.010654 Jy/beam
! Combined flux in latest and established models = 0.300089 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 20 model components to the UV plane model.
! The established model now contains 28 components and 0.300089 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.391045Jy  sigma=0.001926
! Fit after  self-cal, rms=0.390992Jy  sigma=0.001926
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.744 x 8.471 at -4.239 degrees (North through East)
! Clean map  min=-0.022933  max=0.25083 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.834148
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.98     HN        0.94     KP        0.82     
!   LA        0.76     MK        0.98     NL        0.96     OV        4.00     
!   PT        0.78     SC        0.77     
! 
! 
! Correcting IF 2.
!  Amplitude normalization factor in sub-array 1: 0.797307
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.09     FD        1.08     HN        1.10     KP        0.85     
!   LA        0.84     MK        1.00     NL        0.99     OV        3.98     
!   PT        0.80     SC        0.81     
! 
! 
! Correcting IF 3.
!  Amplitude normalization factor in sub-array 1: 0.835951
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.99     HN        0.94     KP        0.81     
!   LA        0.64     MK        0.93     NL        0.98     OV        3.85     
!   PT        0.93     SC        0.92     
! 
! 
! Correcting IF 4.
!  Amplitude normalization factor in sub-array 1: 0.836479
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.05     HN        1.00     KP        0.86     
!   LA        0.72     MK        1.05     NL        1.09     OV        3.41     
!   PT        0.81     SC        0.96     
! 
! 
! Fit before self-cal, rms=0.390992Jy  sigma=0.001926
! Fit after  self-cal, rms=0.528227Jy  sigma=0.001972
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.528227Jy  sigma=0.001972
! Fit after  self-cal, rms=0.528601Jy  sigma=0.001971
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.784 mas, bmaj=8.496 mas, bpa=-2.804 degrees
! Estimated noise=570.727 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.0723104 Jy
! Component: 100  -  total flux cleaned = -0.0862954 Jy
! Component: 150  -  total flux cleaned = -0.0910661 Jy
! Component: 200  -  total flux cleaned = -0.0923994 Jy
! Total flux subtracted in 200 components = -0.0923994 Jy
! Clean residual min=-0.008342 max=0.028061 Jy/beam
! Clean residual mean=0.000180 rms=0.003623 Jy/beam
! Combined flux in latest and established models = 0.20769 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 24 model components to the UV plane model.
! The established model now contains 45 components and 0.20769 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.523461Jy  sigma=0.001834
! Fit after  self-cal, rms=0.523464Jy  sigma=0.001833
! Inverting map 
! Added new window around map position (9.5, -0.5).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0252136 Jy
! Component: 100  -  total flux cleaned = 0.0244804 Jy
! Component: 150  -  total flux cleaned = 0.0224086 Jy
! Component: 200  -  total flux cleaned = 0.0202275 Jy
! Total flux subtracted in 200 components = 0.0202275 Jy
! Clean residual min=-0.006343 max=0.008513 Jy/beam
! Clean residual mean=0.000029 rms=0.002048 Jy/beam
! Combined flux in latest and established models = 0.227917 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 23 model components to the UV plane model.
! The established model now contains 64 components and 0.227917 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.522777Jy  sigma=0.001810
! Fit after  self-cal, rms=0.522444Jy  sigma=0.001807
! Inverting map 
! Added new window around map position (17, -4).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00998559 Jy
! Component: 100  -  total flux cleaned = 0.0083503 Jy
! Component: 150  -  total flux cleaned = 0.00719687 Jy
! Component: 200  -  total flux cleaned = 0.00600281 Jy
! Total flux subtracted in 200 components = 0.00600281 Jy
! Clean residual min=-0.005986 max=0.005797 Jy/beam
! Clean residual mean=-0.000019 rms=0.001505 Jy/beam
! Combined flux in latest and established models = 0.23392 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 39 model components to the UV plane model.
! The established model now contains 96 components and 0.23392 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.522314Jy  sigma=0.001802
! Fit after  self-cal, rms=0.522239Jy  sigma=0.001801
! 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.522239Jy  sigma=0.001801
! Fit after  self-cal, rms=0.521506Jy  sigma=0.001797
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)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00266944 Jy
! Component: 100  -  total flux cleaned = 0.00213347 Jy
! Component: 150  -  total flux cleaned = 0.00181414 Jy
! Component: 200  -  total flux cleaned = 0.00108127 Jy
! Total flux subtracted in 200 components = 0.00108127 Jy
! Clean residual min=-0.005775 max=0.004497 Jy/beam
! Clean residual mean=-0.000030 rms=0.001334 Jy/beam
! Combined flux in latest and established models = 0.235001 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 115 components and 0.235001 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.521495Jy  sigma=0.001795
! Fit after  self-cal, rms=0.521308Jy  sigma=0.001794
! 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: 3.784 x 8.496 at -2.804 degrees (North through East)
! Clean map  min=-0.0083923  max=0.17053 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.521308Jy  sigma=0.001794
! Fit after  self-cal, rms=1.054912Jy  sigma=0.001776
! 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=1.054912Jy  sigma=0.001776
! Fit after  self-cal, rms=1.054863Jy  sigma=0.001775
! Inverting map and beam 
! Estimated beam: bmin=3.772 mas, bmaj=8.427 mas, bpa=-2.602 degrees
! Estimated noise=553.798 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00491637 Jy
! Component: 100  -  total flux cleaned = 0.00564413 Jy
! Component: 150  -  total flux cleaned = 0.00594818 Jy
! Component: 200  -  total flux cleaned = 0.00602789 Jy
! Total flux subtracted in 200 components = 0.00602789 Jy
! Clean residual min=-0.003992 max=0.003005 Jy/beam
! Clean residual mean=0.000006 rms=0.000920 Jy/beam
! Combined flux in latest and established models = 0.241029 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 40 model components to the UV plane model.
! The established model now contains 142 components and 0.241029 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.054871Jy  sigma=0.001774
! Fit after  self-cal, rms=1.054718Jy  sigma=0.001774
! 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=1.054718Jy  sigma=0.001774
! Fit after  self-cal, rms=1.541643Jy  sigma=0.001772
! 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=1.541643Jy  sigma=0.001772
! Fit after  self-cal, rms=1.542089Jy  sigma=0.001772
! Inverting map and beam 
! Estimated beam: bmin=3.802 mas, bmaj=8.414 mas, bpa=-2.439 degrees
! Estimated noise=555.803 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00371091 Jy
! Component: 100  -  total flux cleaned = 0.00454333 Jy
! Component: 150  -  total flux cleaned = 0.00468964 Jy
! Component: 200  -  total flux cleaned = 0.00468824 Jy
! Total flux subtracted in 200 components = 0.00468824 Jy
! Clean residual min=-0.003747 max=0.002723 Jy/beam
! Clean residual mean=0.000002 rms=0.000829 Jy/beam
! Combined flux in latest and established models = 0.245718 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 43 model components to the UV plane model.
! The established model now contains 167 components and 0.245718 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.542095Jy  sigma=0.001771
! Fit after  self-cal, rms=1.541323Jy  sigma=0.001771
! Inverting map 
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
win_mult = win_mult * 1.4
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=8.346 mas, bmaj=11.02 mas, bpa=-4.485 degrees
! Estimated noise=666.617 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.000935366 Jy
! Component: 100  -  total flux cleaned = 0.00113706 Jy
! Component: 150  -  total flux cleaned = 0.00119259 Jy
! Component: 200  -  total flux cleaned = 0.00115167 Jy
! Total flux subtracted in 200 components = 0.00115167 Jy
! Clean residual min=-0.003306 max=0.003260 Jy/beam
! Clean residual mean=-0.000002 rms=0.000952 Jy/beam
! Combined flux in latest and established models = 0.246869 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 39 model components to the UV plane model.
! The established model now contains 193 components and 0.246869 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.541326Jy  sigma=0.001771
! Fit after  self-cal, rms=1.541203Jy  sigma=0.001771
! 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=2.929 mas, bmaj=6.98 mas, bpa=-2.303 degrees
! Estimated noise=809.143 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.141911 Jy
! Component: 100  -  total flux cleaned = 0.182658 Jy
! Component: 150  -  total flux cleaned = 0.206699 Jy
! Component: 200  -  total flux cleaned = 0.223189 Jy
! Total flux subtracted in 200 components = 0.223189 Jy
! Clean residual min=-0.005943 max=0.007311 Jy/beam
! Clean residual mean=0.000042 rms=0.001923 Jy/beam
! Combined flux in latest and established models = 0.223188 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 31 model components to the UV plane model.
! The established model now contains 31 components and 0.223188 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.802 mas, bmaj=8.414 mas, bpa=-2.439 degrees
! Estimated noise=555.803 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.0170092 Jy
! Component: 100  -  total flux cleaned = 0.023829 Jy
! Component: 150  -  total flux cleaned = 0.0263234 Jy
! Component: 200  -  total flux cleaned = 0.0269795 Jy
! Total flux subtracted in 200 components = 0.0269795 Jy
! Clean residual min=-0.003654 max=0.003791 Jy/beam
! Clean residual mean=0.000000 rms=0.001019 Jy/beam
! Combined flux in latest and established models = 0.250168 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 65 components and 0.250168 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=8.346 mas, bmaj=11.02 mas, bpa=-4.485 degrees
! Estimated noise=666.617 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.00119078 Jy
! Component: 100  -  total flux cleaned = 0.00135492 Jy
! Component: 150  -  total flux cleaned = 0.00124539 Jy
! Component: 200  -  total flux cleaned = 0.000842045 Jy
! Total flux subtracted in 200 components = 0.000842045 Jy
! Clean residual min=-0.003496 max=0.002833 Jy/beam
! Clean residual mean=-0.000021 rms=0.000982 Jy/beam
! Combined flux in latest and established models = 0.25101 Jy
! Adding 37 model components to the UV plane model.
! The established model now contains 91 components and 0.25101 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.802 mas, bmaj=8.414 mas, bpa=-2.439 degrees
! Estimated noise=555.803 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -0.000983668 Jy
! Component: 100  -  total flux cleaned = -0.00131809 Jy
! Component: 150  -  total flux cleaned = -0.00141017 Jy
! Component: 200  -  total flux cleaned = -0.0016599 Jy
! Total flux subtracted in 200 components = -0.0016599 Jy
! Clean residual min=-0.003394 max=0.002669 Jy/beam
! Clean residual mean=-0.000007 rms=0.000813 Jy/beam
! Combined flux in latest and established models = 0.24935 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 22 model components to the UV plane model.
! The established model now contains 108 components and 0.24935 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.541230Jy  sigma=0.001771
! Fit after  self-cal, rms=1.541099Jy  sigma=0.001771
wmodel J1539+1604_S_1996_03_13_yyk\_map.mod
! Writing 108 model components to file: J1539+1604_S_1996_03_13_yyk_map.mod
wobs J1539+1604_S_1996_03_13_yyk\_uvs.fits
! Writing UV FITS file: J1539+1604_S_1996_03_13_yyk_uvs.fits
wwins J1539+1604_S_1996_03_13_yyk\_map.win
! wwins: Wrote 3 windows to J1539+1604_S_1996_03_13_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 = -0.00149254 Jy
! Component: 100  -  total flux cleaned = -0.00238381 Jy
! Component: 150  -  total flux cleaned = -0.00301243 Jy
! Component: 200  -  total flux cleaned = -0.00328595 Jy
! Component: 250  -  total flux cleaned = -0.00341746 Jy
! Component: 300  -  total flux cleaned = -0.00350162 Jy
! Component: 350  -  total flux cleaned = -0.00358147 Jy
! Component: 400  -  total flux cleaned = -0.00361874 Jy
! Component: 450  -  total flux cleaned = -0.00369354 Jy
! Component: 500  -  total flux cleaned = -0.0038405 Jy
! Component: 550  -  total flux cleaned = -0.00391176 Jy
! Component: 600  -  total flux cleaned = -0.00405258 Jy
! Component: 650  -  total flux cleaned = -0.0041898 Jy
! Component: 700  -  total flux cleaned = -0.00429001 Jy
! Component: 750  -  total flux cleaned = -0.00448652 Jy
! Component: 800  -  total flux cleaned = -0.00455122 Jy
! Component: 850  -  total flux cleaned = -0.00483622 Jy
! Component: 900  -  total flux cleaned = -0.00502261 Jy
! Component: 950  -  total flux cleaned = -0.00532792 Jy
! Component: 1000  -  total flux cleaned = -0.00544772 Jy
! Component: 1050  -  total flux cleaned = -0.00556685 Jy
! Component: 1100  -  total flux cleaned = -0.00597462 Jy
! Component: 1150  -  total flux cleaned = -0.00608891 Jy
! Component: 1200  -  total flux cleaned = -0.00625871 Jy
! Component: 1250  -  total flux cleaned = -0.00656542 Jy
! Component: 1300  -  total flux cleaned = -0.00672997 Jy
! Component: 1350  -  total flux cleaned = -0.00697428 Jy
! Component: 1400  -  total flux cleaned = -0.00713531 Jy
! Component: 1450  -  total flux cleaned = -0.0074002 Jy
! Component: 1500  -  total flux cleaned = -0.00755706 Jy
! Component: 1550  -  total flux cleaned = -0.00781563 Jy
! Component: 1600  -  total flux cleaned = -0.00799389 Jy
! Component: 1650  -  total flux cleaned = -0.00814513 Jy
! Component: 1700  -  total flux cleaned = -0.00836911 Jy
! Component: 1750  -  total flux cleaned = -0.00851688 Jy
! Component: 1800  -  total flux cleaned = -0.0087604 Jy
! Component: 1850  -  total flux cleaned = -0.00888078 Jy
! Component: 1900  -  total flux cleaned = -0.00902394 Jy
! Component: 1950  -  total flux cleaned = -0.00916547 Jy
! Component: 2000  -  total flux cleaned = -0.00930591 Jy
! Total flux subtracted in 2048 components = -0.00951418 Jy
! Clean residual min=-0.001484 max=0.001377 Jy/beam
! Clean residual mean=-0.000017 rms=0.000482 Jy/beam
! Combined flux in latest and established models = 0.239836 Jy
keep
! Adding 131 model components to the UV plane model.
! The established model now contains 239 components and 0.239836 Jy
![Exited script file: muppet]
wmap "J1539+1604_S_1996_03_13_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.802 x 8.414 at -2.439 degrees (North through East)
! Clean map  min=-0.0040671  max=0.16898 Jy/beam
! Writing clean map to FITS file: J1539+1604_S_1996_03_13_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.168983 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000483222 
device "J1539+1604_S_1996_03_13_yyk\_map.eps/VPS"
! Attempting to open device: 'J1539+1604_S_1996_03_13_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.857879 0.857879 1.71576 3.43151 6.86303 13.7261 27.4521 54.9042
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.168 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.802 x 8.414 at -2.439 degrees (North through East)
! Clean map  min=-0.0040671  max=0.16898 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1539+1604_S_1996_03_13_yyk\_map.gif/gif"
! Attempting to open device: 'J1539+1604_S_1996_03_13_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1539+1604_S_1996_03_13_yyk_uvs.log closed on Sun Jan  7 18:47:27 2007