! Started logfile: J0231+1322_S_2001_10_29_pus_uvs.log on Thu Feb 28 13:47:26 2008
obs J0231+1322_S_2001_10_29_pus_uva.fits
! Reading UV FITS file: J0231+1322_S_2001_10_29_pus_uva.fits
! AN table 1: 260 integrations on 153 of 153 possible baselines.
! AN table 2: 200 integrations on 153 of 153 possible baselines.
! AN table 3: 56 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.101865 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0231+1322
! 
! 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 2612 lines of history.
! 
! Reading 32168 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 = 1024 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J0231+1322_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 = 1024x1024 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 4149 telescope corrections were flagged in sub-array 1.
!  A total of 2101 telescope corrections were flagged in sub-array 2.
!  A total of 968 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 4149 telescope corrections were flagged in sub-array 1.
!  A total of 2101 telescope corrections were flagged in sub-array 2.
!  A total of 968 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 4149 telescope corrections were flagged in sub-array 1.
!  A total of 2101 telescope corrections were flagged in sub-array 2.
!  A total of 968 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 4348 telescope corrections were flagged in sub-array 1.
!  A total of 2101 telescope corrections were flagged in sub-array 2.
!  A total of 1008 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.269371Jy  sigma=0.001858
! Fit after  self-cal, rms=0.266565Jy  sigma=0.001837
! 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.87 mas, bmaj=3.571 mas, bpa=1.556 degrees
! Estimated noise=1247.07 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.648279 Jy
! Component: 100  -  total flux cleaned = 0.821455 Jy
! Total flux subtracted in 100 components = 0.821455 Jy
! Clean residual min=-0.031626 max=0.081469 Jy/beam
! Clean residual mean=-0.000275 rms=0.008431 Jy/beam
! Combined flux in latest and established models = 0.821455 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.821455 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.266827Jy  sigma=0.001983
! Fit after  self-cal, rms=0.266748Jy  sigma=0.001982
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0964241 Jy
! Component: 100  -  total flux cleaned = 0.155482 Jy
! Total flux subtracted in 100 components = 0.155482 Jy
! Clean residual min=-0.017063 max=0.030472 Jy/beam
! Clean residual mean=-0.000141 rms=0.003990 Jy/beam
! Combined flux in latest and established models = 0.976937 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 12 components and 0.976937 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204319Jy  sigma=0.001340
! Fit after  self-cal, rms=0.204104Jy  sigma=0.001338
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0372455 Jy
! Component: 100  -  total flux cleaned = 0.0602199 Jy
! Total flux subtracted in 100 components = 0.0602199 Jy
! Clean residual min=-0.012178 max=0.021383 Jy/beam
! Clean residual mean=-0.000090 rms=0.002753 Jy/beam
! Combined flux in latest and established models = 1.03716 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 15 components and 1.03716 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.193717Jy  sigma=0.001208
! Fit after  self-cal, rms=0.193704Jy  sigma=0.001208
! Inverting map 
! Added new window around map position (7, 4).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0212389 Jy
! Component: 100  -  total flux cleaned = 0.0351005 Jy
! Total flux subtracted in 100 components = 0.0351005 Jy
! Clean residual min=-0.009293 max=0.010266 Jy/beam
! Clean residual mean=-0.000062 rms=0.002197 Jy/beam
! Combined flux in latest and established models = 1.07226 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 26 components and 1.07226 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.190098Jy  sigma=0.001164
! Fit after  self-cal, rms=0.189881Jy  sigma=0.001162
! 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.768 mas, bmaj=6.085 mas, bpa=-11.49 degrees
! Estimated noise=545.543 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.018734 Jy
! Component: 100  -  total flux cleaned = 0.0298229 Jy
! Component: 150  -  total flux cleaned = 0.036837 Jy
! Component: 200  -  total flux cleaned = 0.0413573 Jy
! Total flux subtracted in 200 components = 0.0413573 Jy
! Clean residual min=-0.011202 max=0.014067 Jy/beam
! Clean residual mean=-0.000185 rms=0.003140 Jy/beam
! Combined flux in latest and established models = 1.11361 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 46 components and 1.11361 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.188189Jy  sigma=0.001139
! Fit after  self-cal, rms=0.188067Jy  sigma=0.001138
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.02     
!   HN        1.00     KK        1.00*    KP        1.00*    LA        1.00     
!   MA        1.02     MC        0.99     MK        1.00*    NL        0.98     
!   OV        1.00*    PT        1.00     SC        1.01     TS        1.00*    
!   WF        1.03     WZ        0.98     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00     KP        0.99     LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.00     NL        1.01     
!   OV        1.00     PT        0.99     SC        1.00*    TS        1.00     
!   WF        1.02     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.98     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.01     MC        0.98     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        0.98     
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00     
!   HN        1.00     KK        1.00*    KP        1.00*    LA        0.99     
!   MA        1.02     MC        0.98     MK        1.00*    NL        0.98     
!   OV        1.00*    PT        1.00     SC        1.00     TS        1.00*    
!   WF        1.02     WZ        0.98     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.03     KK        1.00     KP        0.99     LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.01     NL        1.01     
!   OV        1.00     PT        0.99     SC        1.00*    TS        1.00     
!   WF        1.03     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.99     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.01     MC        0.98     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        0.98     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.01     
!   HN        1.00     KK        1.00*    KP        1.00*    LA        0.98     
!   MA        1.00     MC        0.99     MK        1.00*    NL        0.99     
!   OV        1.00*    PT        1.00     SC        1.00     TS        1.00*    
!   WF        1.01     WZ        0.99     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00     KP        0.99     LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.01     NL        1.01     
!   OV        1.00     PT        0.99     SC        1.00*    TS        1.00     
!   WF        1.02     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.00     MC        0.99     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        0.99     
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00     
!   HN        1.00     KK        1.00*    KP        1.00*    LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        0.98     
!   OV        1.00*    PT        1.00     SC        1.01     TS        1.00*    
!   WF        1.01     WZ        1.00     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00     KP        0.99     LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.01     NL        1.01     
!   OV        0.99     PT        0.99     SC        1.00*    TS        1.00     
!   WF        1.02     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Fit before self-cal, rms=0.188067Jy  sigma=0.001138
! Fit after  self-cal, rms=0.188801Jy  sigma=0.001130
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.769 mas, bmaj=6.095 mas, bpa=-11.35 degrees
! Estimated noise=544.736 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 (29.5, 1.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0110044 Jy
! Component: 100  -  total flux cleaned = 0.0167749 Jy
! Component: 150  -  total flux cleaned = 0.0196749 Jy
! Component: 200  -  total flux cleaned = 0.0210066 Jy
! Total flux subtracted in 200 components = 0.0210066 Jy
! Clean residual min=-0.006761 max=0.008118 Jy/beam
! Clean residual mean=0.000088 rms=0.001896 Jy/beam
! Combined flux in latest and established models = 1.13462 Jy
! Performing phase self-cal
! Adding 42 model components to the UV plane model.
! The established model now contains 88 components and 1.13462 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.188177Jy  sigma=0.001123
! Fit after  self-cal, rms=0.188188Jy  sigma=0.001122
! 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.188188Jy  sigma=0.001122
! Fit after  self-cal, rms=0.187779Jy  sigma=0.001121
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.769 mas, bmaj=6.092 mas, bpa=-11.38 degrees
! Estimated noise=544.157 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00459635 Jy
! Component: 100  -  total flux cleaned = 0.00738739 Jy
! Component: 150  -  total flux cleaned = 0.0082166 Jy
! Component: 200  -  total flux cleaned = 0.00849971 Jy
! Total flux subtracted in 200 components = 0.00849971 Jy
! Clean residual min=-0.006589 max=0.006994 Jy/beam
! Clean residual mean=0.000082 rms=0.001804 Jy/beam
! Combined flux in latest and established models = 1.14312 Jy
selfcal
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 102 components and 1.14312 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187636Jy  sigma=0.001120
! Fit after  self-cal, rms=0.187622Jy  sigma=0.001120
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.0014563 Jy
! Component: 100  -  total flux cleaned = 0.00171117 Jy
! Component: 150  -  total flux cleaned = 0.0018272 Jy
! Component: 200  -  total flux cleaned = 0.00193543 Jy
! Total flux subtracted in 200 components = 0.00193543 Jy
! Clean residual min=-0.006356 max=0.006840 Jy/beam
! Clean residual mean=0.000091 rms=0.001790 Jy/beam
! Combined flux in latest and established models = 1.14506 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 110 components and 1.14506 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187578Jy  sigma=0.001120
! Fit after  self-cal, rms=0.187577Jy  sigma=0.001120
! 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.187577Jy  sigma=0.001120
! Fit after  self-cal, rms=0.187385Jy  sigma=0.001119
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.768 mas, bmaj=6.09 mas, bpa=-11.38 degrees
! Estimated noise=543.886 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00206848 Jy
! Component: 100  -  total flux cleaned = 0.00281694 Jy
! Component: 150  -  total flux cleaned = 0.00303471 Jy
! Component: 200  -  total flux cleaned = 0.00318394 Jy
! Total flux subtracted in 200 components = 0.00318394 Jy
! Clean residual min=-0.006368 max=0.006702 Jy/beam
! Clean residual mean=0.000080 rms=0.001773 Jy/beam
! Combined flux in latest and established models = 1.14824 Jy
selfcal
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 119 components and 1.14824 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187338Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187330Jy  sigma=0.001119
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.000611179 Jy
! Component: 100  -  total flux cleaned = 0.000708578 Jy
! Component: 150  -  total flux cleaned = 0.00079813 Jy
! Component: 200  -  total flux cleaned = 0.000839401 Jy
! Total flux subtracted in 200 components = 0.000839401 Jy
! Clean residual min=-0.006221 max=0.006629 Jy/beam
! Clean residual mean=0.000084 rms=0.001766 Jy/beam
! Combined flux in latest and established models = 1.14908 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 122 components and 1.14908 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187305Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187303Jy  sigma=0.001119
! 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.187303Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187231Jy  sigma=0.001119
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.946 mas, bmaj=11.9 mas, bpa=-48.66 degrees
! Estimated noise=674.975 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00155917 Jy
! Component: 100  -  total flux cleaned = 0.00191892 Jy
! Component: 150  -  total flux cleaned = 0.00206346 Jy
! Component: 200  -  total flux cleaned = 0.00223364 Jy
! Total flux subtracted in 200 components = 0.00223364 Jy
! Clean residual min=-0.009701 max=0.010477 Jy/beam
! Clean residual mean=0.000167 rms=0.003108 Jy/beam
! Combined flux in latest and established models = 1.15131 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 137 components and 1.15131 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187219Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187213Jy  sigma=0.001119
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.000381998 Jy
! Component: 100  -  total flux cleaned = 0.000584181 Jy
! Component: 150  -  total flux cleaned = 0.000655658 Jy
! Component: 200  -  total flux cleaned = 0.000755579 Jy
! Total flux subtracted in 200 components = 0.000755579 Jy
! Clean residual min=-0.009533 max=0.010561 Jy/beam
! Clean residual mean=0.000174 rms=0.003101 Jy/beam
! Combined flux in latest and established models = 1.15207 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 142 components and 1.15207 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187210Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187206Jy  sigma=0.001119
! 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.767 mas, bmaj=6.09 mas, bpa=-11.37 degrees
! Estimated noise=543.749 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.767 x 6.09 at -11.37 degrees (North through East)
! Clean map  min=-0.0059978  max=0.91598 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.187206Jy  sigma=0.001119
! Fit after  self-cal, rms=0.187409Jy  sigma=0.001115
! Inverting map and beam 
! Estimated beam: bmin=2.767 mas, bmaj=6.091 mas, bpa=-11.36 degrees
! Estimated noise=544.03 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000338836 Jy
! Component: 100  -  total flux cleaned = 0.000339371 Jy
! Component: 150  -  total flux cleaned = 0.000381667 Jy
! Component: 200  -  total flux cleaned = 0.000381752 Jy
! Total flux subtracted in 200 components = 0.000381752 Jy
! Clean residual min=-0.005896 max=0.006252 Jy/beam
! Clean residual mean=0.000075 rms=0.001685 Jy/beam
! Combined flux in latest and established models = 1.15245 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 150 components and 1.15245 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187382Jy  sigma=0.001115
! Fit after  self-cal, rms=0.187379Jy  sigma=0.001115
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00018856 Jy
! Component: 100  -  total flux cleaned = 0.000187112 Jy
! Component: 150  -  total flux cleaned = 0.000152768 Jy
! Component: 200  -  total flux cleaned = 0.000186693 Jy
! Total flux subtracted in 200 components = 0.000186693 Jy
! Clean residual min=-0.005813 max=0.006191 Jy/beam
! Clean residual mean=0.000075 rms=0.001681 Jy/beam
! Combined flux in latest and established models = 1.15264 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 152 components and 1.15264 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187363Jy  sigma=0.001115
! Fit after  self-cal, rms=0.187361Jy  sigma=0.001115
! 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.187361Jy  sigma=0.001115
! Fit after  self-cal, rms=0.187322Jy  sigma=0.001114
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.87 mas, bmaj=3.573 mas, bpa=1.544 degrees
! Estimated noise=1242.2 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.645074 Jy
! Component: 100  -  total flux cleaned = 0.819763 Jy
! Component: 150  -  total flux cleaned = 0.915673 Jy
! Component: 200  -  total flux cleaned = 0.974295 Jy
! Total flux subtracted in 200 components = 0.974294 Jy
! Clean residual min=-0.015819 max=0.030251 Jy/beam
! Clean residual mean=-0.000129 rms=0.003892 Jy/beam
! Combined flux in latest and established models = 0.974295 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 16 model components to the UV plane model.
! The established model now contains 16 components and 0.974295 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.767 mas, bmaj=6.09 mas, bpa=-11.36 degrees
! Estimated noise=543.981 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.0581481 Jy
! Component: 100  -  total flux cleaned = 0.088492 Jy
! Component: 150  -  total flux cleaned = 0.108559 Jy
! Component: 200  -  total flux cleaned = 0.123304 Jy
! Total flux subtracted in 200 components = 0.123304 Jy
! Clean residual min=-0.009301 max=0.010375 Jy/beam
! Clean residual mean=-0.000180 rms=0.002657 Jy/beam
! Combined flux in latest and established models = 1.0976 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 52 components and 1.0976 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.947 mas, bmaj=11.9 mas, bpa=-48.63 degrees
! Estimated noise=675.171 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0185589 Jy
! Component: 100  -  total flux cleaned = 0.030305 Jy
! Component: 150  -  total flux cleaned = 0.0382139 Jy
! Component: 200  -  total flux cleaned = 0.0437201 Jy
! Total flux subtracted in 200 components = 0.0437201 Jy
! Clean residual min=-0.010709 max=0.009807 Jy/beam
! Clean residual mean=0.000041 rms=0.003046 Jy/beam
! Combined flux in latest and established models = 1.14132 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.00388254 Jy
! Component: 100  -  total flux cleaned = 0.00663313 Jy
! Component: 150  -  total flux cleaned = 0.00859551 Jy
! Component: 200  -  total flux cleaned = 0.00999992 Jy
! Total flux subtracted in 200 components = 0.00999992 Jy
! Clean residual min=-0.009532 max=0.009975 Jy/beam
! Clean residual mean=0.000131 rms=0.002948 Jy/beam
! Combined flux in latest and established models = 1.15132 Jy
! Adding 84 model components to the UV plane model.
! The established model now contains 125 components and 1.15132 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.767 mas, bmaj=6.09 mas, bpa=-11.36 degrees
! Estimated noise=543.981 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000415686 Jy
! Component: 100  -  total flux cleaned = 0.000284319 Jy
! Component: 150  -  total flux cleaned = 0.000482246 Jy
! Component: 200  -  total flux cleaned = 0.000573114 Jy
! Total flux subtracted in 200 components = 0.000573114 Jy
! Clean residual min=-0.006048 max=0.006435 Jy/beam
! Clean residual mean=0.000068 rms=0.001680 Jy/beam
! Combined flux in latest and established models = 1.15189 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 140 components and 1.15189 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.187549Jy  sigma=0.001116
! Fit after  self-cal, rms=0.187515Jy  sigma=0.001116
wmodel J0231+1322_S_2001_10_29_pus_map.mod
! Writing 140 model components to file: J0231+1322_S_2001_10_29_pus_map.mod
wobs J0231+1322_S_2001_10_29_pus_uvs.fits
! Writing UV FITS file: J0231+1322_S_2001_10_29_pus_uvs.fits
wwins J0231+1322_S_2001_10_29_pus_map.win
! wwins: Wrote 3 windows to J0231+1322_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=4096  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000849094 Jy
! Component: 100  -  total flux cleaned = 0.00157778 Jy
! Component: 150  -  total flux cleaned = 0.00254355 Jy
! Component: 200  -  total flux cleaned = 0.00335656 Jy
! Component: 250  -  total flux cleaned = 0.00411855 Jy
! Component: 300  -  total flux cleaned = 0.00459776 Jy
! Component: 350  -  total flux cleaned = 0.00505482 Jy
! Component: 400  -  total flux cleaned = 0.00549138 Jy
! Component: 450  -  total flux cleaned = 0.00597889 Jy
! Component: 500  -  total flux cleaned = 0.00638173 Jy
! Component: 550  -  total flux cleaned = 0.00683302 Jy
! Component: 600  -  total flux cleaned = 0.00708184 Jy
! Component: 650  -  total flux cleaned = 0.00714284 Jy
! Component: 700  -  total flux cleaned = 0.00720152 Jy
! Component: 750  -  total flux cleaned = 0.00731506 Jy
! Component: 800  -  total flux cleaned = 0.00764534 Jy
! Component: 850  -  total flux cleaned = 0.0077519 Jy
! Component: 900  -  total flux cleaned = 0.00806333 Jy
! Component: 950  -  total flux cleaned = 0.00821564 Jy
! Component: 1000  -  total flux cleaned = 0.00836373 Jy
! Component: 1050  -  total flux cleaned = 0.00851068 Jy
! Component: 1100  -  total flux cleaned = 0.00870146 Jy
! Component: 1150  -  total flux cleaned = 0.00898074 Jy
! Component: 1200  -  total flux cleaned = 0.00916332 Jy
! Component: 1250  -  total flux cleaned = 0.00943059 Jy
! Component: 1300  -  total flux cleaned = 0.00964938 Jy
! Component: 1350  -  total flux cleaned = 0.00977824 Jy
! Component: 1400  -  total flux cleaned = 0.00998807 Jy
! Component: 1450  -  total flux cleaned = 0.0102351 Jy
! Component: 1500  -  total flux cleaned = 0.010356 Jy
! Component: 1550  -  total flux cleaned = 0.0105544 Jy
! Component: 1600  -  total flux cleaned = 0.0107112 Jy
! Component: 1650  -  total flux cleaned = 0.01098 Jy
! Component: 1700  -  total flux cleaned = 0.0110548 Jy
! Component: 1750  -  total flux cleaned = 0.0112393 Jy
! Component: 1800  -  total flux cleaned = 0.0113488 Jy
! Component: 1850  -  total flux cleaned = 0.0114931 Jy
! Component: 1900  -  total flux cleaned = 0.0116705 Jy
! Component: 1950  -  total flux cleaned = 0.0118802 Jy
! Component: 2000  -  total flux cleaned = 0.0120524 Jy
! Component: 2050  -  total flux cleaned = 0.012155 Jy
! Component: 2100  -  total flux cleaned = 0.0124225 Jy
! Component: 2150  -  total flux cleaned = 0.0125879 Jy
! Component: 2200  -  total flux cleaned = 0.0128808 Jy
! Component: 2250  -  total flux cleaned = 0.0131382 Jy
! Component: 2300  -  total flux cleaned = 0.0133287 Jy
! Component: 2350  -  total flux cleaned = 0.0134846 Jy
! Component: 2400  -  total flux cleaned = 0.0136394 Jy
! Component: 2450  -  total flux cleaned = 0.0138232 Jy
! Component: 2500  -  total flux cleaned = 0.0139748 Jy
! Component: 2550  -  total flux cleaned = 0.0141549 Jy
! Component: 2600  -  total flux cleaned = 0.0144221 Jy
! Component: 2650  -  total flux cleaned = 0.0145096 Jy
! Component: 2700  -  total flux cleaned = 0.0148289 Jy
! Component: 2750  -  total flux cleaned = 0.0149437 Jy
! Component: 2800  -  total flux cleaned = 0.0150577 Jy
! Component: 2850  -  total flux cleaned = 0.015311 Jy
! Component: 2900  -  total flux cleaned = 0.0154503 Jy
! Component: 2950  -  total flux cleaned = 0.0155614 Jy
! Component: 3000  -  total flux cleaned = 0.0158081 Jy
! Component: 3050  -  total flux cleaned = 0.0158895 Jy
! Component: 3100  -  total flux cleaned = 0.0160514 Jy
! Component: 3150  -  total flux cleaned = 0.0161586 Jy
! Component: 3200  -  total flux cleaned = 0.0163181 Jy
! Component: 3250  -  total flux cleaned = 0.0163445 Jy
! Component: 3300  -  total flux cleaned = 0.0163969 Jy
! Component: 3350  -  total flux cleaned = 0.0164227 Jy
! Component: 3400  -  total flux cleaned = 0.0165774 Jy
! Component: 3450  -  total flux cleaned = 0.0166282 Jy
! Component: 3500  -  total flux cleaned = 0.0166788 Jy
! Component: 3550  -  total flux cleaned = 0.0168049 Jy
! Component: 3600  -  total flux cleaned = 0.0168048 Jy
! Component: 3650  -  total flux cleaned = 0.0168296 Jy
! Component: 3700  -  total flux cleaned = 0.0167801 Jy
! Component: 3750  -  total flux cleaned = 0.0168048 Jy
! Component: 3800  -  total flux cleaned = 0.0168539 Jy
! Component: 3850  -  total flux cleaned = 0.0168295 Jy
! Component: 3900  -  total flux cleaned = 0.0168536 Jy
! Component: 3950  -  total flux cleaned = 0.0168535 Jy
! Component: 4000  -  total flux cleaned = 0.0168772 Jy
! Component: 4050  -  total flux cleaned = 0.0168532 Jy
! Total flux subtracted in 4096 components = 0.0168533 Jy
! Clean residual min=-0.001229 max=0.001359 Jy/beam
! Clean residual mean=0.000007 rms=0.000416 Jy/beam
! Combined flux in latest and established models = 1.16874 Jy
keep
! Adding 311 model components to the UV plane model.
! The established model now contains 451 components and 1.16875 Jy
![Exited script file: muppet]
wmap "J0231+1322_S_2001_10_29_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.767 x 6.09 at -11.36 degrees (North through East)
! Clean map  min=-0.0025339  max=0.91716 Jy/beam
! Writing clean map to FITS file: J0231+1322_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 0.917159 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000412615 
device "J0231+1322_S_2001_10_29_pus\_map.eps/VPS"
! Attempting to open device: 'J0231+1322_S_2001_10_29_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.134965 0.134965 0.26993 0.539861 1.07972 2.15944 4.31888 8.63777 17.2755 34.5511 69.1021
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0012 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.917 
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.767 x 6.09 at -11.36 degrees (North through East)
! Clean map  min=-0.0025339  max=0.91716 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0231+1322_S_2001_10_29_pus\_map.gif/vgif"
! Attempting to open device: 'J0231+1322_S_2001_10_29_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0231+1322_S_2001_10_29_pus_uvs.log closed on Thu Feb 28 13:48:05 2008