! Started logfile: J2146-1525_X_1997_01_10_pus_uvs.log on Sat Jan 28 17:54:40 2006
obs J2146-1525_X_1997_01_10_pus_uva.fits
! Reading UV FITS file: J2146-1525_X_1997_01_10_pus_uva.fits
! AN table 1: 205 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.602927 visibilities/baseline/integration-bin.
! Found source: J2146-1525
! 
! 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        8e+06          1        8e+06
!  02        2  8.23424e+09        8e+06          1        8e+06
!  03        3  8.41424e+09        8e+06          1        8e+06
!  04        4  8.55424e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 493 lines of history.
! 
! Reading 22248 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 456 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 456 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 456 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 455 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.764520Jy  sigma=0.004199
! Fit after  self-cal, rms=0.719142Jy  sigma=0.003969
! 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.7281 mas, bmaj=2.054 mas, bpa=-0.9842 degrees
! Estimated noise=1434.14 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.279893 Jy
! Component: 100  -  total flux cleaned = 0.347856 Jy
! Total flux subtracted in 100 components = 0.347856 Jy
! Clean residual min=-0.019848 max=0.048528 Jy/beam
! Clean residual mean=0.000263 rms=0.006263 Jy/beam
! Combined flux in latest and established models = 0.347856 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 0.347856 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.316006Jy  sigma=0.001266
! Fit after  self-cal, rms=0.315918Jy  sigma=0.001266
! Inverting map 
! Added new window around map position (1, 2.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0402914 Jy
! Component: 100  -  total flux cleaned = 0.0506251 Jy
! Total flux subtracted in 100 components = 0.0506251 Jy
! Clean residual min=-0.016711 max=0.027999 Jy/beam
! Clean residual mean=0.000110 rms=0.005012 Jy/beam
! Combined flux in latest and established models = 0.398482 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 13 components and 0.398482 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.311000Jy  sigma=0.001217
! Fit after  self-cal, rms=0.310618Jy  sigma=0.001212
! 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.9133 mas, bmaj=2.449 mas, bpa=-3.589 degrees
! Estimated noise=811.512 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.011937 Jy
! Component: 100  -  total flux cleaned = 0.0104566 Jy
! Component: 150  -  total flux cleaned = 0.0100566 Jy
! Component: 200  -  total flux cleaned = 0.00974208 Jy
! Total flux subtracted in 200 components = 0.00974208 Jy
! Clean residual min=-0.014706 max=0.020907 Jy/beam
! Clean residual mean=0.000040 rms=0.004727 Jy/beam
! Combined flux in latest and established models = 0.408224 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 20 components and 0.408224 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.309043Jy  sigma=0.001197
! Fit after  self-cal, rms=0.308956Jy  sigma=0.001196
! 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.88     HN        1.26     KP        1.00*    
!   LA        0.94     MK        0.96     NL        1.15     OV        0.90     
!   PT        1.23     SC        0.94     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.93     FD        0.88     HN        1.25     KP        1.00*    
!   LA        0.95     MK        0.93     NL        1.13     OV        0.94     
!   PT        1.23     SC        1.01     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.91     HN        1.33     KP        1.00*    
!   LA        0.96     MK        0.94     NL        1.17     OV        0.88     
!   PT        1.26     SC        1.03     
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.88     HN        1.32     KP        1.00*    
!   LA        0.97     MK        0.93     NL        1.19     OV        0.88     
!   PT        1.28     SC        1.03     
! 
! 
! Fit before self-cal, rms=0.308956Jy  sigma=0.001196
! Fit after  self-cal, rms=0.344686Jy  sigma=0.001140
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.9124 mas, bmaj=2.428 mas, bpa=-3.456 degrees
! Estimated noise=812.503 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.00240817 Jy
! Component: 100  -  total flux cleaned = -0.00291339 Jy
! Component: 150  -  total flux cleaned = -0.0030489 Jy
! Component: 200  -  total flux cleaned = -0.00305249 Jy
! Total flux subtracted in 200 components = -0.00305249 Jy
! Clean residual min=-0.006311 max=0.009098 Jy/beam
! Clean residual mean=0.000177 rms=0.002020 Jy/beam
! Combined flux in latest and established models = 0.405171 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 30 components and 0.405171 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.344600Jy  sigma=0.001138
! Fit after  self-cal, rms=0.345813Jy  sigma=0.001137
! 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.345813Jy  sigma=0.001137
! Fit after  self-cal, rms=0.367022Jy  sigma=0.001129
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9147 mas, bmaj=2.431 mas, bpa=-3.311 degrees
! Estimated noise=814.765 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00027381 Jy
! Component: 100  -  total flux cleaned = 0.000725757 Jy
! Component: 150  -  total flux cleaned = 0.00109021 Jy
! Component: 200  -  total flux cleaned = 0.00140989 Jy
! Total flux subtracted in 200 components = 0.00140989 Jy
! Clean residual min=-0.004453 max=0.005871 Jy/beam
! Clean residual mean=0.000060 rms=0.001323 Jy/beam
! Combined flux in latest and established models = 0.406581 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 39 components and 0.406581 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.366936Jy  sigma=0.001129
! Fit after  self-cal, rms=0.367274Jy  sigma=0.001128
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 (18, -8.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00465607 Jy
! Component: 100  -  total flux cleaned = 0.0065174 Jy
! Component: 150  -  total flux cleaned = 0.00742972 Jy
! Component: 200  -  total flux cleaned = 0.00777517 Jy
! Total flux subtracted in 200 components = 0.00777517 Jy
! Clean residual min=-0.004114 max=0.004496 Jy/beam
! Clean residual mean=0.000044 rms=0.001204 Jy/beam
! Combined flux in latest and established models = 0.414356 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 53 components and 0.414356 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.367134Jy  sigma=0.001127
! Fit after  self-cal, rms=0.367110Jy  sigma=0.001127
! 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.367110Jy  sigma=0.001127
! Fit after  self-cal, rms=0.370531Jy  sigma=0.001127
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.9145 mas, bmaj=2.428 mas, bpa=-3.285 degrees
! Estimated noise=814.691 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000994396 Jy
! Component: 100  -  total flux cleaned = 0.00145657 Jy
! Component: 150  -  total flux cleaned = 0.00169024 Jy
! Component: 200  -  total flux cleaned = 0.00203661 Jy
! Total flux subtracted in 200 components = 0.00203661 Jy
! Clean residual min=-0.003888 max=0.004306 Jy/beam
! Clean residual mean=0.000031 rms=0.001127 Jy/beam
! Combined flux in latest and established models = 0.416393 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 59 components and 0.416393 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.370478Jy  sigma=0.001127
! Fit after  self-cal, rms=0.370501Jy  sigma=0.001127
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.000317715 Jy
! Component: 100  -  total flux cleaned = 0.000715395 Jy
! Component: 150  -  total flux cleaned = 0.00101444 Jy
! Component: 200  -  total flux cleaned = 0.00118192 Jy
! Total flux subtracted in 200 components = 0.00118192 Jy
! Clean residual min=-0.003847 max=0.003983 Jy/beam
! Clean residual mean=0.000027 rms=0.001100 Jy/beam
! Combined flux in latest and established models = 0.417575 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 63 components and 0.417575 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.370470Jy  sigma=0.001127
! Fit after  self-cal, rms=0.370468Jy  sigma=0.001127
! 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.370468Jy  sigma=0.001127
! Fit after  self-cal, rms=0.372425Jy  sigma=0.001126
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.16 mas, bmaj=4.078 mas, bpa=6.869 degrees
! Estimated noise=1039.16 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0015028 Jy
! Component: 100  -  total flux cleaned = 0.00219114 Jy
! Component: 150  -  total flux cleaned = 0.0025743 Jy
! Component: 200  -  total flux cleaned = 0.00266772 Jy
! Total flux subtracted in 200 components = 0.00266772 Jy
! Clean residual min=-0.004772 max=0.006379 Jy/beam
! Clean residual mean=0.000028 rms=0.001501 Jy/beam
! Combined flux in latest and established models = 0.420242 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 71 components and 0.420242 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372405Jy  sigma=0.001126
! Fit after  self-cal, rms=0.372429Jy  sigma=0.001126
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.000127771 Jy
! Component: 100  -  total flux cleaned = 0.00022603 Jy
! Component: 150  -  total flux cleaned = 0.000269549 Jy
! Component: 200  -  total flux cleaned = 0.000350981 Jy
! Total flux subtracted in 200 components = 0.000350981 Jy
! Clean residual min=-0.004624 max=0.006237 Jy/beam
! Clean residual mean=0.000022 rms=0.001469 Jy/beam
! Combined flux in latest and established models = 0.420593 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 75 components and 0.420593 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372419Jy  sigma=0.001126
! Fit after  self-cal, rms=0.372425Jy  sigma=0.001126
! 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.9147 mas, bmaj=2.426 mas, bpa=-3.264 degrees
! Estimated noise=814.874 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9147 x 2.426 at -3.264 degrees (North through East)
! Clean map  min=-0.0034621  max=0.34375 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.7318 mas, bmaj=2.048 mas, bpa=-0.422 degrees
! Estimated noise=1440.38 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.279959 Jy
! Component: 100  -  total flux cleaned = 0.352391 Jy
! Component: 150  -  total flux cleaned = 0.383977 Jy
! Component: 200  -  total flux cleaned = 0.399524 Jy
! Total flux subtracted in 200 components = 0.399524 Jy
! Clean residual min=-0.008226 max=0.007402 Jy/beam
! Clean residual mean=0.000056 rms=0.002081 Jy/beam
! Combined flux in latest and established models = 0.399524 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 14 model components to the UV plane model.
! The established model now contains 14 components and 0.399523 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.9147 mas, bmaj=2.426 mas, bpa=-3.264 degrees
! Estimated noise=814.874 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.00829296 Jy
! Component: 100  -  total flux cleaned = 0.0119408 Jy
! Component: 150  -  total flux cleaned = 0.0146379 Jy
! Component: 200  -  total flux cleaned = 0.0169831 Jy
! Total flux subtracted in 200 components = 0.0169831 Jy
! Clean residual min=-0.004234 max=0.005327 Jy/beam
! Clean residual mean=0.000032 rms=0.001173 Jy/beam
! Combined flux in latest and established models = 0.416507 Jy
! Adding 21 model components to the UV plane model.
! The established model now contains 33 components and 0.416507 Jy
! Inverting map 
! Added new window around map position (2.6, 2.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00306279 Jy
! Component: 100  -  total flux cleaned = 0.0034217 Jy
! Component: 150  -  total flux cleaned = 0.00384845 Jy
! Component: 200  -  total flux cleaned = 0.00433229 Jy
! Total flux subtracted in 200 components = 0.00433229 Jy
! Clean residual min=-0.003841 max=0.003967 Jy/beam
! Clean residual mean=0.000011 rms=0.001037 Jy/beam
! Combined flux in latest and established models = 0.420839 Jy
! Adding 29 model components to the UV plane model.
! The established model now contains 58 components and 0.420839 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.16 mas, bmaj=4.078 mas, bpa=6.869 degrees
! Estimated noise=1039.16 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00254963 Jy
! Component: 100  -  total flux cleaned = 0.00307455 Jy
! Component: 150  -  total flux cleaned = 0.00332764 Jy
! Component: 200  -  total flux cleaned = 0.00349738 Jy
! Total flux subtracted in 200 components = 0.00349738 Jy
! Clean residual min=-0.004093 max=0.004952 Jy/beam
! Clean residual mean=-0.000009 rms=0.001316 Jy/beam
! Combined flux in latest and established models = 0.424336 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.000152383 Jy
! Component: 100  -  total flux cleaned = 0.000151859 Jy
! Component: 150  -  total flux cleaned = 0.00015158 Jy
! Component: 200  -  total flux cleaned = 0.000152162 Jy
! Total flux subtracted in 200 components = 0.000152162 Jy
! Clean residual min=-0.004024 max=0.004867 Jy/beam
! Clean residual mean=-0.000014 rms=0.001287 Jy/beam
! Combined flux in latest and established models = 0.424488 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 86 components and 0.424488 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.9147 mas, bmaj=2.426 mas, bpa=-3.264 degrees
! Estimated noise=814.874 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000591076 Jy
! Component: 100  -  total flux cleaned = -0.000587334 Jy
! Component: 150  -  total flux cleaned = -0.000376425 Jy
! Component: 200  -  total flux cleaned = -0.000118251 Jy
! Total flux subtracted in 200 components = -0.000118251 Jy
! Clean residual min=-0.003675 max=0.003655 Jy/beam
! Clean residual mean=-0.000008 rms=0.000959 Jy/beam
! Combined flux in latest and established models = 0.42437 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 102 components and 0.42437 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372353Jy  sigma=0.001126
! Fit after  self-cal, rms=0.372339Jy  sigma=0.001126
wmodel J2146-1525_X_1997_01_10_pus_map.mod
! Writing 102 model components to file: J2146-1525_X_1997_01_10_pus_map.mod
wobs J2146-1525_X_1997_01_10_pus_uvs.fits
! Writing UV FITS file: J2146-1525_X_1997_01_10_pus_uvs.fits
wwins J2146-1525_X_1997_01_10_pus_map.win
! wwins: Wrote 4 windows to J2146-1525_X_1997_01_10_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 = -5.68266e-05 Jy
! Component: 100  -  total flux cleaned = -0.000740625 Jy
! Component: 150  -  total flux cleaned = -0.00126481 Jy
! Component: 200  -  total flux cleaned = -0.00170755 Jy
! Component: 250  -  total flux cleaned = -0.00192097 Jy
! Component: 300  -  total flux cleaned = -0.00217928 Jy
! Component: 350  -  total flux cleaned = -0.00227887 Jy
! Component: 400  -  total flux cleaned = -0.00227895 Jy
! Component: 450  -  total flux cleaned = -0.00227848 Jy
! Component: 500  -  total flux cleaned = -0.00209448 Jy
! Component: 550  -  total flux cleaned = -0.00178023 Jy
! Component: 600  -  total flux cleaned = -0.00156038 Jy
! Component: 650  -  total flux cleaned = -0.00134469 Jy
! Component: 700  -  total flux cleaned = -0.00109066 Jy
! Component: 750  -  total flux cleaned = -0.00096556 Jy
! Component: 800  -  total flux cleaned = -0.000679395 Jy
! Component: 850  -  total flux cleaned = -0.000478579 Jy
! Component: 900  -  total flux cleaned = -0.000202081 Jy
! Component: 950  -  total flux cleaned = 0.000107977 Jy
! Component: 1000  -  total flux cleaned = 0.00022286 Jy
! Component: 1050  -  total flux cleaned = 0.000599294 Jy
! Component: 1100  -  total flux cleaned = 0.00067343 Jy
! Component: 1150  -  total flux cleaned = 0.000820399 Jy
! Component: 1200  -  total flux cleaned = 0.00103647 Jy
! Component: 1250  -  total flux cleaned = 0.0012138 Jy
! Component: 1300  -  total flux cleaned = 0.00142263 Jy
! Component: 1350  -  total flux cleaned = 0.00149084 Jy
! Component: 1400  -  total flux cleaned = 0.0016947 Jy
! Component: 1450  -  total flux cleaned = 0.00179536 Jy
! Component: 1500  -  total flux cleaned = 0.00186233 Jy
! Component: 1550  -  total flux cleaned = 0.00205917 Jy
! Component: 1600  -  total flux cleaned = 0.00215639 Jy
! Component: 1650  -  total flux cleaned = 0.00215708 Jy
! Component: 1700  -  total flux cleaned = 0.00231527 Jy
! Component: 1750  -  total flux cleaned = 0.00240871 Jy
! Component: 1800  -  total flux cleaned = 0.00237762 Jy
! Component: 1850  -  total flux cleaned = 0.00234728 Jy
! Component: 1900  -  total flux cleaned = 0.0024079 Jy
! Component: 1950  -  total flux cleaned = 0.00240774 Jy
! Component: 2000  -  total flux cleaned = 0.00243742 Jy
! Total flux subtracted in 2048 components = 0.00252529 Jy
! Clean residual min=-0.001597 max=0.001674 Jy/beam
! Clean residual mean=0.000008 rms=0.000558 Jy/beam
! Combined flux in latest and established models = 0.426895 Jy
keep
! Adding 136 model components to the UV plane model.
! The established model now contains 238 components and 0.426895 Jy
wmap "J2146-1525_X_1997_01_10_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9147 x 2.426 at -3.264 degrees (North through East)
! Clean map  min=-0.0033151  max=0.34594 Jy/beam
! Writing clean map to FITS file: J2146-1525_X_1997_01_10_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.345935 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000550015 
device "J2146-1525_X_1997_01_10_pus\_map.eps/VPS"
! Attempting to open device: 'J2146-1525_X_1997_01_10_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.476981 0.476981 0.953963 1.90793 3.81585 7.6317 15.2634 30.5268 61.0536
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0016 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.345 
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.9147 x 2.426 at -3.264 degrees (North through East)
! Clean map  min=-0.0033151  max=0.34594 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2146-1525_X_1997_01_10_pus\_map.gif/vgif"
! Attempting to open device: 'J2146-1525_X_1997_01_10_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2146-1525_X_1997_01_10_pus_uvs.log closed on Sat Jan 28 17:55:37 2006