! Started logfile: J1212-2221_X_1997_08_27_yyk_uvs.log on Mon Jan  8 05:38:04 2007
obs J1212-2221_X_1997_08_27_yyk_uva.fits
! Reading UV FITS file: J1212-2221_X_1997_08_27_yyk_uva.fits
! AN table 1: 145 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.884291 visibilities/baseline/integration-bin.
! Found source: J1212-2221
! 
! 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 701 lines of history.
! 
! Reading 23080 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 J1212-2221_X_1997_08_27_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.352078 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.667 mas, bmaj=1.76 mas, bpa=-1.162 degrees
! Estimated noise=1381.14 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.179966 Jy
! Component: 100  -  total flux cleaned = 0.248656 Jy
! Total flux subtracted in 100 components = 0.248656 Jy
! Clean residual min=-0.012676 max=0.022159 Jy/beam
! Clean residual mean=0.000091 rms=0.003699 Jy/beam
! Combined flux in latest and established models = 0.248656 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 14 model components to the UV plane model.
! The established model now contains 14 components and 0.248656 Jy
! 
! Correcting IF 1.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 92 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.272009Jy  sigma=0.001353
! Fit after  self-cal, rms=0.271732Jy  sigma=0.001351
! Inverting map and beam 
! Estimated beam: bmin=0.667 mas, bmaj=1.76 mas, bpa=-1.162 degrees
! Estimated noise=1381.19 mJy/beam.
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0321276 Jy
! Component: 100  -  total flux cleaned = 0.0488394 Jy
! Total flux subtracted in 100 components = 0.0488394 Jy
! Clean residual min=-0.010327 max=0.011058 Jy/beam
! Clean residual mean=0.000035 rms=0.002694 Jy/beam
! Combined flux in latest and established models = 0.297495 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 0.297495 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.269059Jy  sigma=0.001326
! Fit after  self-cal, rms=0.269050Jy  sigma=0.001325
! 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.8491 mas, bmaj=2.187 mas, bpa=-4.324 degrees
! Estimated noise=826.519 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.013636 Jy
! Component: 100  -  total flux cleaned = 0.0189604 Jy
! Component: 150  -  total flux cleaned = 0.0212587 Jy
! Component: 200  -  total flux cleaned = 0.0217666 Jy
! Total flux subtracted in 200 components = 0.0217666 Jy
! Clean residual min=-0.006210 max=0.007915 Jy/beam
! Clean residual mean=0.000013 rms=0.001831 Jy/beam
! Combined flux in latest and established models = 0.319262 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 18 model components to the UV plane model.
! The established model now contains 40 components and 0.319262 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.268993Jy  sigma=0.001323
! Fit after  self-cal, rms=0.268980Jy  sigma=0.001323
! 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.8491 x 2.187 at -4.324 degrees (North through East)
! Clean map  min=-0.0057166  max=0.20839 Jy/beam
if(peak(flux) < thresh*2)
  selflims ampcor_selflim
  end if
