! Started logfile: J0539-1550_X_1997_07_02_yyk_uvs.log on Mon Jan  8 03:21:29 2007
obs J0539-1550_X_1997_07_02_yyk_uva.fits
! Reading UV FITS file: J0539-1550_X_1997_07_02_yyk_uva.fits
! AN table 1: 134 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.869818 visibilities/baseline/integration-bin.
! Found source: J0539-1550
! 
! 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 20980 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 J0539-1550_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.385305 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.6917 mas, bmaj=1.884 mas, bpa=-1.503 degrees
! Estimated noise=1366.07 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.198785 Jy
! Component: 100  -  total flux cleaned = 0.25038 Jy
! Total flux subtracted in 100 components = 0.25038 Jy
! Clean residual min=-0.013788 max=0.024155 Jy/beam
! Clean residual mean=0.000030 rms=0.004175 Jy/beam
! Combined flux in latest and established models = 0.25038 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 17 model components to the UV plane model.
! The established model now contains 17 components and 0.25038 Jy
! 
! Correcting IF 1.
!  A total of 97 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 97 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 97 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 97 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.292641Jy  sigma=0.001439
! Fit after  self-cal, rms=0.291440Jy  sigma=0.001436
! Inverting map and beam 
! Estimated beam: bmin=0.6917 mas, bmaj=1.884 mas, bpa=-1.503 degrees
! Estimated noise=1366.07 mJy/beam.
! Added new window around map position (1.6, 0.6).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0311773 Jy
! Component: 100  -  total flux cleaned = 0.0482181 Jy
! Total flux subtracted in 100 components = 0.0482181 Jy
! Clean residual min=-0.012047 max=0.015862 Jy/beam
! Clean residual mean=0.000023 rms=0.003559 Jy/beam
! Combined flux in latest and established models = 0.298598 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 18 model components to the UV plane model.
! The established model now contains 32 components and 0.298598 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.288386Jy  sigma=0.001405
! Fit after  self-cal, rms=0.288115Jy  sigma=0.001403
! 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.8873 mas, bmaj=2.47 mas, bpa=-4.833 degrees
! Estimated noise=752.518 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.0241661 Jy
! Component: 100  -  total flux cleaned = 0.0336731 Jy
! Component: 150  -  total flux cleaned = 0.0354591 Jy
! Component: 200  -  total flux cleaned = 0.0363026 Jy
! Total flux subtracted in 200 components = 0.0363026 Jy
! Clean residual min=-0.008109 max=0.016186 Jy/beam
! Clean residual mean=0.000112 rms=0.002813 Jy/beam
! Combined flux in latest and established models = 0.334901 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 45 components and 0.334901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287568Jy  sigma=0.001392
! Fit after  self-cal, rms=0.287548Jy  sigma=0.001392
! Inverting map 
! Added new window around map position (1.4, 5).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0170545 Jy
! Component: 100  -  total flux cleaned = 0.018689 Jy
! Component: 150  -  total flux cleaned = 0.0186876 Jy
! Component: 200  -  total flux cleaned = 0.018859 Jy
! Total flux subtracted in 200 components = 0.018859 Jy
! Clean residual min=-0.006909 max=0.011021 Jy/beam
! Clean residual mean=0.000074 rms=0.002122 Jy/beam
! Combined flux in latest and established models = 0.35376 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 29 model components to the UV plane model.
! The established model now contains 71 components and 0.35376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.286972Jy  sigma=0.001385
! Fit after  self-cal, rms=0.286886Jy  sigma=0.001384
! 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.8873 x 2.47 at -4.833 degrees (North through East)
! Clean map  min=-0.0060803  max=0.23853 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.995893
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.08     HN        1.08     KP        1.01     
!   LA        1.01     MK        1.03     NL        0.98     OV        0.97     
!   PT        0.96     SC        0.89     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.00454
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.07     HN        0.98     KP        1.03     
!   LA        1.00     MK        0.96     NL        1.00     OV        1.05     
!   PT        0.91     SC        1.01     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.995222
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.12     HN        1.06     KP        1.00     
!   LA        0.97     MK        1.02     NL        0.99     OV        0.95     
!   PT        0.95     SC        1.00     
! 
! 
! Correcting IF 4.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.993375
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.04     HN        1.11     KP        0.99     
!   LA        0.99     MK        0.99     NL        0.98     OV        0.98     
!   PT        0.98     SC        0.98     
! 
! 
! Fit before self-cal, rms=0.286886Jy  sigma=0.001384
! Fit after  self-cal, rms=0.287613Jy  sigma=0.001380
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.287613Jy  sigma=0.001380
! Fit after  self-cal, rms=0.287633Jy  sigma=0.001380
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.8873 mas, bmaj=2.437 mas, bpa=-4.315 degrees
! Estimated noise=746.024 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 (2.6, 12.8).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0104826 Jy
! Component: 100  -  total flux cleaned = 0.01343 Jy
! Component: 150  -  total flux cleaned = 0.0158537 Jy
! Component: 200  -  total flux cleaned = 0.0175731 Jy
! Total flux subtracted in 200 components = 0.0175731 Jy
! Clean residual min=-0.004632 max=0.004353 Jy/beam
! Clean residual mean=-0.000072 rms=0.001245 Jy/beam
! Combined flux in latest and established models = 0.371333 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 30 model components to the UV plane model.
! The established model now contains 98 components and 0.371333 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287177Jy  sigma=0.001377
! Fit after  self-cal, rms=0.287147Jy  sigma=0.001377
! 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.287147Jy  sigma=0.001377
! Fit after  self-cal, rms=0.284235Jy  sigma=0.001353
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.00297024 Jy
! Component: 100  -  total flux cleaned = 0.00371631 Jy
! Component: 150  -  total flux cleaned = 0.00426519 Jy
! Component: 200  -  total flux cleaned = 0.00466741 Jy
! Total flux subtracted in 200 components = 0.00466741 Jy
! Clean residual min=-0.004421 max=0.003913 Jy/beam
! Clean residual mean=-0.000086 rms=0.001167 Jy/beam
! Combined flux in latest and established models = 0.376 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 30 model components to the UV plane model.
! The established model now contains 120 components and 0.376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284197Jy  sigma=0.001353
! Fit after  self-cal, rms=0.283745Jy  sigma=0.001349
! 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.8873 x 2.437 at -4.315 degrees (North through East)
! Clean map  min=-0.0041808  max=0.24144 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.283745Jy  sigma=0.001349
! Fit after  self-cal, rms=2.216905Jy  sigma=0.001341
! 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=2.216905Jy  sigma=0.001341
! Fit after  self-cal, rms=2.216869Jy  sigma=0.001340
! Inverting map and beam 
! Estimated beam: bmin=0.8836 mas, bmaj=2.461 mas, bpa=-4.371 degrees
! Estimated noise=739.067 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00180526 Jy
! Component: 100  -  total flux cleaned = 0.00195063 Jy
! Component: 150  -  total flux cleaned = 0.0016868 Jy
! Component: 200  -  total flux cleaned = 0.00127543 Jy
! Total flux subtracted in 200 components = 0.00127543 Jy
! Clean residual min=-0.003695 max=0.003182 Jy/beam
! Clean residual mean=-0.000049 rms=0.000928 Jy/beam
! Combined flux in latest and established models = 0.377276 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 23 model components to the UV plane model.
! The established model now contains 137 components and 0.377276 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=2.216802Jy  sigma=0.001340
! Fit after  self-cal, rms=2.216977Jy  sigma=0.001339
! 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=2.216977Jy  sigma=0.001339
! Fit after  self-cal, rms=1.632863Jy  sigma=0.001337
! 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.632863Jy  sigma=0.001337
! Fit after  self-cal, rms=1.633383Jy  sigma=0.001337
! Inverting map and beam 
! Estimated beam: bmin=0.8789 mas, bmaj=2.443 mas, bpa=-4.222 degrees
! Estimated noise=736.047 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.000447526 Jy
! Component: 100  -  total flux cleaned = 0.000371815 Jy
! Component: 150  -  total flux cleaned = 0.000298766 Jy
! Component: 200  -  total flux cleaned = 0.00010065 Jy
! Total flux subtracted in 200 components = 0.00010065 Jy
! Clean residual min=-0.003342 max=0.003074 Jy/beam
! Clean residual mean=-0.000044 rms=0.000890 Jy/beam
! Combined flux in latest and established models = 0.377376 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 144 components and 0.377376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.633352Jy  sigma=0.001337
! Fit after  self-cal, rms=1.633266Jy  sigma=0.001337
! 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.345 mas, bmaj=4.896 mas, bpa=5.948 degrees
! Estimated noise=940.999 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.000753805 Jy
! Component: 100  -  total flux cleaned = -0.000603379 Jy
! Component: 150  -  total flux cleaned = -0.00053772 Jy
! Component: 200  -  total flux cleaned = -0.000508581 Jy
! Total flux subtracted in 200 components = -0.000508582 Jy
! Clean residual min=-0.003340 max=0.003064 Jy/beam
! Clean residual mean=-0.000082 rms=0.000978 Jy/beam
! Combined flux in latest and established models = 0.376868 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 22 model components to the UV plane model.
! The established model now contains 162 components and 0.376868 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.633265Jy  sigma=0.001337
! Fit after  self-cal, rms=1.633217Jy  sigma=0.001336
! 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.6893 mas, bmaj=1.895 mas, bpa=-1.666 degrees
! Estimated noise=1399 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.21009 Jy
! Component: 100  -  total flux cleaned = 0.264478 Jy
! Component: 150  -  total flux cleaned = 0.292174 Jy
! Component: 200  -  total flux cleaned = 0.310541 Jy
! Total flux subtracted in 200 components = 0.310541 Jy
! Clean residual min=-0.007941 max=0.008723 Jy/beam
! Clean residual mean=0.000003 rms=0.002166 Jy/beam
! Combined flux in latest and established models = 0.310541 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 32 model components to the UV plane model.
! The established model now contains 32 components and 0.310541 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.8789 mas, bmaj=2.443 mas, bpa=-4.222 degrees
! Estimated noise=736.047 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.0204326 Jy
! Component: 100  -  total flux cleaned = 0.0324006 Jy
! Component: 150  -  total flux cleaned = 0.0408999 Jy
! Component: 200  -  total flux cleaned = 0.0472453 Jy
! Total flux subtracted in 200 components = 0.0472453 Jy
! Clean residual min=-0.003883 max=0.004060 Jy/beam
! Clean residual mean=0.000014 rms=0.001146 Jy/beam
! Combined flux in latest and established models = 0.357787 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 75 components and 0.357787 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.345 mas, bmaj=4.896 mas, bpa=5.948 degrees
! Estimated noise=940.999 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.00685388 Jy
! Component: 100  -  total flux cleaned = 0.0111049 Jy
! Component: 150  -  total flux cleaned = 0.0140142 Jy
! Component: 200  -  total flux cleaned = 0.0160882 Jy
! Total flux subtracted in 200 components = 0.0160882 Jy
! Clean residual min=-0.003695 max=0.003029 Jy/beam
! Clean residual mean=-0.000062 rms=0.001011 Jy/beam
! Combined flux in latest and established models = 0.373875 Jy
! Adding 58 model components to the UV plane model.
! The established model now contains 127 components and 0.373875 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.8789 mas, bmaj=2.443 mas, bpa=-4.222 degrees
! Estimated noise=736.047 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00133682 Jy
! Component: 100  -  total flux cleaned = 0.00205743 Jy
! Component: 150  -  total flux cleaned = 0.00260349 Jy
! Component: 200  -  total flux cleaned = 0.00281428 Jy
! Total flux subtracted in 200 components = 0.00281428 Jy
! Clean residual min=-0.003186 max=0.002656 Jy/beam
! Clean residual mean=-0.000040 rms=0.000843 Jy/beam
! Combined flux in latest and established models = 0.376689 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 145 components and 0.376689 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.633088Jy  sigma=0.001336
! Fit after  self-cal, rms=1.633030Jy  sigma=0.001336
wmodel J0539-1550_X_1997_07_02_yyk\_map.mod
! Writing 145 model components to file: J0539-1550_X_1997_07_02_yyk_map.mod
wobs J0539-1550_X_1997_07_02_yyk\_uvs.fits
! Writing UV FITS file: J0539-1550_X_1997_07_02_yyk_uvs.fits
wwins J0539-1550_X_1997_07_02_yyk\_map.win
! wwins: Wrote 4 windows to J0539-1550_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.00122311 Jy
! Component: 100  -  total flux cleaned = -0.00187168 Jy
! Component: 150  -  total flux cleaned = -0.00234672 Jy
! Component: 200  -  total flux cleaned = -0.00266605 Jy
! Component: 250  -  total flux cleaned = -0.00288843 Jy
! Component: 300  -  total flux cleaned = -0.00306034 Jy
! Component: 350  -  total flux cleaned = -0.00318604 Jy
! Component: 400  -  total flux cleaned = -0.0032267 Jy
! Component: 450  -  total flux cleaned = -0.00334584 Jy
! Component: 500  -  total flux cleaned = -0.0034623 Jy
! Component: 550  -  total flux cleaned = -0.00361469 Jy
! Component: 600  -  total flux cleaned = -0.00368956 Jy
! Component: 650  -  total flux cleaned = -0.00376327 Jy
! Component: 700  -  total flux cleaned = -0.00376344 Jy
! Component: 750  -  total flux cleaned = -0.0036921 Jy
! Component: 800  -  total flux cleaned = -0.00358766 Jy
! Component: 850  -  total flux cleaned = -0.00355332 Jy
! Component: 900  -  total flux cleaned = -0.00355378 Jy
! Component: 950  -  total flux cleaned = -0.00351953 Jy
! Component: 1000  -  total flux cleaned = -0.0035186 Jy
! Component: 1050  -  total flux cleaned = -0.00335677 Jy
! Component: 1100  -  total flux cleaned = -0.00335729 Jy
! Component: 1150  -  total flux cleaned = -0.0032634 Jy
! Component: 1200  -  total flux cleaned = -0.00329487 Jy
! Component: 1250  -  total flux cleaned = -0.00335655 Jy
! Component: 1300  -  total flux cleaned = -0.00332623 Jy
! Component: 1350  -  total flux cleaned = -0.00332604 Jy
! Component: 1400  -  total flux cleaned = -0.00326656 Jy
! Component: 1450  -  total flux cleaned = -0.00329587 Jy
! Component: 1500  -  total flux cleaned = -0.00335407 Jy
! Component: 1550  -  total flux cleaned = -0.00338274 Jy
! Component: 1600  -  total flux cleaned = -0.00346814 Jy
! Component: 1650  -  total flux cleaned = -0.00349608 Jy
! Component: 1700  -  total flux cleaned = -0.003524 Jy
! Component: 1750  -  total flux cleaned = -0.00355164 Jy
! Component: 1800  -  total flux cleaned = -0.00363366 Jy
! Component: 1850  -  total flux cleaned = -0.00357914 Jy
! Component: 1900  -  total flux cleaned = -0.00366032 Jy
! Component: 1950  -  total flux cleaned = -0.00366039 Jy
! Component: 2000  -  total flux cleaned = -0.00366035 Jy
! Total flux subtracted in 2048 components = -0.00360759 Jy
! Clean residual min=-0.001558 max=0.001312 Jy/beam
! Clean residual mean=-0.000026 rms=0.000508 Jy/beam
! Combined flux in latest and established models = 0.373081 Jy
keep
! Adding 152 model components to the UV plane model.
! The established model now contains 297 components and 0.373082 Jy
![Exited script file: muppet]
wmap "J0539-1550_X_1997_07_02_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8789 x 2.443 at -4.222 degrees (North through East)
! Clean map  min=-0.0022657  max=0.24555 Jy/beam
! Writing clean map to FITS file: J0539-1550_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.245554 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000508571 
device "J0539-1550_X_1997_07_02_yyk\_map.eps/VPS"
! Attempting to open device: 'J0539-1550_X_1997_07_02_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.621335 0.621335 1.24267 2.48534 4.97068 9.94135 19.8827 39.7654 79.5308
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.245 
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.8789 x 2.443 at -4.222 degrees (North through East)
! Clean map  min=-0.0022657  max=0.24555 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0539-1550_X_1997_07_02_yyk\_map.gif/gif"
! Attempting to open device: 'J0539-1550_X_1997_07_02_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J0539-1550_X_1997_07_02_yyk_uvs.log closed on Mon Jan  8 03:21:40 2007