! Started logfile: J2354-1513_X_1997_01_11_pus_uvs.log on Tue Feb 14 15:48:20 2006
obs J2354-1513_X_1997_01_11_pus_uva.fits
! Reading UV FITS file: J2354-1513_X_1997_01_11_pus_uva.fits
! AN table 1: 270 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.600165 visibilities/baseline/integration-bin.
! Found source: J2354-1513
! 
! 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.15049e+09        4e+06          1        4e+06
!  02        2  8.23236e+09        4e+06          1        4e+06
!  03        3  8.41236e+09        4e+06          1        4e+06
!  04        4  8.55236e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 465 lines of history.
! 
! Reading 29168 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
float field_size
field_size = 512
float field_cell
field_cell = 0.2
float taper_size
taper_size = 70.
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
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.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 610 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 610 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 610 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 610 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.677176Jy  sigma=0.004798
! Fit after  self-cal, rms=0.615345Jy  sigma=0.004356
! clrmod: Cleared the established, tentative and continuum models.
! Redundant starting model cleared.
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.7629 mas, bmaj=1.841 mas, bpa=0.4655 degrees
! Estimated noise=843.474 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.324027 Jy
! Component: 100  -  total flux cleaned = 0.412534 Jy
! Total flux subtracted in 100 components = 0.412534 Jy
! Clean residual min=-0.012245 max=0.034997 Jy/beam
! Clean residual mean=-0.000067 rms=0.004275 Jy/beam
! Combined flux in latest and established models = 0.412534 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.412534 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237497Jy  sigma=0.001639
! Fit after  self-cal, rms=0.237408Jy  sigma=0.001638
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0356325 Jy
! Component: 100  -  total flux cleaned = 0.0513199 Jy
! Total flux subtracted in 100 components = 0.0513199 Jy
! Clean residual min=-0.009818 max=0.014299 Jy/beam
! Clean residual mean=-0.000099 rms=0.002784 Jy/beam
! Combined flux in latest and established models = 0.463854 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 13 components and 0.463854 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232513Jy  sigma=0.001592
! Fit after  self-cal, rms=0.232463Jy  sigma=0.001592
! Inverting map 
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! 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.9808 mas, bmaj=2.26 mas, bpa=-0.9483 degrees
! Estimated noise=581.329 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00857125 Jy
! Component: 100  -  total flux cleaned = 0.0122236 Jy
! Component: 150  -  total flux cleaned = 0.013727 Jy
! Component: 200  -  total flux cleaned = 0.0138819 Jy
! Total flux subtracted in 200 components = 0.0138819 Jy
! Clean residual min=-0.009234 max=0.010428 Jy/beam
! Clean residual mean=-0.000311 rms=0.002380 Jy/beam
! Combined flux in latest and established models = 0.477736 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 24 components and 0.477736 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232331Jy  sigma=0.001589
! Fit after  self-cal, rms=0.232320Jy  sigma=0.001589
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.96     HN        1.00*    KP        0.96     
!   LA        0.99     MK        0.98     NL        1.11     OV        0.95     
!   PT        1.11     SC        0.92     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.94     HN        1.00*    KP        0.97     
!   LA        0.98     MK        0.97     NL        1.11     OV        0.96     
!   PT        1.11     SC        1.00     
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     HN        1.00*    KP        0.96     
!   LA        1.00     MK        1.00     NL        1.11     OV        0.93     
!   PT        1.09     SC        1.02     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.97     HN        1.00*    KP        0.97     
!   LA        1.02     MK        0.99     NL        1.16     OV        0.93     
!   PT        1.13     SC        1.11     
! 
! 
! Fit before self-cal, rms=0.232320Jy  sigma=0.001589
! Fit after  self-cal, rms=0.237010Jy  sigma=0.001568
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9814 mas, bmaj=2.261 mas, bpa=-0.9376 degrees
! Estimated noise=580.188 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00149833 Jy
! Component: 100  -  total flux cleaned = 0.00169837 Jy
! Component: 150  -  total flux cleaned = 0.00180844 Jy
! Component: 200  -  total flux cleaned = 0.00185898 Jy
! Total flux subtracted in 200 components = 0.00185898 Jy
! Clean residual min=-0.004301 max=0.006065 Jy/beam
! Clean residual mean=-0.000010 rms=0.001280 Jy/beam
! Combined flux in latest and established models = 0.479595 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 27 components and 0.479594 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.236971Jy  sigma=0.001568
! Fit after  self-cal, rms=0.237340Jy  sigma=0.001568
! Inverting map 
selfcal true, true, soltime1
! Performing amp+phase self-cal over 120 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237340Jy  sigma=0.001568
! Fit after  self-cal, rms=0.238555Jy  sigma=0.001564
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9798 mas, bmaj=2.262 mas, bpa=-0.8385 degrees
! Estimated noise=580.749 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000305189 Jy
! Component: 100  -  total flux cleaned = 0.000339311 Jy
! Component: 150  -  total flux cleaned = 0.000363786 Jy
! Component: 200  -  total flux cleaned = 0.000364002 Jy
! Total flux subtracted in 200 components = 0.000364002 Jy
! Clean residual min=-0.003866 max=0.005116 Jy/beam
! Clean residual mean=0.000031 rms=0.001040 Jy/beam
! Combined flux in latest and established models = 0.479959 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 31 components and 0.479959 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238548Jy  sigma=0.001564
! Fit after  self-cal, rms=0.238605Jy  sigma=0.001564
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
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-3.6, 6.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00515949 Jy
! Component: 100  -  total flux cleaned = 0.00812617 Jy
! Component: 150  -  total flux cleaned = 0.00933488 Jy
! Component: 200  -  total flux cleaned = 0.00970613 Jy
! Total flux subtracted in 200 components = 0.00970613 Jy
! Clean residual min=-0.003449 max=0.003438 Jy/beam
! Clean residual mean=0.000015 rms=0.000857 Jy/beam
! Combined flux in latest and established models = 0.489665 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 55 components and 0.489665 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238496Jy  sigma=0.001563
! Fit after  self-cal, rms=0.238482Jy  sigma=0.001563
! Inverting map 
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238482Jy  sigma=0.001563
! Fit after  self-cal, rms=0.238834Jy  sigma=0.001563
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.979 mas, bmaj=2.262 mas, bpa=-0.816 degrees
! Estimated noise=580.526 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0021553 Jy
! Component: 100  -  total flux cleaned = 0.00274761 Jy
! Component: 150  -  total flux cleaned = 0.00304484 Jy
! Component: 200  -  total flux cleaned = 0.003223 Jy
! Total flux subtracted in 200 components = 0.003223 Jy
! Clean residual min=-0.003338 max=0.003453 Jy/beam
! Clean residual mean=0.000001 rms=0.000819 Jy/beam
! Combined flux in latest and established models = 0.492888 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 65 components and 0.492888 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238811Jy  sigma=0.001563
! Fit after  self-cal, rms=0.238820Jy  sigma=0.001563
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
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (23, 9.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00172389 Jy
! Component: 100  -  total flux cleaned = 0.00150123 Jy
! Component: 150  -  total flux cleaned = 0.00168883 Jy
! Component: 200  -  total flux cleaned = 0.00179524 Jy
! Total flux subtracted in 200 components = 0.00179524 Jy
! Clean residual min=-0.003219 max=0.002821 Jy/beam
! Clean residual mean=-0.000008 rms=0.000776 Jy/beam
! Combined flux in latest and established models = 0.494683 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 77 components and 0.494683 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238770Jy  sigma=0.001562
! Fit after  self-cal, rms=0.238765Jy  sigma=0.001562
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
win_mult = win_mult * 1.2
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238765Jy  sigma=0.001562
! Fit after  self-cal, rms=0.239007Jy  sigma=0.001562
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.429 mas, bmaj=4.166 mas, bpa=5.816 degrees
! Estimated noise=723.362 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00148041 Jy
! Component: 100  -  total flux cleaned = 0.00177097 Jy
! Component: 150  -  total flux cleaned = 0.00208117 Jy
! Component: 200  -  total flux cleaned = 0.00228635 Jy
! Total flux subtracted in 200 components = 0.00228635 Jy
! Clean residual min=-0.003888 max=0.002423 Jy/beam
! Clean residual mean=-0.000036 rms=0.000881 Jy/beam
! Combined flux in latest and established models = 0.496969 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 92 components and 0.496969 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.239000Jy  sigma=0.001562
! Fit after  self-cal, rms=0.238998Jy  sigma=0.001562
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
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000453633 Jy
! Component: 100  -  total flux cleaned = 0.000549952 Jy
! Component: 150  -  total flux cleaned = 0.000579471 Jy
! Component: 200  -  total flux cleaned = 0.000634062 Jy
! Total flux subtracted in 200 components = 0.000634062 Jy
! Clean residual min=-0.003795 max=0.002438 Jy/beam
! Clean residual mean=-0.000039 rms=0.000869 Jy/beam
! Combined flux in latest and established models = 0.497603 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 105 components and 0.497603 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238996Jy  sigma=0.001562
! Fit after  self-cal, rms=0.238994Jy  sigma=0.001562
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
win_mult = win_mult / 1.2
print "************** FINISHED AMPLITUDE SELF-CAL **************"
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
restore
! Inverting map and beam 
! Estimated beam: bmin=0.9789 mas, bmaj=2.262 mas, bpa=-0.8242 degrees
! Estimated noise=580.653 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9789 x 2.262 at -0.8242 degrees (North through East)
! Clean map  min=-0.0029577  max=0.42632 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true
  clean clean_niter,clean_gain
  selfcal
  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
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true
  end if
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative 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.7647 mas, bmaj=1.849 mas, bpa=0.6767 degrees
! Estimated noise=844.428 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.323404 Jy
! Component: 100  -  total flux cleaned = 0.413578 Jy
! Component: 150  -  total flux cleaned = 0.448985 Jy
! Component: 200  -  total flux cleaned = 0.463576 Jy
! Total flux subtracted in 200 components = 0.463576 Jy
! Clean residual min=-0.005684 max=0.006942 Jy/beam
! Clean residual mean=-0.000064 rms=0.001683 Jy/beam
! Combined flux in latest and established models = 0.463576 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 13 model components to the UV plane model.
! The established model now contains 13 components and 0.463576 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9789 mas, bmaj=2.262 mas, bpa=-0.8242 degrees
! Estimated noise=580.653 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.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0097015 Jy
! Component: 100  -  total flux cleaned = 0.015861 Jy
! Component: 150  -  total flux cleaned = 0.0205667 Jy
! Component: 200  -  total flux cleaned = 0.0242206 Jy
! Total flux subtracted in 200 components = 0.0242206 Jy
! Clean residual min=-0.003417 max=0.004186 Jy/beam
! Clean residual mean=0.000005 rms=0.000919 Jy/beam
! Combined flux in latest and established models = 0.487797 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 40 components and 0.487797 Jy
! Inverting map 
! Added new window around map position (-1.4, 3.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00344307 Jy
! Component: 100  -  total flux cleaned = 0.00491996 Jy
! Component: 150  -  total flux cleaned = 0.00591743 Jy
! Component: 200  -  total flux cleaned = 0.00680102 Jy
! Total flux subtracted in 200 components = 0.00680102 Jy
! Clean residual min=-0.003198 max=0.003074 Jy/beam
! Clean residual mean=-0.000010 rms=0.000792 Jy/beam
! Combined flux in latest and established models = 0.494598 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 62 components and 0.494598 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.429 mas, bmaj=4.166 mas, bpa=5.816 degrees
! Estimated noise=723.362 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0013124 Jy
! Component: 100  -  total flux cleaned = 0.00194861 Jy
! Component: 150  -  total flux cleaned = 0.00222971 Jy
! Component: 200  -  total flux cleaned = 0.00247052 Jy
! Total flux subtracted in 200 components = 0.00247052 Jy
! Clean residual min=-0.003732 max=0.002537 Jy/beam
! Clean residual mean=-0.000034 rms=0.000885 Jy/beam
! Combined flux in latest and established models = 0.497068 Jy
flux_cutoff = imstat(rms) * dynam
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.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000180519 Jy
! Component: 100  -  total flux cleaned = 0.000246017 Jy
! Component: 150  -  total flux cleaned = 0.000307267 Jy
! Component: 200  -  total flux cleaned = 0.000364471 Jy
! Total flux subtracted in 200 components = 0.000364471 Jy
! Clean residual min=-0.003701 max=0.002433 Jy/beam
! Clean residual mean=-0.000037 rms=0.000867 Jy/beam
! Combined flux in latest and established models = 0.497433 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 113 components and 0.497433 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9789 mas, bmaj=2.262 mas, bpa=-0.8242 degrees
! Estimated noise=580.653 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000395793 Jy
! Component: 100  -  total flux cleaned = 0.000280148 Jy
! Component: 150  -  total flux cleaned = 0.000173436 Jy
! Component: 200  -  total flux cleaned = 0.000173458 Jy
! Total flux subtracted in 200 components = 0.000173458 Jy
! Clean residual min=-0.003025 max=0.002727 Jy/beam
! Clean residual mean=-0.000020 rms=0.000732 Jy/beam
! Combined flux in latest and established models = 0.497606 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 125 components and 0.497606 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238967Jy  sigma=0.001562
! Fit after  self-cal, rms=0.238956Jy  sigma=0.001562
wmodel J2354-1513_X_1997_01_11_pus_map.mod
! Writing 125 model components to file: J2354-1513_X_1997_01_11_pus_map.mod
wobs J2354-1513_X_1997_01_11_pus_uvs.fits
! Writing UV FITS file: J2354-1513_X_1997_01_11_pus_uvs.fits
wwins J2354-1513_X_1997_01_11_pus_map.win
! wwins: Wrote 4 windows to J2354-1513_X_1997_01_11_pus_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.000235263 Jy
! Component: 100  -  total flux cleaned = -0.000414941 Jy
! Component: 150  -  total flux cleaned = -0.000587599 Jy
! Component: 200  -  total flux cleaned = -0.000628963 Jy
! Component: 250  -  total flux cleaned = -0.000752062 Jy
! Component: 300  -  total flux cleaned = -0.000751546 Jy
! Component: 350  -  total flux cleaned = -0.000750863 Jy
! Component: 400  -  total flux cleaned = -0.000748678 Jy
! Component: 450  -  total flux cleaned = -0.000598227 Jy
! Component: 500  -  total flux cleaned = -0.000488901 Jy
! Component: 550  -  total flux cleaned = -0.000417544 Jy
! Component: 600  -  total flux cleaned = -0.000453152 Jy
! Component: 650  -  total flux cleaned = -0.000384091 Jy
! Component: 700  -  total flux cleaned = -0.000452439 Jy
! Component: 750  -  total flux cleaned = -0.00041855 Jy
! Component: 800  -  total flux cleaned = -0.000451489 Jy
! Component: 850  -  total flux cleaned = -0.000353675 Jy
! Component: 900  -  total flux cleaned = -0.000353404 Jy
! Component: 950  -  total flux cleaned = -0.000321574 Jy
! Component: 1000  -  total flux cleaned = -0.000228335 Jy
! Component: 1050  -  total flux cleaned = -0.000259165 Jy
! Component: 1100  -  total flux cleaned = -0.000199264 Jy
! Component: 1150  -  total flux cleaned = -0.000259049 Jy
! Component: 1200  -  total flux cleaned = -0.000229693 Jy
! Component: 1250  -  total flux cleaned = -0.000229688 Jy
! Component: 1300  -  total flux cleaned = -0.000201094 Jy
! Component: 1350  -  total flux cleaned = -0.000144562 Jy
! Component: 1400  -  total flux cleaned = -8.86724e-05 Jy
! Component: 1450  -  total flux cleaned = -8.8166e-05 Jy
! Component: 1500  -  total flux cleaned = 4.86286e-05 Jy
! Component: 1550  -  total flux cleaned = -5.3955e-06 Jy
! Component: 1600  -  total flux cleaned = 2.16657e-05 Jy
! Component: 1650  -  total flux cleaned = 7.50667e-05 Jy
! Component: 1700  -  total flux cleaned = 0.000153657 Jy
! Component: 1750  -  total flux cleaned = 0.0001795 Jy
! Component: 1800  -  total flux cleaned = 0.000231079 Jy
! Component: 1850  -  total flux cleaned = 0.000332693 Jy
! Component: 1900  -  total flux cleaned = 0.00038303 Jy
! Component: 1950  -  total flux cleaned = 0.000433193 Jy
! Component: 2000  -  total flux cleaned = 0.000556205 Jy
! Total flux subtracted in 2048 components = 0.000580456 Jy
! Clean residual min=-0.001312 max=0.001247 Jy/beam
! Clean residual mean=0.000005 rms=0.000472 Jy/beam
! Combined flux in latest and established models = 0.498187 Jy
keep
! Adding 140 model components to the UV plane model.
! The established model now contains 265 components and 0.498187 Jy
wmap "J2354-1513_X_1997_01_11_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9789 x 2.262 at -0.8242 degrees (North through East)
! Clean map  min=-0.0021427  max=0.42691 Jy/beam
! Writing clean map to FITS file: J2354-1513_X_1997_01_11_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.426915 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000471157 
device "J2354-1513_X_1997_01_11_pus\_map.eps/VPS"
! Attempting to open device: 'J2354-1513_X_1997_01_11_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.33109 0.33109 0.662179 1.32436 2.64872 5.29743 10.5949 21.1897 42.3795 84.7589
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.426 
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.9789 x 2.262 at -0.8242 degrees (North through East)
! Clean map  min=-0.0021427  max=0.42691 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2354-1513_X_1997_01_11_pus\_map.gif/vgif"
! Attempting to open device: 'J2354-1513_X_1997_01_11_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2354-1513_X_1997_01_11_pus_uvs.log closed on Tue Feb 14 15:49:18 2006