gscale
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.02324
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.97     HN        1.14     KP        1.06     
!   LA        0.98     MK        1.01     NL        0.99     OV        1.02     
!   PT        0.95     SC        0.71     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.958581
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.00     HN        1.06     KP        1.05     
!   LA        0.96     MK        1.01     NL        0.98     OV        1.02     
!   PT        0.91     SC        1.48     
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.897663
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.00     HN        1.11     KP        1.03     
!   LA        0.98     MK        1.00     NL        1.02     OV        1.00     
!   PT        0.98     SC        2.08     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.961052
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        0.98     HN        1.12     KP        1.01     
!   LA        1.01     MK        1.02     NL        1.01     OV        0.98     
!   PT        0.97     SC        1.27     
! 
! 
! Fit before self-cal, rms=0.268980Jy  sigma=0.001323
! Fit after  self-cal, rms=0.298946Jy  sigma=0.001333
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.298946Jy  sigma=0.001333
! Fit after  self-cal, rms=0.298846Jy  sigma=0.001333
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.8865 mas, bmaj=2.372 mas, bpa=-7.074 degrees
! Estimated noise=771.645 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.0209847 Jy
! Component: 100  -  total flux cleaned = -0.0277035 Jy
! Component: 150  -  total flux cleaned = -0.0303765 Jy
! Component: 200  -  total flux cleaned = -0.0312391 Jy
! Total flux subtracted in 200 components = -0.0312391 Jy
! Clean residual min=-0.005263 max=0.006127 Jy/beam
! Clean residual mean=-0.000023 rms=0.001583 Jy/beam
! Combined flux in latest and established models = 0.288023 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 50 components and 0.288023 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.297885Jy  sigma=0.001325
! Fit after  self-cal, rms=0.297868Jy  sigma=0.001325
! 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.297868Jy  sigma=0.001325
! Fit after  self-cal, rms=0.292072Jy  sigma=0.001283
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.00647817 Jy
! Component: 100  -  total flux cleaned = 0.00742751 Jy
! Component: 150  -  total flux cleaned = 0.00750396 Jy
! Component: 200  -  total flux cleaned = 0.00743418 Jy
! Total flux subtracted in 200 components = 0.00743418 Jy
! Clean residual min=-0.005576 max=0.006963 Jy/beam
! Clean residual mean=-0.000024 rms=0.001454 Jy/beam
! Combined flux in latest and established models = 0.295457 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 9 model components to the UV plane model.
! The established model now contains 53 components and 0.295457 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.291970Jy  sigma=0.001282
! Fit after  self-cal, rms=0.291145Jy  sigma=0.001277
! Inverting map 
! Added new window around map position (2.6, -2.8).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00805995 Jy
! Component: 100  -  total flux cleaned = 0.00901038 Jy
! Component: 150  -  total flux cleaned = 0.00901848 Jy
! Component: 200  -  total flux cleaned = 0.00901226 Jy
! Total flux subtracted in 200 components = 0.00901226 Jy
! Clean residual min=-0.004950 max=0.004892 Jy/beam
! Clean residual mean=-0.000045 rms=0.001291 Jy/beam
! Combined flux in latest and established models = 0.304469 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 73 components and 0.304469 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290837Jy  sigma=0.001276
! Fit after  self-cal, rms=0.290651Jy  sigma=0.001275
! 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.8865 x 2.372 at -7.074 degrees (North through East)
! Clean map  min=-0.0049738  max=0.2093 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.290651Jy  sigma=0.001275
! Fit after  self-cal, rms=0.376953Jy  sigma=0.001263
! 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.376953Jy  sigma=0.001263
! Fit after  self-cal, rms=0.376910Jy  sigma=0.001262
! Inverting map and beam 
! Estimated beam: bmin=0.8589 mas, bmaj=2.14 mas, bpa=-4.48 degrees
! Estimated noise=747.386 mJy/beam.
! Added new window around map position (21.6, 25).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00315007 Jy
! Component: 100  -  total flux cleaned = 0.00416989 Jy
! Component: 150  -  total flux cleaned = 0.00455569 Jy
! Component: 200  -  total flux cleaned = 0.00489515 Jy
! Total flux subtracted in 200 components = 0.00489515 Jy
! Clean residual min=-0.003073 max=0.002533 Jy/beam
! Clean residual mean=-0.000002 rms=0.000728 Jy/beam
! Combined flux in latest and established models = 0.309364 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 27 model components to the UV plane model.
! The established model now contains 97 components and 0.309364 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.376890Jy  sigma=0.001262
! Fit after  self-cal, rms=0.376903Jy  sigma=0.001262
! 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.376903Jy  sigma=0.001262
! Fit after  self-cal, rms=0.385587Jy  sigma=0.001260
! 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.385587Jy  sigma=0.001260
! Fit after  self-cal, rms=0.385593Jy  sigma=0.001260
! Inverting map and beam 
! Estimated beam: bmin=0.8553 mas, bmaj=2.12 mas, bpa=-4.217 degrees
! Estimated noise=744.752 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00127568 Jy
! Component: 100  -  total flux cleaned = 0.00160597 Jy
! Component: 150  -  total flux cleaned = 0.00170364 Jy
! Component: 200  -  total flux cleaned = 0.00179398 Jy
! Total flux subtracted in 200 components = 0.00179398 Jy
! Clean residual min=-0.002993 max=0.002468 Jy/beam
! Clean residual mean=-0.000001 rms=0.000700 Jy/beam
! Combined flux in latest and established models = 0.311158 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 110 components and 0.311158 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385586Jy  sigma=0.001260
! Fit after  self-cal, rms=0.385556Jy  sigma=0.001260
! 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.222 mas, bmaj=5.058 mas, bpa=6.164 degrees
! Estimated noise=972.389 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.000671242 Jy
! Component: 100  -  total flux cleaned = 0.000860508 Jy
! Component: 150  -  total flux cleaned = 0.000860737 Jy
! Component: 200  -  total flux cleaned = 0.00086058 Jy
! Total flux subtracted in 200 components = 0.00086058 Jy
! Clean residual min=-0.002262 max=0.002454 Jy/beam
! Clean residual mean=-0.000003 rms=0.000797 Jy/beam
! Combined flux in latest and established models = 0.312019 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 14 model components to the UV plane model.
! The established model now contains 120 components and 0.312019 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385555Jy  sigma=0.001260
! Fit after  self-cal, rms=0.385558Jy  sigma=0.001260
! 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.6802 mas, bmaj=1.726 mas, bpa=-1.536 degrees
! Estimated noise=1290.39 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.173941 Jy
! Component: 100  -  total flux cleaned = 0.240058 Jy
! Component: 150  -  total flux cleaned = 0.268656 Jy
! Component: 200  -  total flux cleaned = 0.281565 Jy
! Total flux subtracted in 200 components = 0.281565 Jy
! Clean residual min=-0.006717 max=0.006493 Jy/beam
! Clean residual mean=0.000027 rms=0.001782 Jy/beam
! Combined flux in latest and established models = 0.281565 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 17 model components to the UV plane model.
! The established model now contains 17 components and 0.281565 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.8553 mas, bmaj=2.12 mas, bpa=-4.217 degrees
! Estimated noise=744.752 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.010995 Jy
! Component: 100  -  total flux cleaned = 0.0173212 Jy
! Component: 150  -  total flux cleaned = 0.0217474 Jy
! Component: 200  -  total flux cleaned = 0.0243323 Jy
! Total flux subtracted in 200 components = 0.0243323 Jy
! Clean residual min=-0.003278 max=0.002764 Jy/beam
! Clean residual mean=0.000003 rms=0.000758 Jy/beam
! Combined flux in latest and established models = 0.305897 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 53 components and 0.305897 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.222 mas, bmaj=5.058 mas, bpa=6.164 degrees
! Estimated noise=972.389 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.00308813 Jy
! Component: 100  -  total flux cleaned = 0.00486835 Jy
! Component: 150  -  total flux cleaned = 0.00576027 Jy
! Component: 200  -  total flux cleaned = 0.00616644 Jy
! Total flux subtracted in 200 components = 0.00616644 Jy
! Clean residual min=-0.002325 max=0.002534 Jy/beam
! Clean residual mean=-0.000001 rms=0.000785 Jy/beam
! Combined flux in latest and established models = 0.312063 Jy
! Adding 18 model components to the UV plane model.
! The established model now contains 66 components and 0.312063 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.8553 mas, bmaj=2.12 mas, bpa=-4.217 degrees
! Estimated noise=744.752 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -4.9656e-05 Jy
! Component: 100  -  total flux cleaned = 0.000138038 Jy
! Component: 150  -  total flux cleaned = 0.000134196 Jy
! Component: 200  -  total flux cleaned = 0.000183882 Jy
! Total flux subtracted in 200 components = 0.000183882 Jy
! Clean residual min=-0.003047 max=0.002641 Jy/beam
! Clean residual mean=0.000000 rms=0.000702 Jy/beam
! Combined flux in latest and established models = 0.312247 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 25 model components to the UV plane model.
! The established model now contains 88 components and 0.312247 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385593Jy  sigma=0.001260
! Fit after  self-cal, rms=0.385659Jy  sigma=0.001260
wmodel J1212-2221_X_1997_08_27_yyk\_map.mod
! Writing 88 model components to file: J1212-2221_X_1997_08_27_yyk_map.mod
wobs J1212-2221_X_1997_08_27_yyk\_uvs.fits
! Writing UV FITS file: J1212-2221_X_1997_08_27_yyk_uvs.fits
wwins J1212-2221_X_1997_08_27_yyk\_map.win
! wwins: Wrote 3 windows to J1212-2221_X_1997_08_27_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.000650929 Jy
! Component: 100  -  total flux cleaned = -0.000562055 Jy
! Component: 150  -  total flux cleaned = -0.00051928 Jy
! Component: 200  -  total flux cleaned = -0.000599003 Jy
! Component: 250  -  total flux cleaned = -0.000873147 Jy
! Component: 300  -  total flux cleaned = -0.00125283 Jy
! Component: 350  -  total flux cleaned = -0.00165668 Jy
! Component: 400  -  total flux cleaned = -0.00190635 Jy
! Component: 450  -  total flux cleaned = -0.00225447 Jy
! Component: 500  -  total flux cleaned = -0.00259406 Jy
! Component: 550  -  total flux cleaned = -0.00289294 Jy
! Component: 600  -  total flux cleaned = -0.00328024 Jy
! Component: 650  -  total flux cleaned = -0.0035959 Jy
! Component: 700  -  total flux cleaned = -0.00399895 Jy
! Component: 750  -  total flux cleaned = -0.0042423 Jy
! Component: 800  -  total flux cleaned = -0.00457134 Jy
! Component: 850  -  total flux cleaned = -0.00480657 Jy
! Component: 900  -  total flux cleaned = -0.00497997 Jy
! Component: 950  -  total flux cleaned = -0.00515054 Jy
! Component: 1000  -  total flux cleaned = -0.00526306 Jy
! Component: 1050  -  total flux cleaned = -0.00548424 Jy
! Component: 1100  -  total flux cleaned = -0.0057012 Jy
! Component: 1150  -  total flux cleaned = -0.00588829 Jy
! Component: 1200  -  total flux cleaned = -0.00602027 Jy
! Component: 1250  -  total flux cleaned = -0.00625475 Jy
! Component: 1300  -  total flux cleaned = -0.00638349 Jy
! Component: 1350  -  total flux cleaned = -0.00663725 Jy
! Component: 1400  -  total flux cleaned = -0.00671229 Jy
! Component: 1450  -  total flux cleaned = -0.00693479 Jy
! Component: 1500  -  total flux cleaned = -0.00700822 Jy
! Component: 1550  -  total flux cleaned = -0.00715284 Jy
! Component: 1600  -  total flux cleaned = -0.00720061 Jy
! Component: 1650  -  total flux cleaned = -0.00741241 Jy
! Component: 1700  -  total flux cleaned = -0.00745869 Jy
! Component: 1750  -  total flux cleaned = -0.00764261 Jy
! Component: 1800  -  total flux cleaned = -0.00768803 Jy
! Component: 1850  -  total flux cleaned = -0.0079355 Jy
! Component: 1900  -  total flux cleaned = -0.0080465 Jy
! Component: 1950  -  total flux cleaned = -0.00813471 Jy
! Component: 2000  -  total flux cleaned = -0.00826521 Jy
! Total flux subtracted in 2048 components = -0.00843798 Jy
! Clean residual min=-0.001135 max=0.001440 Jy/beam
! Clean residual mean=0.000010 rms=0.000406 Jy/beam
! Combined flux in latest and established models = 0.303809 Jy
keep
! Adding 137 model components to the UV plane model.
! The established model now contains 225 components and 0.303809 Jy
![Exited script file: muppet]
wmap "J1212-2221_X_1997_08_27_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8553 x 2.12 at -4.217 degrees (North through East)
! Clean map  min=-0.0022165  max=0.19855 Jy/beam
! Writing clean map to FITS file: J1212-2221_X_1997_08_27_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.198548 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000406291 
device "J1212-2221_X_1997_08_27_yyk\_map.eps/VPS"
! Attempting to open device: 'J1212-2221_X_1997_08_27_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.613893 0.613893 1.22779 2.45557 4.91115 9.82229 19.6446 39.2892 78.5783
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0012 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.198 
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.8553 x 2.12 at -4.217 degrees (North through East)
! Clean map  min=-0.0022165  max=0.19855 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1212-2221_X_1997_08_27_yyk\_map.gif/gif"
! Attempting to open device: 'J1212-2221_X_1997_08_27_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1212-2221_X_1997_08_27_yyk_uvs.log closed on Mon Jan  8 05:38:14 2007