! Started logfile: J1039-1541_X_1997_07_02_yyk_uvs.log on Mon Jan  8 04:57:06 2007
obs J1039-1541_X_1997_07_02_yyk_uva.fits
! Reading UV FITS file: J1039-1541_X_1997_07_02_yyk_uva.fits
! AN table 1: 143 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.700389 visibilities/baseline/integration-bin.
! Found source: J1039-1541
! 
! 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 753 lines of history.
! 
! Reading 18028 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 J1039-1541_X_1997_07_02_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)= 0.326492 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.7565 mas, bmaj=2.025 mas, bpa=-6.002 degrees
! Estimated noise=1356.09 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.208056 Jy
! Component: 100  -  total flux cleaned = 0.248971 Jy
! Total flux subtracted in 100 components = 0.248971 Jy
! Clean residual min=-0.009934 max=0.015832 Jy/beam
! Clean residual mean=-0.000086 rms=0.002890 Jy/beam
! Combined flux in latest and established models = 0.248971 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 12 model components to the UV plane model.
! The established model now contains 12 components and 0.248971 Jy
! 
! Correcting IF 1.
!  A total of 227 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 227 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 227 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 227 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.209364Jy  sigma=0.001296
! Fit after  self-cal, rms=0.209191Jy  sigma=0.001296
! Inverting map and beam 
! Estimated beam: bmin=0.7565 mas, bmaj=2.025 mas, bpa=-6.002 degrees
! Estimated noise=1356.09 mJy/beam.
! Added new window around map position (1.4, -1.8).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0196759 Jy
! Component: 100  -  total flux cleaned = 0.0301279 Jy
! Total flux subtracted in 100 components = 0.0301279 Jy
! Clean residual min=-0.009341 max=0.009434 Jy/beam
! Clean residual mean=-0.000040 rms=0.002375 Jy/beam
! Combined flux in latest and established models = 0.279099 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 13 model components to the UV plane model.
! The established model now contains 21 components and 0.279099 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207533Jy  sigma=0.001284
! Fit after  self-cal, rms=0.207429Jy  sigma=0.001283
! 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.9102 mas, bmaj=2.372 mas, bpa=-6.279 degrees
! Estimated noise=832.049 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.0107871 Jy
! Component: 100  -  total flux cleaned = 0.0161107 Jy
! Component: 150  -  total flux cleaned = 0.0191692 Jy
! Component: 200  -  total flux cleaned = 0.0197628 Jy
! Total flux subtracted in 200 components = 0.0197628 Jy
! Clean residual min=-0.010486 max=0.008221 Jy/beam
! Clean residual mean=-0.000057 rms=0.002151 Jy/beam
! Combined flux in latest and established models = 0.298862 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 25 model components to the UV plane model.
! The established model now contains 43 components and 0.298862 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207106Jy  sigma=0.001280
! Fit after  self-cal, rms=0.207079Jy  sigma=0.001280
! 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.9102 x 2.372 at -6.279 degrees (North through East)
! Clean map  min=-0.010176  max=0.24278 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: 1.00933
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.08     HN        1.03     KP        0.98     
!   LA        1.01     MK        1.00     NL        0.97     OV        1.00     
!   PT        0.91     SC        0.95     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.01708
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.93     FD        1.06     HN        1.04     KP        0.95     
!   LA        0.99     MK        0.95     NL        1.01     OV        1.05     
!   PT        0.87     SC        0.99     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.998047
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.12     HN        1.01     KP        0.97     
!   LA        1.00     MK        0.98     NL        0.96     OV        0.97     
!   PT        0.95     SC        1.05     
! 
! 
! Correcting IF 4.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.992781
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.08     HN        1.07     KP        0.96     
!   LA        1.00     MK        0.98     NL        0.96     OV        1.00     
!   PT        0.97     SC        1.02     
! 
! 
! Fit before self-cal, rms=0.207079Jy  sigma=0.001280
! Fit after  self-cal, rms=0.209594Jy  sigma=0.001277
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.209594Jy  sigma=0.001277
! Fit after  self-cal, rms=0.209595Jy  sigma=0.001277
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9094 mas, bmaj=2.368 mas, bpa=-6.567 degrees
! Estimated noise=837.017 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.00140695 Jy
! Component: 100  -  total flux cleaned = 0.00140006 Jy
! Component: 150  -  total flux cleaned = 0.00154889 Jy
! Component: 200  -  total flux cleaned = 0.00161458 Jy
! Total flux subtracted in 200 components = 0.00161458 Jy
! Clean residual min=-0.006958 max=0.007254 Jy/beam
! Clean residual mean=-0.000013 rms=0.001708 Jy/beam
! Combined flux in latest and established models = 0.300476 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 15 model components to the UV plane model.
! The established model now contains 54 components and 0.300476 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.209548Jy  sigma=0.001276
! Fit after  self-cal, rms=0.209541Jy  sigma=0.001276
! 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.209541Jy  sigma=0.001276
! Fit after  self-cal, rms=0.200432Jy  sigma=0.001224
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.00623159 Jy
! Component: 100  -  total flux cleaned = 0.00611682 Jy
! Component: 150  -  total flux cleaned = 0.00593516 Jy
! Component: 200  -  total flux cleaned = 0.00593871 Jy
! Total flux subtracted in 200 components = 0.00593871 Jy
! Clean residual min=-0.005477 max=0.005582 Jy/beam
! Clean residual mean=0.000003 rms=0.001496 Jy/beam
! Combined flux in latest and established models = 0.306415 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 66 components and 0.306415 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.200243Jy  sigma=0.001222
! Fit after  self-cal, rms=0.199090Jy  sigma=0.001215
! 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.9094 x 2.368 at -6.567 degrees (North through East)
! Clean map  min=-0.0052178  max=0.25177 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.199090Jy  sigma=0.001215
! Fit after  self-cal, rms=0.198426Jy  sigma=0.001212
! 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.198426Jy  sigma=0.001212
! Fit after  self-cal, rms=0.198066Jy  sigma=0.001210
! Inverting map and beam 
! Estimated beam: bmin=0.9082 mas, bmaj=2.372 mas, bpa=-6.564 degrees
! Estimated noise=829.41 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00265201 Jy
! Component: 100  -  total flux cleaned = 0.00254443 Jy
! Component: 150  -  total flux cleaned = 0.00246664 Jy
! Component: 200  -  total flux cleaned = 0.00240358 Jy
! Total flux subtracted in 200 components = 0.00240358 Jy
! Clean residual min=-0.003773 max=0.004881 Jy/beam
! Clean residual mean=-0.000006 rms=0.001065 Jy/beam
! Combined flux in latest and established models = 0.308819 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 16 model components to the UV plane model.
! The established model now contains 79 components and 0.308819 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.198033Jy  sigma=0.001210
! Fit after  self-cal, rms=0.197843Jy  sigma=0.001209
! Inverting map 
! Added new window around map position (6.4, -6.2).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0050588 Jy
! Component: 100  -  total flux cleaned = 0.00652771 Jy
! Component: 150  -  total flux cleaned = 0.00674335 Jy
! Component: 200  -  total flux cleaned = 0.00686633 Jy
! Total flux subtracted in 200 components = 0.00686633 Jy
! Clean residual min=-0.003380 max=0.003470 Jy/beam
! Clean residual mean=0.000001 rms=0.000929 Jy/beam
! Combined flux in latest and established models = 0.315685 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 20 model components to the UV plane model.
! The established model now contains 98 components and 0.315685 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.197742Jy  sigma=0.001208
! Fit after  self-cal, rms=0.197629Jy  sigma=0.001207
! 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.197629Jy  sigma=0.001207
! Fit after  self-cal, rms=0.197664Jy  sigma=0.001206
! 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.197664Jy  sigma=0.001206
! Fit after  self-cal, rms=0.197607Jy  sigma=0.001205
! Inverting map and beam 
! Estimated beam: bmin=0.9091 mas, bmaj=2.377 mas, bpa=-6.684 degrees
! Estimated noise=829.891 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00264478 Jy
! Component: 100  -  total flux cleaned = 0.00407926 Jy
! Component: 150  -  total flux cleaned = 0.00412919 Jy
! Component: 200  -  total flux cleaned = 0.0041728 Jy
! Total flux subtracted in 200 components = 0.0041728 Jy
! Clean residual min=-0.003249 max=0.003182 Jy/beam
! Clean residual mean=-0.000005 rms=0.000855 Jy/beam
! Combined flux in latest and established models = 0.319858 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 29 model components to the UV plane model.
! The established model now contains 116 components and 0.319858 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.197579Jy  sigma=0.001205
! Fit after  self-cal, rms=0.197540Jy  sigma=0.001205
! 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.075 mas, bmaj=4.129 mas, bpa=-7.863 degrees
! Estimated noise=1062.7 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.000652323 Jy
! Component: 100  -  total flux cleaned = 0.000893508 Jy
! Component: 150  -  total flux cleaned = 0.00104437 Jy
! Component: 200  -  total flux cleaned = 0.00104552 Jy
! Total flux subtracted in 200 components = 0.00104552 Jy
! Clean residual min=-0.003655 max=0.003248 Jy/beam
! Clean residual mean=-0.000009 rms=0.001064 Jy/beam
! Combined flux in latest and established models = 0.320903 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 19 model components to the UV plane model.
! The established model now contains 129 components and 0.320903 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.197538Jy  sigma=0.001205
! Fit after  self-cal, rms=0.197516Jy  sigma=0.001205
! 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.7563 mas, bmaj=2.027 mas, bpa=-6.265 degrees
! Estimated noise=1359.23 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.215234 Jy
! Component: 100  -  total flux cleaned = 0.26038 Jy
! Component: 150  -  total flux cleaned = 0.280426 Jy
! Component: 200  -  total flux cleaned = 0.292614 Jy
! Total flux subtracted in 200 components = 0.292614 Jy
! Clean residual min=-0.005725 max=0.005771 Jy/beam
! Clean residual mean=-0.000033 rms=0.001669 Jy/beam
! Combined flux in latest and established models = 0.292614 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 33 model components to the UV plane model.
! The established model now contains 33 components and 0.292614 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9091 mas, bmaj=2.377 mas, bpa=-6.684 degrees
! Estimated noise=829.891 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.0118373 Jy
! Component: 100  -  total flux cleaned = 0.0184129 Jy
! Component: 150  -  total flux cleaned = 0.0225835 Jy
! Component: 200  -  total flux cleaned = 0.0246435 Jy
! Total flux subtracted in 200 components = 0.0246435 Jy
! Clean residual min=-0.003248 max=0.003171 Jy/beam
! Clean residual mean=-0.000010 rms=0.000893 Jy/beam
! Combined flux in latest and established models = 0.317258 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 54 components and 0.317258 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.075 mas, bmaj=4.129 mas, bpa=-7.863 degrees
! Estimated noise=1062.7 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.00269791 Jy
! Component: 100  -  total flux cleaned = 0.00333982 Jy
! Component: 150  -  total flux cleaned = 0.00347955 Jy
! Component: 200  -  total flux cleaned = 0.00359556 Jy
! Total flux subtracted in 200 components = 0.00359556 Jy
! Clean residual min=-0.003612 max=0.003228 Jy/beam
! Clean residual mean=-0.000008 rms=0.001059 Jy/beam
! Combined flux in latest and established models = 0.320853 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 73 components and 0.320853 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9091 mas, bmaj=2.377 mas, bpa=-6.684 degrees
! Estimated noise=829.891 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -5.90318e-05 Jy
! Component: 100  -  total flux cleaned = -0.000111692 Jy
! Component: 150  -  total flux cleaned = -0.000200947 Jy
! Component: 200  -  total flux cleaned = -0.000242634 Jy
! Total flux subtracted in 200 components = -0.000242634 Jy
! Clean residual min=-0.003189 max=0.003277 Jy/beam
! Clean residual mean=-0.000002 rms=0.000849 Jy/beam
! Combined flux in latest and established models = 0.320611 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 20 model components to the UV plane model.
! The established model now contains 88 components and 0.320611 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.197527Jy  sigma=0.001205
! Fit after  self-cal, rms=0.197512Jy  sigma=0.001205
wmodel J1039-1541_X_1997_07_02_yyk\_map.mod
! Writing 88 model components to file: J1039-1541_X_1997_07_02_yyk_map.mod
wobs J1039-1541_X_1997_07_02_yyk\_uvs.fits
! Writing UV FITS file: J1039-1541_X_1997_07_02_yyk_uvs.fits
wwins J1039-1541_X_1997_07_02_yyk\_map.win
! wwins: Wrote 3 windows to J1039-1541_X_1997_07_02_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.000524272 Jy
! Component: 100  -  total flux cleaned = -0.000835118 Jy
! Component: 150  -  total flux cleaned = -0.000980741 Jy
! Component: 200  -  total flux cleaned = -0.00126094 Jy
! Component: 250  -  total flux cleaned = -0.00143949 Jy
! Component: 300  -  total flux cleaned = -0.0017423 Jy
! Component: 350  -  total flux cleaned = -0.0019941 Jy
! Component: 400  -  total flux cleaned = -0.00235991 Jy
! Component: 450  -  total flux cleaned = -0.00263607 Jy
! Component: 500  -  total flux cleaned = -0.00305813 Jy
! Component: 550  -  total flux cleaned = -0.00335612 Jy
! Component: 600  -  total flux cleaned = -0.00357392 Jy
! Component: 650  -  total flux cleaned = -0.00375189 Jy
! Component: 700  -  total flux cleaned = -0.00389158 Jy
! Component: 750  -  total flux cleaned = -0.00402838 Jy
! Component: 800  -  total flux cleaned = -0.00412866 Jy
! Component: 850  -  total flux cleaned = -0.00429362 Jy
! Component: 900  -  total flux cleaned = -0.00445528 Jy
! Component: 950  -  total flux cleaned = -0.00464647 Jy
! Component: 1000  -  total flux cleaned = -0.0048029 Jy
! Component: 1050  -  total flux cleaned = -0.00486472 Jy
! Component: 1100  -  total flux cleaned = -0.00498692 Jy
! Component: 1150  -  total flux cleaned = -0.00513659 Jy
! Component: 1200  -  total flux cleaned = -0.00525379 Jy
! Component: 1250  -  total flux cleaned = -0.00528236 Jy
! Component: 1300  -  total flux cleaned = -0.00531095 Jy
! Component: 1350  -  total flux cleaned = -0.00545201 Jy
! Component: 1400  -  total flux cleaned = -0.00547991 Jy
! Component: 1450  -  total flux cleaned = -0.00559024 Jy
! Component: 1500  -  total flux cleaned = -0.00577922 Jy
! Component: 1550  -  total flux cleaned = -0.00575268 Jy
! Component: 1600  -  total flux cleaned = -0.00585819 Jy
! Component: 1650  -  total flux cleaned = -0.00603977 Jy
! Component: 1700  -  total flux cleaned = -0.00616786 Jy
! Component: 1750  -  total flux cleaned = -0.00629451 Jy
! Component: 1800  -  total flux cleaned = -0.00641932 Jy
! Component: 1850  -  total flux cleaned = -0.00654265 Jy
! Component: 1900  -  total flux cleaned = -0.00668851 Jy
! Component: 1950  -  total flux cleaned = -0.00685681 Jy
! Component: 2000  -  total flux cleaned = -0.00685654 Jy
! Total flux subtracted in 2048 components = -0.00695047 Jy
! Clean residual min=-0.001521 max=0.001612 Jy/beam
! Clean residual mean=-0.000002 rms=0.000457 Jy/beam
! Combined flux in latest and established models = 0.31366 Jy
keep
! Adding 142 model components to the UV plane model.
! The established model now contains 230 components and 0.31366 Jy
![Exited script file: muppet]
wmap "J1039-1541_X_1997_07_02_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9091 x 2.377 at -6.684 degrees (North through East)
! Clean map  min=-0.0023122  max=0.24934 Jy/beam
! Writing clean map to FITS file: J1039-1541_X_1997_07_02_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.249337 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000454016 
device "J1039-1541_X_1997_07_02_yyk\_map.eps/VPS"
! Attempting to open device: 'J1039-1541_X_1997_07_02_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.546267 0.546267 1.09253 2.18507 4.37013 8.74027 17.4805 34.9611 69.9221
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0013 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.249 
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.9091 x 2.377 at -6.684 degrees (North through East)
! Clean map  min=-0.0023122  max=0.24934 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1039-1541_X_1997_07_02_yyk\_map.gif/gif"
! Attempting to open device: 'J1039-1541_X_1997_07_02_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1039-1541_X_1997_07_02_yyk_uvs.log closed on Mon Jan  8 04:57:17 2007