! Started logfile: J0339-0146_X_1997_05_07_yyk_uvs.log on Mon Jan  8 02:45:50 2007
obs J0339-0146_X_1997_05_07_yyk_uva.fits
! Reading UV FITS file: J0339-0146_X_1997_05_07_yyk_uva.fits
! AN table 1: 136 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.757516 visibilities/baseline/integration-bin.
! Found source: J0339-0146
! 
! 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.15447e+09        8e+06          1        8e+06
!  02        2  8.23447e+09        8e+06          1        8e+06
!  03        3  8.41447e+09        8e+06          1        8e+06
!  04        4  8.55447e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 613 lines of history.
! 
! Reading 18544 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 J0339-0146_X_1997_05_07_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.
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 1.81028 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.7428 mas, bmaj=1.879 mas, bpa=-3.523 degrees
! Estimated noise=1383.34 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 = 1.34577 Jy
! Component: 100  -  total flux cleaned = 1.63424 Jy
! Total flux subtracted in 100 components = 1.63424 Jy
! Clean residual min=-0.084438 max=0.222824 Jy/beam
! Clean residual mean=0.000320 rms=0.027459 Jy/beam
! Combined flux in latest and established models = 1.63424 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 1.63424 Jy
! 
! Correcting IF 1.
!  A total of 188 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 188 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 188 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 188 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.546634Jy  sigma=0.003659
! Fit after  self-cal, rms=0.541991Jy  sigma=0.003642
! Inverting map and beam 
! Estimated beam: bmin=0.7428 mas, bmaj=1.879 mas, bpa=-3.523 degrees
! Estimated noise=1385.36 mJy/beam.
! Added new window around map position (1.4, 0.2).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.25869 Jy
! Component: 100  -  total flux cleaned = 0.378707 Jy
! Total flux subtracted in 100 components = 0.378707 Jy
! Clean residual min=-0.080898 max=0.156268 Jy/beam
! Clean residual mean=0.000208 rms=0.017813 Jy/beam
! Combined flux in latest and established models = 2.01295 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 17 model components to the UV plane model.
! The established model now contains 27 components and 2.01295 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.408581Jy  sigma=0.002631
! Fit after  self-cal, rms=0.382856Jy  sigma=0.002479
! Inverting map 
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.12007 Jy
! Component: 100  -  total flux cleaned = 0.172956 Jy
! Total flux subtracted in 100 components = 0.172956 Jy
! Clean residual min=-0.055320 max=0.086023 Jy/beam
! Clean residual mean=0.000162 rms=0.012086 Jy/beam
! Combined flux in latest and established models = 2.1859 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 24 model components to the UV plane model.
! The established model now contains 44 components and 2.1859 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.344179Jy  sigma=0.002163
! Fit after  self-cal, rms=0.335710Jy  sigma=0.002113
! 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.9787 mas, bmaj=2.802 mas, bpa=-12.46 degrees
! Estimated noise=781.578 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.0908158 Jy
! Component: 100  -  total flux cleaned = 0.123414 Jy
! Component: 150  -  total flux cleaned = 0.129179 Jy
! Component: 200  -  total flux cleaned = 0.129195 Jy
! Total flux subtracted in 200 components = 0.129195 Jy
! Clean residual min=-0.036368 max=0.049245 Jy/beam
! Clean residual mean=0.000270 rms=0.008286 Jy/beam
! Combined flux in latest and established models = 2.3151 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 25 model components to the UV plane model.
! The established model now contains 59 components and 2.3151 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.324640Jy  sigma=0.001998
! Fit after  self-cal, rms=0.322374Jy  sigma=0.001984
! 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.9787 x 2.802 at -12.46 degrees (North through East)
! Clean map  min=-0.028421  max=1.5594 Jy/beam
if(peak(flux) < thresh*2)
  selflims ampcor_selflim
  end if
