! Started logfile: J0927+3902_S_2001_10_29_pus_uvs.log on Wed Feb 27 14:26:22 2008
obs J0927+3902_S_2001_10_29_pus_uva.fits
! Reading UV FITS file: J0927+3902_S_2001_10_29_pus_uva.fits
! AN table 1: 146 integrations on 153 of 153 possible baselines.
! AN table 2: 165 integrations on 153 of 153 possible baselines.
! AN table 3: 51 integrations on 153 of 153 possible baselines.
! AN table 4: 262 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.18418 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0927+3902
! 
! 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.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2600 lines of history.
! 
! Reading 70336 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 J0927+3902_S_2001_10_29_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 1829 telescope corrections were flagged in sub-array 1.
!  A total of 1699 telescope corrections were flagged in sub-array 2.
!  A total of 662 telescope corrections were flagged in sub-array 3.
!  A total of 2852 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1829 telescope corrections were flagged in sub-array 1.
!  A total of 1699 telescope corrections were flagged in sub-array 2.
!  A total of 662 telescope corrections were flagged in sub-array 3.
!  A total of 2852 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1829 telescope corrections were flagged in sub-array 1.
!  A total of 1699 telescope corrections were flagged in sub-array 2.
!  A total of 662 telescope corrections were flagged in sub-array 3.
!  A total of 2853 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1829 telescope corrections were flagged in sub-array 1.
!  A total of 1699 telescope corrections were flagged in sub-array 2.
!  A total of 662 telescope corrections were flagged in sub-array 3.
!  A total of 2853 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=3.204843Jy  sigma=0.025644
! Fit after  self-cal, rms=2.932523Jy  sigma=0.023840
! 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.711 mas, bmaj=3.164 mas, bpa=-1.548 degrees
! Estimated noise=803.958 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 = 2.65454 Jy
! Component: 100  -  total flux cleaned = 3.45411 Jy
! Total flux subtracted in 100 components = 3.45411 Jy
! Clean residual min=-0.086250 max=0.376024 Jy/beam
! Clean residual mean=0.000568 rms=0.027055 Jy/beam
! Combined flux in latest and established models = 3.45411 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 3.45411 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.002887Jy  sigma=0.007840
! Fit after  self-cal, rms=1.002716Jy  sigma=0.007839
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.423604 Jy
! Component: 100  -  total flux cleaned = 0.677734 Jy
! Total flux subtracted in 100 components = 0.677734 Jy
! Clean residual min=-0.062579 max=0.132605 Jy/beam
! Clean residual mean=0.000278 rms=0.017016 Jy/beam
! Combined flux in latest and established models = 4.13185 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 13 components and 4.13185 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.703344Jy  sigma=0.005026
! Fit after  self-cal, rms=0.702171Jy  sigma=0.005018
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.165121 Jy
! Component: 100  -  total flux cleaned = 0.270933 Jy
! Total flux subtracted in 100 components = 0.270933 Jy
! Clean residual min=-0.058217 max=0.070547 Jy/beam
! Clean residual mean=0.000161 rms=0.014708 Jy/beam
! Combined flux in latest and established models = 4.40278 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 17 components and 4.40278 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.642791Jy  sigma=0.004373
! Fit after  self-cal, rms=0.642376Jy  sigma=0.004370
! 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.1 mas, bmaj=4.028 mas, bpa=-6.048 degrees
! Estimated noise=351.34 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.116079 Jy
! Component: 100  -  total flux cleaned = 0.172201 Jy
! Component: 150  -  total flux cleaned = 0.201752 Jy
! Component: 200  -  total flux cleaned = 0.217918 Jy
! Total flux subtracted in 200 components = 0.217918 Jy
! Clean residual min=-0.050715 max=0.063821 Jy/beam
! Clean residual mean=0.001240 rms=0.013099 Jy/beam
! Combined flux in latest and established models = 4.6207 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 22 components and 4.6207 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.626831Jy  sigma=0.004158
! Fit after  self-cal, rms=0.626762Jy  sigma=0.004158
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.08     KP        1.08     LA        1.03     
!   MA        0.89     MC        1.10     MK        1.00     NL        1.00     
!   OV        1.02     PT        1.03     SC        1.00*    TS        1.06     
!   WF        1.06     WZ        1.01     
! 
!  A total of 72 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.03     KK        1.09     KP        1.02     LA        1.00     
!   MA        1.23     MC        0.97     MK        1.05     NL        1.20     
!   OV        0.96     PT        1.00     SC        1.02     TS        1.00*    
!   WF        1.10     WZ        1.00     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.85     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.04     KP        1.30     LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        0.96     NL        0.95     
!   OV        0.99     PT        0.96     SC        1.09     TS        1.03     
!   WF        1.06     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.00*    GG        1.00*    HH        1.14     
!   HN        0.97     KK        1.00*    KP        0.92     LA        1.02     
!   MA        1.01     MC        1.19     MK        1.00*    NL        0.99     
!   OV        1.03     PT        1.02     SC        1.01     TS        1.00*    
!   WF        0.98     WZ        1.03     
! 
! 
! Correcting IF 2.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.04     KP        0.99     LA        0.99     
!   MA        5.52     MC        1.06     MK        1.01     NL        1.00     
!   OV        1.02     PT        1.00     SC        1.00*    TS        1.06     
!   WF        0.98     WZ        1.00     
! 
!  A total of 72 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.10     KP        1.17     LA        0.96     
!   MA        1.65     MC        0.91     MK        1.06     NL        1.22     
!   OV        0.98     PT        0.99     SC        1.02     TS        1.00*    
!   WF        1.04     WZ        1.00     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.88     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.96     KK        1.06     KP        1.08     LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        0.95     NL        0.95     
!   OV        0.99     PT        0.94     SC        1.08     TS        1.05     
!   WF        1.00     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.00*    GG        1.00*    HH        1.08     
!   HN        1.00     KK        1.00*    KP        0.95     LA        0.98     
!   MA        1.10     MC        1.16     MK        1.00*    NL        1.00     
!   OV        1.04     PT        1.00     SC        1.01     TS        1.00*    
!   WF        1.02     WZ        1.03     
! 
! 
! Correcting IF 3.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.03     KP        1.02     LA        0.93     
!   MA        1.33     MC        1.01     MK        0.94     NL        0.95     
!   OV        1.00     PT        1.00     SC        1.00*    TS        1.03     
!   WF        0.97     WZ        0.98     
! 
!  A total of 72 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.04     KP        0.93     LA        0.93     
!   MA        0.98     MC        2.56     MK        0.99     NL        1.18     
!   OV        0.94     PT        0.97     SC        0.99     TS        1.00*    
!   WF        0.99     WZ        0.96     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.88     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00     KP        0.99     LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        0.89     NL        0.90     
!   OV        0.98     PT        0.94     SC        1.04     TS        1.02     
!   WF        0.69     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        1.07     
!   HN        0.98     KK        1.00*    KP        0.95     LA        0.95     
!   MA        0.96     MC        0.93     MK        1.00*    NL        0.97     
!   OV        1.02     PT        1.00     SC        0.98     TS        1.00*    
!   WF        1.00     WZ        0.99     
! 
! 
! Correcting IF 4.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        0.98     KP        1.03     LA        0.99     
!   MA        3.94     MC        0.77     MK        0.97     NL        1.00     
!   OV        0.99     PT        0.99     SC        1.00*    TS        1.04     
!   WF        0.97     WZ        0.98     
! 
!  A total of 72 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.97     KK        0.99     KP        0.96     LA        0.96     
!   MA        0.99     MC        0.85     MK        1.01     NL        1.31     
!   OV        0.94     PT        0.98     SC        0.99     TS        1.00*    
!   WF        0.99     WZ        0.98     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.87     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.94     KK        0.95     KP        1.04     LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        0.92     NL        0.94     
!   OV        0.94     PT        0.94     SC        1.04     TS        1.03     
!   WF        0.98     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        1.00*    GG        1.00*    HH        1.03     
!   HN        0.97     KK        1.00*    KP        0.91     LA        0.98     
!   MA        0.80     MC        0.87     MK        1.00*    NL        1.00     
!   OV        0.98     PT        0.98     SC        0.98     TS        1.00*    
!   WF        1.02     WZ        0.99     
! 
! 
! Fit before self-cal, rms=0.626762Jy  sigma=0.004158
! Fit after  self-cal, rms=0.434674Jy  sigma=0.002697
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.129 mas, bmaj=4.044 mas, bpa=-5.508 degrees
! Estimated noise=354.105 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 (3.5, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0143722 Jy
! Component: 100  -  total flux cleaned = 0.0152366 Jy
! Component: 150  -  total flux cleaned = 0.0152416 Jy
! Component: 200  -  total flux cleaned = 0.015218 Jy
! Total flux subtracted in 200 components = 0.015218 Jy
! Clean residual min=-0.015688 max=0.030311 Jy/beam
! Clean residual mean=0.000780 rms=0.004499 Jy/beam
! Combined flux in latest and established models = 4.63592 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 37 components and 4.63592 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.431022Jy  sigma=0.002662
! Fit after  self-cal, rms=0.431113Jy  sigma=0.002658
! Inverting map 
! Added new window around map position (-3, 0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0170923 Jy
! Component: 100  -  total flux cleaned = 0.0160684 Jy
! Component: 150  -  total flux cleaned = 0.0147686 Jy
! Component: 200  -  total flux cleaned = 0.0136362 Jy
! Total flux subtracted in 200 components = 0.0136362 Jy
! Clean residual min=-0.014430 max=0.019316 Jy/beam
! Clean residual mean=0.000677 rms=0.004231 Jy/beam
! Combined flux in latest and established models = 4.64955 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 52 components and 4.64955 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.429747Jy  sigma=0.002645
! Fit after  self-cal, rms=0.429669Jy  sigma=0.002645
! 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.429669Jy  sigma=0.002645
! Fit after  self-cal, rms=0.410543Jy  sigma=0.002483
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.126 mas, bmaj=4.052 mas, bpa=-5.406 degrees
! Estimated noise=354.134 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00140698 Jy
! Component: 100  -  total flux cleaned = 0.000270365 Jy
! Component: 150  -  total flux cleaned = 0.00233805 Jy
! Component: 200  -  total flux cleaned = 0.00409296 Jy
! Total flux subtracted in 200 components = 0.00409296 Jy
! Clean residual min=-0.009099 max=0.012916 Jy/beam
! Clean residual mean=0.000038 rms=0.002268 Jy/beam
! Combined flux in latest and established models = 4.65365 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 67 components and 4.65365 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409757Jy  sigma=0.002476
! Fit after  self-cal, rms=0.409785Jy  sigma=0.002476
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 (12.5, 61.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0104195 Jy
! Component: 100  -  total flux cleaned = 0.0132541 Jy
! Component: 150  -  total flux cleaned = 0.0151928 Jy
! Component: 200  -  total flux cleaned = 0.0162683 Jy
! Total flux subtracted in 200 components = 0.0162683 Jy
! Clean residual min=-0.008370 max=0.009001 Jy/beam
! Clean residual mean=-0.000085 rms=0.002186 Jy/beam
! Combined flux in latest and established models = 4.66992 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 80 components and 4.66991 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409263Jy  sigma=0.002473
! Fit after  self-cal, rms=0.409248Jy  sigma=0.002472
! 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.409248Jy  sigma=0.002472
! Fit after  self-cal, rms=0.409570Jy  sigma=0.002470
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.126 mas, bmaj=4.057 mas, bpa=-5.336 degrees
! Estimated noise=354.37 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00187753 Jy
! Component: 100  -  total flux cleaned = 8.6446e-05 Jy
! Component: 150  -  total flux cleaned = 0.00205104 Jy
! Component: 200  -  total flux cleaned = 0.00358313 Jy
! Total flux subtracted in 200 components = 0.00358313 Jy
! Clean residual min=-0.007356 max=0.008334 Jy/beam
! Clean residual mean=-0.000066 rms=0.002072 Jy/beam
! Combined flux in latest and established models = 4.6735 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 85 components and 4.6735 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409174Jy  sigma=0.002467
! Fit after  self-cal, rms=0.409176Jy  sigma=0.002467
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.00165739 Jy
! Component: 100  -  total flux cleaned = 0.00221189 Jy
! Component: 150  -  total flux cleaned = 0.00272282 Jy
! Component: 200  -  total flux cleaned = 0.00288026 Jy
! Total flux subtracted in 200 components = 0.00288026 Jy
! Clean residual min=-0.007240 max=0.008026 Jy/beam
! Clean residual mean=-0.000086 rms=0.002053 Jy/beam
! Combined flux in latest and established models = 4.67638 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 95 components and 4.67638 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409014Jy  sigma=0.002466
! Fit after  self-cal, rms=0.409015Jy  sigma=0.002466
! 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.409015Jy  sigma=0.002466
! Fit after  self-cal, rms=0.409317Jy  sigma=0.002464
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.962 mas, bmaj=8.86 mas, bpa=24.47 degrees
! Estimated noise=537.812 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00492491 Jy
! Component: 100  -  total flux cleaned = 0.00543385 Jy
! Component: 150  -  total flux cleaned = 0.00618367 Jy
! Component: 200  -  total flux cleaned = 0.00639315 Jy
! Total flux subtracted in 200 components = 0.00639315 Jy
! Clean residual min=-0.008958 max=0.009937 Jy/beam
! Clean residual mean=-0.000429 rms=0.003623 Jy/beam
! Combined flux in latest and established models = 4.68277 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 106 components and 4.68277 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409332Jy  sigma=0.002465
! Fit after  self-cal, rms=0.409323Jy  sigma=0.002464
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.000555439 Jy
! Component: 100  -  total flux cleaned = 0.000623964 Jy
! Component: 150  -  total flux cleaned = 0.00056391 Jy
! Component: 200  -  total flux cleaned = 0.000509553 Jy
! Total flux subtracted in 200 components = 0.000509553 Jy
! Clean residual min=-0.009217 max=0.009823 Jy/beam
! Clean residual mean=-0.000440 rms=0.003610 Jy/beam
! Combined flux in latest and established models = 4.68328 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 110 components and 4.68328 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409339Jy  sigma=0.002465
! Fit after  self-cal, rms=0.409340Jy  sigma=0.002465
! 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.126 mas, bmaj=4.06 mas, bpa=-5.288 degrees
! Estimated noise=354.66 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.126 x 4.06 at -5.288 degrees (North through East)
! Clean map  min=-0.0076193  max=3.7336 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
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409340Jy  sigma=0.002465
! Fit after  self-cal, rms=0.348124Jy  sigma=0.001551
! Inverting map and beam 
! Estimated beam: bmin=2.127 mas, bmaj=4.061 mas, bpa=-5.283 degrees
! Estimated noise=354.383 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00806982 Jy
! Component: 100  -  total flux cleaned = -0.00950679 Jy
! Component: 150  -  total flux cleaned = -0.00967778 Jy
! Component: 200  -  total flux cleaned = -0.00968039 Jy
! Total flux subtracted in 200 components = -0.00968039 Jy
! Clean residual min=-0.004883 max=0.005241 Jy/beam
! Clean residual mean=0.000071 rms=0.001298 Jy/beam
! Combined flux in latest and established models = 4.6736 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 122 components and 4.6736 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347829Jy  sigma=0.001548
! Fit after  self-cal, rms=0.347832Jy  sigma=0.001548
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000640116 Jy
! Component: 100  -  total flux cleaned = -0.000764964 Jy
! Component: 150  -  total flux cleaned = -0.000644175 Jy
! Component: 200  -  total flux cleaned = -0.000645069 Jy
! Total flux subtracted in 200 components = -0.000645069 Jy
! Clean residual min=-0.004800 max=0.005085 Jy/beam
! Clean residual mean=0.000074 rms=0.001276 Jy/beam
! Combined flux in latest and established models = 4.67296 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 131 components and 4.67296 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347749Jy  sigma=0.001547
! Fit after  self-cal, rms=0.347749Jy  sigma=0.001547
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347749Jy  sigma=0.001547
! Fit after  self-cal, rms=0.347560Jy  sigma=0.001546
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.725 mas, bmaj=3.224 mas, bpa=-1.269 degrees
! Estimated noise=818.677 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 2.70165 Jy
! Component: 100  -  total flux cleaned = 3.48978 Jy
! Component: 150  -  total flux cleaned = 3.90585 Jy
! Component: 200  -  total flux cleaned = 4.14167 Jy
! Total flux subtracted in 200 components = 4.14167 Jy
! Clean residual min=-0.027126 max=0.121447 Jy/beam
! Clean residual mean=0.000237 rms=0.008616 Jy/beam
! Combined flux in latest and established models = 4.14167 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 15 model components to the UV plane model.
! The established model now contains 15 components and 4.14167 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.127 mas, bmaj=4.065 mas, bpa=-5.231 degrees
! Estimated noise=354.319 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.223563 Jy
! Component: 100  -  total flux cleaned = 0.334468 Jy
! Component: 150  -  total flux cleaned = 0.400197 Jy
! Component: 200  -  total flux cleaned = 0.441765 Jy
! Total flux subtracted in 200 components = 0.441765 Jy
! Clean residual min=-0.006644 max=0.022219 Jy/beam
! Clean residual mean=0.000690 rms=0.002931 Jy/beam
! Combined flux in latest and established models = 4.58343 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 36 components and 4.58343 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0273913 Jy
! Component: 100  -  total flux cleaned = 0.0457533 Jy
! Component: 150  -  total flux cleaned = 0.0584696 Jy
! Component: 200  -  total flux cleaned = 0.0677826 Jy
! Total flux subtracted in 200 components = 0.0677826 Jy
! Clean residual min=-0.004785 max=0.006146 Jy/beam
! Clean residual mean=0.000171 rms=0.001407 Jy/beam
! Combined flux in latest and established models = 4.65121 Jy
! Adding 32 model components to the UV plane model.
! The established model now contains 59 components and 4.65121 Jy
! Inverting map 
! Added new window around map position (8.5, -1.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00720802 Jy
! Component: 100  -  total flux cleaned = 0.0104209 Jy
! Component: 150  -  total flux cleaned = 0.0114249 Jy
! Component: 200  -  total flux cleaned = 0.0123458 Jy
! Total flux subtracted in 200 components = 0.0123458 Jy
! Clean residual min=-0.004727 max=0.004950 Jy/beam
! Clean residual mean=0.000078 rms=0.001240 Jy/beam
! Combined flux in latest and established models = 4.66356 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 76 components and 4.66356 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=7.963 mas, bmaj=8.86 mas, bpa=24.35 degrees
! Estimated noise=536.732 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00411547 Jy
! Component: 100  -  total flux cleaned = 0.00521446 Jy
! Component: 150  -  total flux cleaned = 0.00581927 Jy
! Component: 200  -  total flux cleaned = 0.00640453 Jy
! Total flux subtracted in 200 components = 0.00640453 Jy
! Clean residual min=-0.005653 max=0.006865 Jy/beam
! Clean residual mean=0.000106 rms=0.002180 Jy/beam
! Combined flux in latest and established models = 4.66996 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.000399351 Jy
! Component: 100  -  total flux cleaned = 0.000799847 Jy
! Component: 150  -  total flux cleaned = 0.00102702 Jy
! Component: 200  -  total flux cleaned = 0.00112695 Jy
! Total flux subtracted in 200 components = 0.00112695 Jy
! Clean residual min=-0.005449 max=0.006690 Jy/beam
! Clean residual mean=0.000076 rms=0.002133 Jy/beam
! Combined flux in latest and established models = 4.67109 Jy
! Adding 55 model components to the UV plane model.
! The established model now contains 122 components and 4.67109 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.127 mas, bmaj=4.065 mas, bpa=-5.231 degrees
! Estimated noise=354.319 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000961316 Jy
! Component: 100  -  total flux cleaned = -0.0011201 Jy
! Component: 150  -  total flux cleaned = -0.00125718 Jy
! Component: 200  -  total flux cleaned = -0.00125969 Jy
! Total flux subtracted in 200 components = -0.00125969 Jy
! Clean residual min=-0.004449 max=0.004476 Jy/beam
! Clean residual mean=0.000037 rms=0.001151 Jy/beam
! Combined flux in latest and established models = 4.66983 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 134 components and 4.66983 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.348272Jy  sigma=0.001547
! Fit after  self-cal, rms=0.348184Jy  sigma=0.001547
wmodel J0927+3902_S_2001_10_29_pus_map.mod
! Writing 134 model components to file: J0927+3902_S_2001_10_29_pus_map.mod
wobs J0927+3902_S_2001_10_29_pus_uvs.fits
! Writing UV FITS file: J0927+3902_S_2001_10_29_pus_uvs.fits
wwins J0927+3902_S_2001_10_29_pus_map.win
! wwins: Wrote 5 windows to J0927+3902_S_2001_10_29_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.000519622 Jy
! Component: 100  -  total flux cleaned = 0.000672112 Jy
! Component: 150  -  total flux cleaned = 0.00125668 Jy
! Component: 200  -  total flux cleaned = 0.00132824 Jy
! Component: 250  -  total flux cleaned = 0.001328 Jy
! Component: 300  -  total flux cleaned = 0.00146083 Jy
! Component: 350  -  total flux cleaned = 0.00152578 Jy
! Component: 400  -  total flux cleaned = 0.00152641 Jy
! Component: 450  -  total flux cleaned = 0.00165392 Jy
! Component: 500  -  total flux cleaned = 0.00184071 Jy
! Component: 550  -  total flux cleaned = 0.0019018 Jy
! Component: 600  -  total flux cleaned = 0.00196275 Jy
! Component: 650  -  total flux cleaned = 0.00196382 Jy
! Component: 700  -  total flux cleaned = 0.00202375 Jy
! Component: 750  -  total flux cleaned = 0.00208262 Jy
! Component: 800  -  total flux cleaned = 0.00214008 Jy
! Component: 850  -  total flux cleaned = 0.00219638 Jy
! Component: 900  -  total flux cleaned = 0.00208455 Jy
! Component: 950  -  total flux cleaned = 0.00236373 Jy
! Component: 1000  -  total flux cleaned = 0.0024184 Jy
! Component: 1050  -  total flux cleaned = 0.00241881 Jy
! Component: 1100  -  total flux cleaned = 0.0026351 Jy
! Component: 1150  -  total flux cleaned = 0.0026889 Jy
! Component: 1200  -  total flux cleaned = 0.00268907 Jy
! Component: 1250  -  total flux cleaned = 0.00279467 Jy
! Component: 1300  -  total flux cleaned = 0.00300331 Jy
! Component: 1350  -  total flux cleaned = 0.00315863 Jy
! Component: 1400  -  total flux cleaned = 0.00326074 Jy
! Component: 1450  -  total flux cleaned = 0.00336248 Jy
! Component: 1500  -  total flux cleaned = 0.00341313 Jy
! Component: 1550  -  total flux cleaned = 0.00346346 Jy
! Component: 1600  -  total flux cleaned = 0.00356302 Jy
! Component: 1650  -  total flux cleaned = 0.00366207 Jy
! Component: 1700  -  total flux cleaned = 0.00371107 Jy
! Component: 1750  -  total flux cleaned = 0.00380826 Jy
! Component: 1800  -  total flux cleaned = 0.00371126 Jy
! Component: 1850  -  total flux cleaned = 0.00400064 Jy
! Component: 1900  -  total flux cleaned = 0.00400017 Jy
! Component: 1950  -  total flux cleaned = 0.00390523 Jy
! Component: 2000  -  total flux cleaned = 0.00409452 Jy
! Total flux subtracted in 2048 components = 0.0041884 Jy
! Clean residual min=-0.002526 max=0.002348 Jy/beam
! Clean residual mean=-0.000005 rms=0.000895 Jy/beam
! Combined flux in latest and established models = 4.67402 Jy
keep
! Adding 153 model components to the UV plane model.
! The established model now contains 287 components and 4.67402 Jy
![Exited script file: muppet]
wmap "J0927+3902_S_2001_10_29_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.127 x 4.065 at -5.231 degrees (North through East)
! Clean map  min=-0.0038947  max=3.7387 Jy/beam
! Writing clean map to FITS file: J0927+3902_S_2001_10_29_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 3.73872 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000894303 
device "J0927+3902_S_2001_10_29_pus\_map.eps/VPS"
! Attempting to open device: 'J0927+3902_S_2001_10_29_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0717601 0.0717601 0.14352 0.28704 0.574081 1.14816 2.29632 4.59265 9.18529 18.3706 36.7412 73.4823
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0026 
print "peak=",int(1000*peak_flux)/1000
! peak= 3.738 
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.127 x 4.065 at -5.231 degrees (North through East)
! Clean map  min=-0.0038947  max=3.7387 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0927+3902_S_2001_10_29_pus\_map.gif/vgif"
! Attempting to open device: 'J0927+3902_S_2001_10_29_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0927+3902_S_2001_10_29_pus_uvs.log closed on Wed Feb 27 14:26:50 2008