! Started logfile: J1432+3618_S_2000_05_22_pus_uvs.log on Tue Nov 27 12:25:47 2007
obs J1432+3618_S_2000_05_22_pus_uva.fits
! Reading UV FITS file: J1432+3618_S_2000_05_22_pus_uva.fits
! AN table 1: 288 integrations on 190 of 190 possible baselines.
! AN table 2: 171 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.186252 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1432+3618
! 
! 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  2.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2003 lines of history.
! 
! Reading 64972 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
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J1432+3618_S_2000_05_22_pus]
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.500x0.500 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 3783 telescope corrections were flagged in sub-array 1.
!  A total of 1838 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 3755 telescope corrections were flagged in sub-array 1.
!  A total of 1838 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 3908 telescope corrections were flagged in sub-array 1.
!  A total of 1838 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 3857 telescope corrections were flagged in sub-array 1.
!  A total of 1838 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.990005Jy  sigma=0.013065
! Fit after  self-cal, rms=0.935807Jy  sigma=0.012529
! 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=1.732 mas, bmaj=4.276 mas, bpa=-2.301 degrees
! Estimated noise=515.388 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.0591394 Jy
! Component: 100  -  total flux cleaned = 0.0720458 Jy
! Total flux subtracted in 100 components = 0.0720458 Jy
! Clean residual min=-0.003701 max=0.004408 Jy/beam
! Clean residual mean=0.000016 rms=0.000993 Jy/beam
! Combined flux in latest and established models = 0.0720458 Jy
! Performing phase self-cal
! Adding 3 model components to the UV plane model.
! The established model now contains 3 components and 0.0720458 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.172959Jy  sigma=0.001534
! Fit after  self-cal, rms=0.172375Jy  sigma=0.001528
! 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=2.469 mas, bmaj=5.11 mas, bpa=-2.325 degrees
! Estimated noise=220.245 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.00559478 Jy
! Component: 100  -  total flux cleaned = 0.00771214 Jy
! Component: 150  -  total flux cleaned = 0.00876426 Jy
! Component: 200  -  total flux cleaned = 0.00932647 Jy
! Total flux subtracted in 200 components = 0.00932647 Jy
! Clean residual min=-0.002130 max=0.002359 Jy/beam
! Clean residual mean=0.000050 rms=0.000528 Jy/beam
! Combined flux in latest and established models = 0.0813722 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 26 components and 0.0813722 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.172099Jy  sigma=0.001526
! Fit after  self-cal, rms=0.172064Jy  sigma=0.001526
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.07     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.00*    KP        0.78     
!   MA        1.00*    MC        1.00*    MK        1.03     NL        1.02     
!   NY        1.00*    OV        1.06     PT        1.03     SC        0.98     
!   TS        1.00     WF        1.00*    WZ        1.00*    LA        1.04     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.94     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.00*    KP        0.92     
!   MA        1.00*    MC        1.03     MK        1.00*    NL        0.94     
!   NY        1.00*    OV        0.98     PT        0.97     SC        0.99     
!   TS        1.00*    WF        1.00*    WZ        1.00*    LA        1.02     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.10     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        0.95     
!   MA        1.00*    MC        1.00*    MK        0.97     NL        1.01     
!   NY        1.00*    OV        1.01     PT        1.02     SC        1.34     
!   TS        1.07     WF        1.00*    WZ        1.00*    LA        0.97     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.01     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.00*    KP        1.01     
!   MA        1.00*    MC        1.08     MK        1.00*    NL        1.06     
!   NY        1.00*    OV        0.95     PT        0.93     SC        1.02     
!   TS        1.00*    WF        1.00*    WZ        1.00*    LA        0.91     
! 
! 
! Correcting IF 3.
!  A total of 39 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.02     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        1.02     
!   MA        1.00*    MC        1.00*    MK        1.02     NL        0.98     
!   NY        1.00*    OV        1.08     PT        0.95     SC        0.98     
!   TS        1.12     WF        1.00*    WZ        1.00*    LA        1.02     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.86     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.05     KK        1.00*    KP        0.98     
!   MA        1.00*    MC        0.61     MK        1.00*    NL        0.94     
!   NY        1.00*    OV        0.97     PT        0.94     SC        0.95     
!   TS        1.00*    WF        1.00*    WZ        1.00*    LA        1.01     
! 
! 
! Correcting IF 4.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        1.03     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.45     KK        1.00*    KP        0.99     
!   MA        1.00*    MC        1.00*    MK        1.06     NL        1.01     
!   NY        1.00*    OV        1.01     PT        0.91     SC        0.95     
!   TS        1.15     WF        1.00*    WZ        1.00*    LA        1.02     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.07     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.00*    KP        0.95     
!   MA        1.00*    MC        0.56     MK        1.00*    NL        0.95     
!   NY        1.00*    OV        0.94     PT        0.96     SC        1.02     
!   TS        1.00*    WF        1.00*    WZ        1.00*    LA        0.96     
! 
! 
! Fit before self-cal, rms=0.172064Jy  sigma=0.001526
! Fit after  self-cal, rms=0.165463Jy  sigma=0.001521
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.511 mas, bmaj=5.122 mas, bpa=-2.179 degrees
! Estimated noise=220.597 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 = 2.98621e-05 Jy
! Component: 100  -  total flux cleaned = 4.38092e-05 Jy
! Component: 150  -  total flux cleaned = 5.51653e-05 Jy
! Component: 200  -  total flux cleaned = 6.49982e-05 Jy
! Total flux subtracted in 200 components = 6.49982e-05 Jy
! Clean residual min=-0.001154 max=0.001318 Jy/beam
! Clean residual mean=0.000018 rms=0.000350 Jy/beam
! Combined flux in latest and established models = 0.0814372 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 32 components and 0.0814372 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.165460Jy  sigma=0.001521
! Fit after  self-cal, rms=0.165655Jy  sigma=0.001519
! 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.165655Jy  sigma=0.001519
! Fit after  self-cal, rms=0.168766Jy  sigma=0.001519
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.501 mas, bmaj=5.128 mas, bpa=-2.039 degrees
! Estimated noise=221.705 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000284916 Jy
! Component: 100  -  total flux cleaned = 0.000306259 Jy
! Component: 150  -  total flux cleaned = 0.000314855 Jy
! Component: 200  -  total flux cleaned = 0.000321401 Jy
! Total flux subtracted in 200 components = 0.000321401 Jy
! Clean residual min=-0.001170 max=0.001290 Jy/beam
! Clean residual mean=0.000015 rms=0.000350 Jy/beam
! Combined flux in latest and established models = 0.0817586 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 35 components and 0.0817586 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.168762Jy  sigma=0.001519
! Fit after  self-cal, rms=0.168898Jy  sigma=0.001518
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.000229 Jy
! Component: 100  -  total flux cleaned = -0.000219865 Jy
! Component: 150  -  total flux cleaned = -0.000204765 Jy
! Component: 200  -  total flux cleaned = -0.000198837 Jy
! Total flux subtracted in 200 components = -0.000198837 Jy
! Clean residual min=-0.001178 max=0.001319 Jy/beam
! Clean residual mean=0.000013 rms=0.000348 Jy/beam
! Combined flux in latest and established models = 0.0815598 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 40 components and 0.0815598 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.168899Jy  sigma=0.001518
! Fit after  self-cal, rms=0.168895Jy  sigma=0.001518
! 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.168895Jy  sigma=0.001518
! Fit after  self-cal, rms=0.170465Jy  sigma=0.001518
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.499 mas, bmaj=5.129 mas, bpa=-1.972 degrees
! Estimated noise=222.855 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000363145 Jy
! Component: 100  -  total flux cleaned = 0.000394007 Jy
! Component: 150  -  total flux cleaned = 0.00041205 Jy
! Component: 200  -  total flux cleaned = 0.000411618 Jy
! Total flux subtracted in 200 components = 0.000411618 Jy
! Clean residual min=-0.001193 max=0.001280 Jy/beam
! Clean residual mean=0.000017 rms=0.000348 Jy/beam
! Combined flux in latest and established models = 0.0819714 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 48 components and 0.0819714 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.170461Jy  sigma=0.001518
! Fit after  self-cal, rms=0.170539Jy  sigma=0.001518
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.000152182 Jy
! Component: 100  -  total flux cleaned = -0.000141798 Jy
! Component: 150  -  total flux cleaned = -0.000137518 Jy
! Component: 200  -  total flux cleaned = -0.000137264 Jy
! Total flux subtracted in 200 components = -0.000137264 Jy
! Clean residual min=-0.001154 max=0.001274 Jy/beam
! Clean residual mean=0.000014 rms=0.000345 Jy/beam
! Combined flux in latest and established models = 0.0818341 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 48 components and 0.0818341 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.170539Jy  sigma=0.001518
! Fit after  self-cal, rms=0.170550Jy  sigma=0.001518
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 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.170550Jy  sigma=0.001518
! Fit after  self-cal, rms=0.171923Jy  sigma=0.001518
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.642 mas, bmaj=9.567 mas, bpa=-47.17 degrees
! Estimated noise=299.273 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000505531 Jy
! Component: 100  -  total flux cleaned = 0.00056152 Jy
! Component: 150  -  total flux cleaned = 0.000575251 Jy
! Component: 200  -  total flux cleaned = 0.000581284 Jy
! Total flux subtracted in 200 components = 0.000581284 Jy
! Clean residual min=-0.001179 max=0.001381 Jy/beam
! Clean residual mean=0.000033 rms=0.000427 Jy/beam
! Combined flux in latest and established models = 0.0824154 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 51 components and 0.0824154 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.171919Jy  sigma=0.001518
! Fit after  self-cal, rms=0.171964Jy  sigma=0.001518
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 = 1.58342e-05 Jy
! Component: 100  -  total flux cleaned = 1.53225e-05 Jy
! Component: 150  -  total flux cleaned = 1.51655e-05 Jy
! Component: 200  -  total flux cleaned = 1.5138e-05 Jy
! Total flux subtracted in 200 components = 1.5138e-05 Jy
! Clean residual min=-0.001209 max=0.001380 Jy/beam
! Clean residual mean=0.000030 rms=0.000423 Jy/beam
! Combined flux in latest and established models = 0.0824305 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 53 components and 0.0824305 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.171964Jy  sigma=0.001518
! Fit after  self-cal, rms=0.171965Jy  sigma=0.001518
! 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=2.498 mas, bmaj=5.128 mas, bpa=-1.941 degrees
! Estimated noise=223.932 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.498 x 5.128 at -1.941 degrees (North through East)
! Clean map  min=-0.0011638  max=0.078886 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=1.743 mas, bmaj=4.259 mas, bpa=-1.679 degrees
! Estimated noise=526.731 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0610966 Jy
! Component: 100  -  total flux cleaned = 0.0744217 Jy
! Component: 150  -  total flux cleaned = 0.077976 Jy
! Component: 200  -  total flux cleaned = 0.079831 Jy
! Total flux subtracted in 200 components = 0.079831 Jy
! Clean residual min=-0.002625 max=0.002838 Jy/beam
! Clean residual mean=0.000010 rms=0.000711 Jy/beam
! Combined flux in latest and established models = 0.0798311 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.0798311 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.498 mas, bmaj=5.128 mas, bpa=-1.941 degrees
! Estimated noise=223.932 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.00148372 Jy
! Component: 100  -  total flux cleaned = 0.00210664 Jy
! Component: 150  -  total flux cleaned = 0.00230352 Jy
! Component: 200  -  total flux cleaned = 0.00234643 Jy
! Total flux subtracted in 200 components = 0.00234643 Jy
! Clean residual min=-0.001226 max=0.001273 Jy/beam
! Clean residual mean=0.000014 rms=0.000348 Jy/beam
! Combined flux in latest and established models = 0.0821775 Jy
! Adding 12 model components to the UV plane model.
! The established model now contains 25 components and 0.0821775 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.642 mas, bmaj=9.567 mas, bpa=-47.17 degrees
! Estimated noise=299.273 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000333703 Jy
! Component: 100  -  total flux cleaned = 0.000325445 Jy
! Component: 150  -  total flux cleaned = 0.000317975 Jy
! Component: 200  -  total flux cleaned = 0.000318153 Jy
! Total flux subtracted in 200 components = 0.000318153 Jy
! Clean residual min=-0.001218 max=0.001381 Jy/beam
! Clean residual mean=0.000029 rms=0.000425 Jy/beam
! Combined flux in latest and established models = 0.0824957 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 = -6.57677e-06 Jy
! Component: 100  -  total flux cleaned = -6.46986e-06 Jy
! Component: 150  -  total flux cleaned = -1.22712e-05 Jy
! Component: 200  -  total flux cleaned = -1.2422e-05 Jy
! Total flux subtracted in 200 components = -1.2422e-05 Jy
! Clean residual min=-0.001223 max=0.001376 Jy/beam
! Clean residual mean=0.000029 rms=0.000424 Jy/beam
! Combined flux in latest and established models = 0.0824832 Jy
! Adding 5 model components to the UV plane model.
! The established model now contains 28 components and 0.0824832 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.498 mas, bmaj=5.128 mas, bpa=-1.941 degrees
! Estimated noise=223.932 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000163657 Jy
! Component: 100  -  total flux cleaned = -0.000121812 Jy
! Component: 150  -  total flux cleaned = -0.000104705 Jy
! Component: 200  -  total flux cleaned = -0.000111333 Jy
! Total flux subtracted in 200 components = -0.000111333 Jy
! Clean residual min=-0.001224 max=0.001279 Jy/beam
! Clean residual mean=0.000013 rms=0.000347 Jy/beam
! Combined flux in latest and established models = 0.0823719 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 34 components and 0.0823719 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.171964Jy  sigma=0.001518
! Fit after  self-cal, rms=0.171974Jy  sigma=0.001518
wmodel J1432+3618_S_2000_05_22_pus_map.mod
! Writing 34 model components to file: J1432+3618_S_2000_05_22_pus_map.mod
wobs J1432+3618_S_2000_05_22_pus_uvs.fits
! Writing UV FITS file: J1432+3618_S_2000_05_22_pus_uvs.fits
wwins J1432+3618_S_2000_05_22_pus_map.win
! wwins: Wrote 1 windows to J1432+3618_S_2000_05_22_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.000472318 Jy
! Component: 100  -  total flux cleaned = 0.000802736 Jy
! Component: 150  -  total flux cleaned = 0.000929568 Jy
! Component: 200  -  total flux cleaned = 0.00105105 Jy
! Component: 250  -  total flux cleaned = 0.00110986 Jy
! Component: 300  -  total flux cleaned = 0.00122375 Jy
! Component: 350  -  total flux cleaned = 0.00131566 Jy
! Component: 400  -  total flux cleaned = 0.00136922 Jy
! Component: 450  -  total flux cleaned = 0.00143944 Jy
! Component: 500  -  total flux cleaned = 0.00154254 Jy
! Component: 550  -  total flux cleaned = 0.00164364 Jy
! Component: 600  -  total flux cleaned = 0.00170951 Jy
! Component: 650  -  total flux cleaned = 0.00175798 Jy
! Component: 700  -  total flux cleaned = 0.00179 Jy
! Component: 750  -  total flux cleaned = 0.00188389 Jy
! Component: 800  -  total flux cleaned = 0.0019911 Jy
! Component: 850  -  total flux cleaned = 0.00206662 Jy
! Component: 900  -  total flux cleaned = 0.00212604 Jy
! Component: 950  -  total flux cleaned = 0.00217008 Jy
! Component: 1000  -  total flux cleaned = 0.00221337 Jy
! Component: 1050  -  total flux cleaned = 0.00222732 Jy
! Component: 1100  -  total flux cleaned = 0.0022554 Jy
! Component: 1150  -  total flux cleaned = 0.00228294 Jy
! Component: 1200  -  total flux cleaned = 0.00228284 Jy
! Component: 1250  -  total flux cleaned = 0.00229647 Jy
! Component: 1300  -  total flux cleaned = 0.00233645 Jy
! Component: 1350  -  total flux cleaned = 0.00234941 Jy
! Component: 1400  -  total flux cleaned = 0.00234941 Jy
! Component: 1450  -  total flux cleaned = 0.00233652 Jy
! Component: 1500  -  total flux cleaned = 0.00238753 Jy
! Component: 1550  -  total flux cleaned = 0.00237488 Jy
! Component: 1600  -  total flux cleaned = 0.00237502 Jy
! Component: 1650  -  total flux cleaned = 0.00243666 Jy
! Component: 1700  -  total flux cleaned = 0.0024244 Jy
! Component: 1750  -  total flux cleaned = 0.00243648 Jy
! Component: 1800  -  total flux cleaned = 0.00243638 Jy
! Component: 1850  -  total flux cleaned = 0.00246031 Jy
! Component: 1900  -  total flux cleaned = 0.00247215 Jy
! Component: 1950  -  total flux cleaned = 0.00249552 Jy
! Component: 2000  -  total flux cleaned = 0.00248388 Jy
! Total flux subtracted in 2048 components = 0.00246109 Jy
! Clean residual min=-0.000739 max=0.000614 Jy/beam
! Clean residual mean=-0.000004 rms=0.000226 Jy/beam
! Combined flux in latest and established models = 0.084833 Jy
keep
! Adding 153 model components to the UV plane model.
! The established model now contains 187 components and 0.084833 Jy
![Exited script file: muppet]
wmap "J1432+3618_S_2000_05_22_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.498 x 5.128 at -1.941 degrees (North through East)
! Clean map  min=-0.0010244  max=0.07886 Jy/beam
! Writing clean map to FITS file: J1432+3618_S_2000_05_22_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.0788596 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000224249 
device "J1432+3618_S_2000_05_22_pus\_map.eps/VPS"
! Attempting to open device: 'J1432+3618_S_2000_05_22_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.853094 0.853094 1.70619 3.41237 6.82475 13.6495 27.299 54.598
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0006 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.078 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.498 x 5.128 at -1.941 degrees (North through East)
! Clean map  min=-0.0010244  max=0.07886 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1432+3618_S_2000_05_22_pus\_map.gif/vgif"
! Attempting to open device: 'J1432+3618_S_2000_05_22_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1432+3618_S_2000_05_22_pus_uvs.log closed on Tue Nov 27 12:26:06 2007