gscale
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.991273
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.99     HN        1.06     KP        1.01     
!   LA        1.02     MK        1.02     NL        1.07     OV        1.01     
!   PT        0.96     SC        0.96     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.996279
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.98     HN        1.06     KP        1.01     
!   LA        0.99     MK        0.97     NL        1.07     OV        1.06     
!   PT        0.91     SC        1.00     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.991557
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.01     HN        1.06     KP        1.00     
!   LA        1.00     MK        0.99     NL        1.06     OV        1.01     
!   PT        0.97     SC        1.04     
! 
! 
! Correcting IF 4.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.988317
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.99     HN        1.08     KP        1.00     
!   LA        1.00     MK        0.96     NL        1.06     OV        1.01     
!   PT        0.98     SC        1.04     
! 
! 
! Fit before self-cal, rms=0.322374Jy  sigma=0.001984
! Fit after  self-cal, rms=0.313261Jy  sigma=0.001913
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.313261Jy  sigma=0.001913
! Fit after  self-cal, rms=0.313275Jy  sigma=0.001913
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9823 mas, bmaj=2.791 mas, bpa=-12.56 degrees
! Estimated noise=770.256 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.0351561 Jy
! Component: 100  -  total flux cleaned = -0.0417779 Jy
! Component: 150  -  total flux cleaned = -0.0435602 Jy
! Component: 200  -  total flux cleaned = -0.0442753 Jy
! Total flux subtracted in 200 components = -0.0442753 Jy
! Clean residual min=-0.018771 max=0.020809 Jy/beam
! Clean residual mean=0.000087 rms=0.004029 Jy/beam
! Combined flux in latest and established models = 2.27082 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 17 model components to the UV plane model.
! The established model now contains 71 components and 2.27082 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.310189Jy  sigma=0.001893
! Fit after  self-cal, rms=0.309892Jy  sigma=0.001891
! 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.309892Jy  sigma=0.001891
! Fit after  self-cal, rms=0.269567Jy  sigma=0.001601
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.00363984 Jy
! Component: 100  -  total flux cleaned = 0.00438739 Jy
! Component: 150  -  total flux cleaned = 0.00500039 Jy
! Component: 200  -  total flux cleaned = 0.00525534 Jy
! Total flux subtracted in 200 components = 0.00525534 Jy
! Clean residual min=-0.017915 max=0.020326 Jy/beam
! Clean residual mean=0.000081 rms=0.003847 Jy/beam
! Combined flux in latest and established models = 2.27608 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 18 model components to the UV plane model.
! The established model now contains 80 components and 2.27608 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.269064Jy  sigma=0.001596
! Fit after  self-cal, rms=0.260370Jy  sigma=0.001538
! 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.9823 x 2.791 at -12.56 degrees (North through East)
! Clean map  min=-0.017297  max=1.545 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.260370Jy  sigma=0.001538
! Fit after  self-cal, rms=0.263118Jy  sigma=0.001501
! 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.263118Jy  sigma=0.001501
! Fit after  self-cal, rms=0.260482Jy  sigma=0.001484
! Inverting map and beam 
! Estimated beam: bmin=0.9793 mas, bmaj=2.802 mas, bpa=-12.55 degrees
! Estimated noise=769.263 mJy/beam.
! Added new window around map position (-4.2, 10).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0186693 Jy
! Component: 100  -  total flux cleaned = 0.0190872 Jy
! Component: 150  -  total flux cleaned = 0.018725 Jy
! Component: 200  -  total flux cleaned = 0.0190561 Jy
! Total flux subtracted in 200 components = 0.0190561 Jy
! Clean residual min=-0.013066 max=0.013212 Jy/beam
! Clean residual mean=0.000028 rms=0.002695 Jy/beam
! Combined flux in latest and established models = 2.29514 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 25 model components to the UV plane model.
! The established model now contains 99 components and 2.29514 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.259062Jy  sigma=0.001472
! Fit after  self-cal, rms=0.257843Jy  sigma=0.001465
! 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.257843Jy  sigma=0.001465
! Fit after  self-cal, rms=0.257404Jy  sigma=0.001461
! 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.257404Jy  sigma=0.001461
! Fit after  self-cal, rms=0.256842Jy  sigma=0.001457
! Inverting map and beam 
! Estimated beam: bmin=0.9773 mas, bmaj=2.803 mas, bpa=-12.58 degrees
! Estimated noise=767.594 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -0.000359382 Jy
! Component: 100  -  total flux cleaned = 0.000259807 Jy
! Component: 150  -  total flux cleaned = 0.000272201 Jy
! Component: 200  -  total flux cleaned = 0.000781358 Jy
! Total flux subtracted in 200 components = 0.000781359 Jy
! Clean residual min=-0.011644 max=0.011743 Jy/beam
! Clean residual mean=0.000027 rms=0.002445 Jy/beam
! Combined flux in latest and established models = 2.29592 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 24 model components to the UV plane model.
! The established model now contains 106 components and 2.29592 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256303Jy  sigma=0.001454
! Fit after  self-cal, rms=0.255925Jy  sigma=0.001451
! 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.557 mas, bmaj=4.013 mas, bpa=7.474 degrees
! Estimated noise=944.856 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 (3.6, 1.6).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00465014 Jy
! Component: 100  -  total flux cleaned = 0.00373028 Jy
! Component: 150  -  total flux cleaned = 0.00322512 Jy
! Component: 200  -  total flux cleaned = 0.00322309 Jy
! Total flux subtracted in 200 components = 0.00322309 Jy
! Clean residual min=-0.005417 max=0.006172 Jy/beam
! Clean residual mean=0.000022 rms=0.001821 Jy/beam
! Combined flux in latest and established models = 2.29914 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 142 components and 2.29914 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.255165Jy  sigma=0.001446
! Fit after  self-cal, rms=0.254910Jy  sigma=0.001445
! 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.7387 mas, bmaj=1.892 mas, bpa=-3.948 degrees
! Estimated noise=1404.73 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 1.39389 Jy
! Component: 100  -  total flux cleaned = 1.75584 Jy
! Component: 150  -  total flux cleaned = 1.93584 Jy
! Component: 200  -  total flux cleaned = 2.04183 Jy
! Total flux subtracted in 200 components = 2.04183 Jy
! Clean residual min=-0.021708 max=0.041298 Jy/beam
! Clean residual mean=0.000101 rms=0.007446 Jy/beam
! Combined flux in latest and established models = 2.04183 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 35 model components to the UV plane model.
! The established model now contains 35 components and 2.04183 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9773 mas, bmaj=2.803 mas, bpa=-12.58 degrees
! Estimated noise=767.594 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.113585 Jy
! Component: 100  -  total flux cleaned = 0.16568 Jy
! Component: 150  -  total flux cleaned = 0.196332 Jy
! Component: 200  -  total flux cleaned = 0.215451 Jy
! Total flux subtracted in 200 components = 0.215451 Jy
! Clean residual min=-0.008808 max=0.010362 Jy/beam
! Clean residual mean=0.000053 rms=0.002514 Jy/beam
! Combined flux in latest and established models = 2.25728 Jy
! Adding 87 model components to the UV plane model.
! The established model now contains 109 components and 2.25728 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.557 mas, bmaj=4.013 mas, bpa=7.474 degrees
! Estimated noise=944.856 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.0181569 Jy
! Component: 100  -  total flux cleaned = 0.0270131 Jy
! Component: 150  -  total flux cleaned = 0.03309 Jy
! Component: 200  -  total flux cleaned = 0.0367624 Jy
! Total flux subtracted in 200 components = 0.0367624 Jy
! Clean residual min=-0.004913 max=0.004785 Jy/beam
! Clean residual mean=0.000005 rms=0.001560 Jy/beam
! Combined flux in latest and established models = 2.29404 Jy
! Adding 57 model components to the UV plane model.
! The established model now contains 161 components and 2.29404 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9773 mas, bmaj=2.803 mas, bpa=-12.58 degrees
! Estimated noise=767.594 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00213114 Jy
! Component: 100  -  total flux cleaned = 0.00366408 Jy
! Component: 150  -  total flux cleaned = 0.00489907 Jy
! Component: 200  -  total flux cleaned = 0.00510997 Jy
! Total flux subtracted in 200 components = 0.00510997 Jy
! Clean residual min=-0.005879 max=0.004869 Jy/beam
! Clean residual mean=-0.000004 rms=0.001292 Jy/beam
! Combined flux in latest and established models = 2.29915 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 188 components and 2.29915 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.253871Jy  sigma=0.001435
! Fit after  self-cal, rms=0.253623Jy  sigma=0.001434
wmodel J0339-0146_X_1997_05_07_yyk\_map.mod
! Writing 188 model components to file: J0339-0146_X_1997_05_07_yyk_map.mod
wobs J0339-0146_X_1997_05_07_yyk\_uvs.fits
! Writing UV FITS file: J0339-0146_X_1997_05_07_yyk_uvs.fits
wwins J0339-0146_X_1997_05_07_yyk\_map.win
! wwins: Wrote 4 windows to J0339-0146_X_1997_05_07_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.00231873 Jy
! Component: 100  -  total flux cleaned = -0.00299245 Jy
! Component: 150  -  total flux cleaned = -0.00338206 Jy
! Component: 200  -  total flux cleaned = -0.00288037 Jy
! Component: 250  -  total flux cleaned = -0.00240053 Jy
! Component: 300  -  total flux cleaned = -0.00200451 Jy
! Component: 350  -  total flux cleaned = -0.00162374 Jy
! Component: 400  -  total flux cleaned = -0.00119816 Jy
! Component: 450  -  total flux cleaned = -0.00102254 Jy
! Component: 500  -  total flux cleaned = -0.00107821 Jy
! Component: 550  -  total flux cleaned = -0.000968355 Jy
! Component: 600  -  total flux cleaned = -0.000915503 Jy
! Component: 650  -  total flux cleaned = -0.000758858 Jy
! Component: 700  -  total flux cleaned = -0.00060755 Jy
! Component: 750  -  total flux cleaned = -0.000706953 Jy
! Component: 800  -  total flux cleaned = -0.000804004 Jy
! Component: 850  -  total flux cleaned = -0.000804567 Jy
! Component: 900  -  total flux cleaned = -0.000897491 Jy
! Component: 950  -  total flux cleaned = -0.000988738 Jy
! Component: 1000  -  total flux cleaned = -0.00112337 Jy
! Component: 1050  -  total flux cleaned = -0.00116752 Jy
! Component: 1100  -  total flux cleaned = -0.00125412 Jy
! Component: 1150  -  total flux cleaned = -0.0013407 Jy
! Component: 1200  -  total flux cleaned = -0.00142579 Jy
! Component: 1250  -  total flux cleaned = -0.00146787 Jy
! Component: 1300  -  total flux cleaned = -0.00138721 Jy
! Component: 1350  -  total flux cleaned = -0.00146885 Jy
! Component: 1400  -  total flux cleaned = -0.00162826 Jy
! Component: 1450  -  total flux cleaned = -0.00147161 Jy
! Component: 1500  -  total flux cleaned = -0.00158878 Jy
! Component: 1550  -  total flux cleaned = -0.00151227 Jy
! Component: 1600  -  total flux cleaned = -0.00143651 Jy
! Component: 1650  -  total flux cleaned = -0.00132491 Jy
! Component: 1700  -  total flux cleaned = -0.00136116 Jy
! Component: 1750  -  total flux cleaned = -0.00114358 Jy
! Component: 1800  -  total flux cleaned = -0.00110772 Jy
! Component: 1850  -  total flux cleaned = -0.00100175 Jy
! Component: 1900  -  total flux cleaned = -0.000931776 Jy
! Component: 1950  -  total flux cleaned = -0.000932237 Jy
! Component: 2000  -  total flux cleaned = -0.000966174 Jy
! Total flux subtracted in 2048 components = -0.00103323 Jy
! Clean residual min=-0.001679 max=0.001720 Jy/beam
! Clean residual mean=0.000003 rms=0.000660 Jy/beam
! Combined flux in latest and established models = 2.29812 Jy
keep
! Adding 128 model components to the UV plane model.
! The established model now contains 315 components and 2.29812 Jy
![Exited script file: muppet]
wmap "J0339-0146_X_1997_05_07_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9773 x 2.803 at -12.58 degrees (North through East)
! Clean map  min=-0.0052755  max=1.5572 Jy/beam
! Writing clean map to FITS file: J0339-0146_X_1997_05_07_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.55721 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000653767 
device "J0339-0146_X_1997_05_07_yyk\_map.eps/VPS"
! Attempting to open device: 'J0339-0146_X_1997_05_07_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.12595 0.12595 0.2519 0.5038 1.0076 2.0152 4.0304 8.0608 16.1216 32.2432 64.4864
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(peak_flux*1000)/1000
! peak= 1.557 
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.9773 x 2.803 at -12.58 degrees (North through East)
! Clean map  min=-0.0052755  max=1.5572 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0339-0146_X_1997_05_07_yyk\_map.gif/gif"
! Attempting to open device: 'J0339-0146_X_1997_05_07_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J0339-0146_X_1997_05_07_yyk_uvs.log closed on Mon Jan  8 02:45:59 2007