! Started logfile: J1751+0939_S_2000_12_04_pus_uvs.log on Thu Oct 18 12:18:05 2007
obs J1751+0939_S_2000_12_04_pus_uva.fits
! Reading UV FITS file: J1751+0939_S_2000_12_04_pus_uva.fits
! AN table 1: 254 integrations on 190 of 190 possible baselines.
! AN table 2: 46 integrations on 190 of 190 possible baselines.
! AN table 3: 75 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0935298 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1751+0939
! 
! 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 2168 lines of history.
! 
! Reading 26656 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 J1751+0939_S_2000_12_04_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 3970 telescope corrections were flagged in sub-array 1.
!  A total of 523 telescope corrections were flagged in sub-array 2.
!  A total of 1291 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 3970 telescope corrections were flagged in sub-array 1.
!  A total of 523 telescope corrections were flagged in sub-array 2.
!  A total of 1291 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 3970 telescope corrections were flagged in sub-array 1.
!  A total of 523 telescope corrections were flagged in sub-array 2.
!  A total of 1291 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 3970 telescope corrections were flagged in sub-array 1.
!  A total of 523 telescope corrections were flagged in sub-array 2.
!  A total of 1291 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.040601Jy  sigma=0.008568
! Fit after  self-cal, rms=0.556412Jy  sigma=0.004306
! 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.857 mas, bmaj=3.367 mas, bpa=8.437 degrees
! Estimated noise=1367.91 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 = 1.05264 Jy
! Component: 100  -  total flux cleaned = 1.29562 Jy
! Total flux subtracted in 100 components = 1.29562 Jy
! Clean residual min=-0.028704 max=0.093241 Jy/beam
! Clean residual mean=0.000322 rms=0.008789 Jy/beam
! Combined flux in latest and established models = 1.29562 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 1.29562 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.391471Jy  sigma=0.002625
! Fit after  self-cal, rms=0.391458Jy  sigma=0.002625
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.104146 Jy
! Component: 100  -  total flux cleaned = 0.164096 Jy
! Total flux subtracted in 100 components = 0.164096 Jy
! Clean residual min=-0.017377 max=0.032601 Jy/beam
! Clean residual mean=0.000103 rms=0.005067 Jy/beam
! Combined flux in latest and established models = 1.45972 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 25 components and 1.45972 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.354789Jy  sigma=0.002183
! Fit after  self-cal, rms=0.354545Jy  sigma=0.002181
! Inverting map 
! Added new window around map position (1.5, 3.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0396541 Jy
! Component: 100  -  total flux cleaned = 0.0656127 Jy
! Total flux subtracted in 100 components = 0.0656127 Jy
! Clean residual min=-0.015307 max=0.019046 Jy/beam
! Clean residual mean=0.000019 rms=0.004242 Jy/beam
! Combined flux in latest and established models = 1.52533 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 31 components and 1.52533 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349240Jy  sigma=0.002118
! Fit after  self-cal, rms=0.349106Jy  sigma=0.002117
! 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.456 mas, bmaj=4.448 mas, bpa=9.854 degrees
! Estimated noise=550.581 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 (5, 6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0229521 Jy
! Component: 100  -  total flux cleaned = 0.0353975 Jy
! Component: 150  -  total flux cleaned = 0.0430141 Jy
! Component: 200  -  total flux cleaned = 0.0455066 Jy
! Total flux subtracted in 200 components = 0.0455066 Jy
! Clean residual min=-0.011833 max=0.013537 Jy/beam
! Clean residual mean=-0.000230 rms=0.003208 Jy/beam
! Combined flux in latest and established models = 1.57084 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 49 components and 1.57084 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347558Jy  sigma=0.002100
! Fit after  self-cal, rms=0.347462Jy  sigma=0.002099
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        1.03     HN        0.99     KK        1.00*    KP        0.93     
!   LA        1.02     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.00     NY        1.14     OV        0.98     PT        0.99     
!   SC        1.01     TS        1.00*    WF        1.01     WZ        1.03     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        1.02     
!   LA        1.02     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        1.02     NY        1.00*    OV        0.97     PT        1.00     
!   SC        1.00*    TS        1.02     WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        0.94     GG        1.00*    
!   HH        1.05     HN        1.26     KK        1.00     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.00*    NY        1.02     OV        1.00*    PT        1.00*    
!   SC        1.06     TS        1.06     WF        0.93     WZ        1.04     
! 
! 
! Correcting IF 2.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.01     GC        1.00*    GG        1.00*    
!   HH        1.02     HN        0.98     KK        1.00*    KP        0.95     
!   LA        0.99     MA        1.00*    MC        1.00*    MK        1.03     
!   NL        0.95     NY        1.11     OV        0.94     PT        1.00     
!   SC        0.98     TS        1.00*    WF        0.98     WZ        1.02     
! 
!  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        0.96     KP        1.00     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        0.96     NY        1.00*    OV        0.94     PT        1.02     
!   SC        1.00*    TS        1.07     WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        0.97     GG        1.00*    
!   HH        0.98     HN        1.24     KK        1.01     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.00*    NY        1.07     OV        1.00*    PT        1.00*    
!   SC        1.08     TS        1.04     WF        0.99     WZ        1.06     
! 
! 
! Correcting IF 3.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.05     GC        1.00*    GG        1.00*    
!   HH        0.98     HN        1.08     KK        1.00*    KP        1.01     
!   LA        1.06     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.07     NY        1.13     OV        1.06     PT        1.06     
!   SC        0.96     TS        1.00*    WF        0.98     WZ        0.88     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.91     KP        1.04     
!   LA        1.15     MA        1.00*    MC        1.00*    MK        0.94     
!   NL        0.97     NY        1.00*    OV        0.96     PT        1.15     
!   SC        1.00*    TS        1.10     WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.05     GG        1.00*    
!   HH        1.02     HN        1.02     KK        0.92     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.01     
!   NL        1.00*    NY        1.01     OV        1.00*    PT        1.00*    
!   SC        1.04     TS        1.01     WF        1.05     WZ        0.93     
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        0.99     HN        0.99     KK        1.00*    KP        0.95     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        0.98     NY        1.15     OV        0.97     PT        1.00     
!   SC        1.01     TS        1.00*    WF        0.99     WZ        1.05     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        1.01     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.94     KP        1.00     
!   LA        1.00     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        0.99     NY        1.00*    OV        0.97     PT        1.02     
!   SC        1.00*    TS        1.04     WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00     GG        1.00*    
!   HH        1.00     HN        1.26     KK        0.97     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.00*    NY        1.09     OV        1.00*    PT        1.00*    
!   SC        1.09     TS        1.06     WF        0.99     WZ        1.09     
! 
! 
! Fit before self-cal, rms=0.347462Jy  sigma=0.002099
! Fit after  self-cal, rms=0.358176Jy  sigma=0.001973
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.468 mas, bpa=9.83 degrees
! Estimated noise=553.416 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 (11.5, 16).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00846233 Jy
! Component: 100  -  total flux cleaned = 0.0129925 Jy
! Component: 150  -  total flux cleaned = 0.014769 Jy
! Component: 200  -  total flux cleaned = 0.0157379 Jy
! Total flux subtracted in 200 components = 0.0157379 Jy
! Clean residual min=-0.005614 max=0.005686 Jy/beam
! Clean residual mean=0.000017 rms=0.001529 Jy/beam
! Combined flux in latest and established models = 1.58658 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 71 components and 1.58658 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.357936Jy  sigma=0.001970
! Fit after  self-cal, rms=0.357877Jy  sigma=0.001970
! 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.357877Jy  sigma=0.001970
! Fit after  self-cal, rms=0.285233Jy  sigma=0.001950
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.468 mas, bpa=9.833 degrees
! Estimated noise=553.425 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0027116 Jy
! Component: 100  -  total flux cleaned = 0.00310917 Jy
! Component: 150  -  total flux cleaned = 0.00311038 Jy
! Component: 200  -  total flux cleaned = 0.0032666 Jy
! Total flux subtracted in 200 components = 0.0032666 Jy
! Clean residual min=-0.004209 max=0.004199 Jy/beam
! Clean residual mean=-0.000045 rms=0.001120 Jy/beam
! Combined flux in latest and established models = 1.58984 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 94 components and 1.58984 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285171Jy  sigma=0.001950
! Fit after  self-cal, rms=0.285194Jy  sigma=0.001950
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.00102401 Jy
! Component: 100  -  total flux cleaned = 0.00116973 Jy
! Component: 150  -  total flux cleaned = 0.00117173 Jy
! Component: 200  -  total flux cleaned = 0.0011733 Jy
! Total flux subtracted in 200 components = 0.0011733 Jy
! Clean residual min=-0.004114 max=0.004212 Jy/beam
! Clean residual mean=-0.000060 rms=0.001099 Jy/beam
! Combined flux in latest and established models = 1.59102 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 101 components and 1.59102 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285160Jy  sigma=0.001949
! Fit after  self-cal, rms=0.285157Jy  sigma=0.001949
! 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.285157Jy  sigma=0.001949
! Fit after  self-cal, rms=0.285025Jy  sigma=0.001949
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.467 mas, bpa=9.827 degrees
! Estimated noise=553.537 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00139056 Jy
! Component: 100  -  total flux cleaned = 0.00153366 Jy
! Component: 150  -  total flux cleaned = 0.0015961 Jy
! Component: 200  -  total flux cleaned = 0.00171287 Jy
! Total flux subtracted in 200 components = 0.00171287 Jy
! Clean residual min=-0.004035 max=0.004022 Jy/beam
! Clean residual mean=-0.000101 rms=0.001082 Jy/beam
! Combined flux in latest and established models = 1.59273 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 104 components and 1.59273 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284992Jy  sigma=0.001949
! Fit after  self-cal, rms=0.284990Jy  sigma=0.001949
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.000421439 Jy
! Component: 100  -  total flux cleaned = 0.000479435 Jy
! Component: 150  -  total flux cleaned = 0.000533457 Jy
! Component: 200  -  total flux cleaned = 0.000534241 Jy
! Total flux subtracted in 200 components = 0.000534241 Jy
! Clean residual min=-0.003925 max=0.004003 Jy/beam
! Clean residual mean=-0.000108 rms=0.001072 Jy/beam
! Combined flux in latest and established models = 1.59326 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 107 components and 1.59326 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284967Jy  sigma=0.001949
! Fit after  self-cal, rms=0.284964Jy  sigma=0.001949
! 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.284964Jy  sigma=0.001949
! Fit after  self-cal, rms=0.284899Jy  sigma=0.001949
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.686 mas, bmaj=10.67 mas, bpa=-11.31 degrees
! Estimated noise=706.218 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00200196 Jy
! Component: 100  -  total flux cleaned = 0.00295389 Jy
! Component: 150  -  total flux cleaned = 0.0032255 Jy
! Component: 200  -  total flux cleaned = 0.00341883 Jy
! Total flux subtracted in 200 components = 0.00341883 Jy
! Clean residual min=-0.004831 max=0.004950 Jy/beam
! Clean residual mean=-0.000385 rms=0.001558 Jy/beam
! Combined flux in latest and established models = 1.59668 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 123 components and 1.59668 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284915Jy  sigma=0.001949
! Fit after  self-cal, rms=0.284910Jy  sigma=0.001949
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.000595237 Jy
! Component: 100  -  total flux cleaned = 0.000619301 Jy
! Component: 150  -  total flux cleaned = 0.000639399 Jy
! Component: 200  -  total flux cleaned = 0.000639376 Jy
! Total flux subtracted in 200 components = 0.000639376 Jy
! Clean residual min=-0.004902 max=0.004945 Jy/beam
! Clean residual mean=-0.000404 rms=0.001547 Jy/beam
! Combined flux in latest and established models = 1.59732 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 131 components and 1.59732 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284917Jy  sigma=0.001949
! Fit after  self-cal, rms=0.284914Jy  sigma=0.001949
! 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.481 mas, bmaj=4.466 mas, bpa=9.821 degrees
! Estimated noise=553.68 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.481 x 4.466 at 9.821 degrees (North through East)
! Clean map  min=-0.0039589  max=1.3836 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.284914Jy  sigma=0.001949
! Fit after  self-cal, rms=0.271596Jy  sigma=0.001665
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.467 mas, bpa=9.803 degrees
! Estimated noise=553.437 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00177556 Jy
! Component: 100  -  total flux cleaned = -0.00211658 Jy
! Component: 150  -  total flux cleaned = -0.0022368 Jy
! Component: 200  -  total flux cleaned = -0.0022382 Jy
! Total flux subtracted in 200 components = -0.0022382 Jy
! Clean residual min=-0.003955 max=0.003275 Jy/beam
! Clean residual mean=-0.000157 rms=0.000925 Jy/beam
! Combined flux in latest and established models = 1.59508 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 142 components and 1.59508 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271559Jy  sigma=0.001665
! Fit after  self-cal, rms=0.271561Jy  sigma=0.001665
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000116981 Jy
! Component: 100  -  total flux cleaned = -0.000166518 Jy
! Component: 150  -  total flux cleaned = -0.000117275 Jy
! Component: 200  -  total flux cleaned = -0.000116557 Jy
! Total flux subtracted in 200 components = -0.000116557 Jy
! Clean residual min=-0.003909 max=0.003261 Jy/beam
! Clean residual mean=-0.000156 rms=0.000921 Jy/beam
! Combined flux in latest and established models = 1.59497 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 148 components and 1.59497 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271542Jy  sigma=0.001664
! Fit after  self-cal, rms=0.271541Jy  sigma=0.001664
! 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.271541Jy  sigma=0.001664
! Fit after  self-cal, rms=0.271354Jy  sigma=0.001664
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.869 mas, bmaj=3.402 mas, bpa=8.65 degrees
! Estimated noise=1391.07 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.06105 Jy
! Component: 100  -  total flux cleaned = 1.30228 Jy
! Component: 150  -  total flux cleaned = 1.40117 Jy
! Component: 200  -  total flux cleaned = 1.45722 Jy
! Total flux subtracted in 200 components = 1.45722 Jy
! Clean residual min=-0.011111 max=0.028420 Jy/beam
! Clean residual mean=0.000165 rms=0.003367 Jy/beam
! Combined flux in latest and established models = 1.45722 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 23 model components to the UV plane model.
! The established model now contains 23 components and 1.45722 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.467 mas, bpa=9.806 degrees
! Estimated noise=553.218 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.0496761 Jy
! Component: 100  -  total flux cleaned = 0.0768654 Jy
! Component: 150  -  total flux cleaned = 0.0939262 Jy
! Component: 200  -  total flux cleaned = 0.105663 Jy
! Total flux subtracted in 200 components = 0.105663 Jy
! Clean residual min=-0.004304 max=0.007132 Jy/beam
! Clean residual mean=0.000226 rms=0.001424 Jy/beam
! Combined flux in latest and established models = 1.56288 Jy
! Adding 61 model components to the UV plane model.
! The established model now contains 75 components and 1.56288 Jy
! Inverting map 
! Added new window around map position (1, -4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00871576 Jy
! Component: 100  -  total flux cleaned = 0.0151782 Jy
! Component: 150  -  total flux cleaned = 0.0200404 Jy
! Component: 200  -  total flux cleaned = 0.0237486 Jy
! Total flux subtracted in 200 components = 0.0237486 Jy
! Clean residual min=-0.004299 max=0.003818 Jy/beam
! Clean residual mean=-0.000069 rms=0.000989 Jy/beam
! Combined flux in latest and established models = 1.58663 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 97 components and 1.58663 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.685 mas, bmaj=10.68 mas, bpa=-11.31 degrees
! Estimated noise=705.524 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00434011 Jy
! Component: 100  -  total flux cleaned = 0.00679118 Jy
! Component: 150  -  total flux cleaned = 0.0076277 Jy
! Component: 200  -  total flux cleaned = 0.00796076 Jy
! Total flux subtracted in 200 components = 0.00796076 Jy
! Clean residual min=-0.005543 max=0.003506 Jy/beam
! Clean residual mean=-0.000406 rms=0.001311 Jy/beam
! Combined flux in latest and established models = 1.59459 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.000191944 Jy
! Component: 100  -  total flux cleaned = 0.000380442 Jy
! Component: 150  -  total flux cleaned = 0.000484313 Jy
! Component: 200  -  total flux cleaned = 0.000529702 Jy
! Total flux subtracted in 200 components = 0.000529702 Jy
! Clean residual min=-0.005493 max=0.003523 Jy/beam
! Clean residual mean=-0.000422 rms=0.001307 Jy/beam
! Combined flux in latest and established models = 1.59512 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 139 components and 1.59512 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.481 mas, bmaj=4.467 mas, bpa=9.806 degrees
! Estimated noise=553.218 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00200091 Jy
! Component: 100  -  total flux cleaned = -0.00200783 Jy
! Component: 150  -  total flux cleaned = -0.00200792 Jy
! Component: 200  -  total flux cleaned = -0.00186993 Jy
! Total flux subtracted in 200 components = -0.00186993 Jy
! Clean residual min=-0.004412 max=0.003574 Jy/beam
! Clean residual mean=-0.000150 rms=0.000925 Jy/beam
! Combined flux in latest and established models = 1.59325 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 155 components and 1.59325 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271333Jy  sigma=0.001665
! Fit after  self-cal, rms=0.271314Jy  sigma=0.001665
wmodel J1751+0939_S_2000_12_04_pus_map.mod
! Writing 155 model components to file: J1751+0939_S_2000_12_04_pus_map.mod
wobs J1751+0939_S_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J1751+0939_S_2000_12_04_pus_uvs.fits
wwins J1751+0939_S_2000_12_04_pus_map.win
! wwins: Wrote 5 windows to J1751+0939_S_2000_12_04_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.00143382 Jy
! Component: 100  -  total flux cleaned = -0.00208017 Jy
! Component: 150  -  total flux cleaned = -0.00293119 Jy
! Component: 200  -  total flux cleaned = -0.00356506 Jy
! Component: 250  -  total flux cleaned = -0.00411595 Jy
! Component: 300  -  total flux cleaned = -0.0044346 Jy
! Component: 350  -  total flux cleaned = -0.00474453 Jy
! Component: 400  -  total flux cleaned = -0.00499515 Jy
! Component: 450  -  total flux cleaned = -0.00519055 Jy
! Component: 500  -  total flux cleaned = -0.0054754 Jy
! Component: 550  -  total flux cleaned = -0.00570759 Jy
! Component: 600  -  total flux cleaned = -0.00598174 Jy
! Component: 650  -  total flux cleaned = -0.00625035 Jy
! Component: 700  -  total flux cleaned = -0.00651344 Jy
! Component: 750  -  total flux cleaned = -0.00672919 Jy
! Component: 800  -  total flux cleaned = -0.00694192 Jy
! Component: 850  -  total flux cleaned = -0.00710939 Jy
! Component: 900  -  total flux cleaned = -0.00723355 Jy
! Component: 950  -  total flux cleaned = -0.00743623 Jy
! Component: 1000  -  total flux cleaned = -0.00755607 Jy
! Component: 1050  -  total flux cleaned = -0.0077134 Jy
! Component: 1100  -  total flux cleaned = -0.00782997 Jy
! Component: 1150  -  total flux cleaned = -0.00802167 Jy
! Component: 1200  -  total flux cleaned = -0.00809753 Jy
! Component: 1250  -  total flux cleaned = -0.00821013 Jy
! Component: 1300  -  total flux cleaned = -0.00832176 Jy
! Component: 1350  -  total flux cleaned = -0.00839532 Jy
! Component: 1400  -  total flux cleaned = -0.00861322 Jy
! Component: 1450  -  total flux cleaned = -0.0087205 Jy
! Component: 1500  -  total flux cleaned = -0.00882677 Jy
! Component: 1550  -  total flux cleaned = -0.00893211 Jy
! Component: 1600  -  total flux cleaned = -0.00896667 Jy
! Component: 1650  -  total flux cleaned = -0.00900155 Jy
! Component: 1700  -  total flux cleaned = -0.00910459 Jy
! Component: 1750  -  total flux cleaned = -0.00920677 Jy
! Component: 1800  -  total flux cleaned = -0.00934133 Jy
! Component: 1850  -  total flux cleaned = -0.0094081 Jy
! Component: 1900  -  total flux cleaned = -0.00954004 Jy
! Component: 1950  -  total flux cleaned = -0.00963827 Jy
! Component: 2000  -  total flux cleaned = -0.00967056 Jy
! Total flux subtracted in 2048 components = -0.00976726 Jy
! Clean residual min=-0.002102 max=0.001865 Jy/beam
! Clean residual mean=-0.000045 rms=0.000609 Jy/beam
! Combined flux in latest and established models = 1.58348 Jy
keep
! Adding 151 model components to the UV plane model.
! The established model now contains 306 components and 1.58348 Jy
![Exited script file: muppet]
wmap "J1751+0939_S_2000_12_04_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.481 x 4.467 at 9.806 degrees (North through East)
! Clean map  min=-0.0032141  max=1.3925 Jy/beam
! Writing clean map to FITS file: J1751+0939_S_2000_12_04_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.3925 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000606722 
device "J1751+0939_S_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J1751+0939_S_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.130712 0.130712 0.261425 0.522849 1.0457 2.0914 4.18279 8.36559 16.7312 33.4623 66.9247
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0018 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.392 
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.481 x 4.467 at 9.806 degrees (North through East)
! Clean map  min=-0.0032141  max=1.3925 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1751+0939_S_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J1751+0939_S_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1751+0939_S_2000_12_04_pus_uvs.log closed on Thu Oct 18 12:18:21 2007