! Started logfile: J1740+5211_S_1998_10_01_pus_uvs.log on Thu Feb  7 17:24:32 2008
obs J1740+5211_S_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1740+5211_S_1998_10_01_pus_uva.fits
! AN table 1: 339 integrations on 136 of 136 possible baselines.
! AN table 2: 80 integrations on 136 of 136 possible baselines.
! AN table 3: 619 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.189448 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1740+5211
! 
! 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.22298e+09        4e+06          1        4e+06
!  02        2  2.24298e+09        4e+06          1        4e+06
!  03        3  2.33298e+09        4e+06          1        4e+06
!  04        4  2.36298e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 1537 lines of history.
! 
! Reading 106976 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 J1740+5211_S_1998_10_01_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 3544 telescope corrections were flagged in sub-array 1.
!  A total of 1015 telescope corrections were flagged in sub-array 2.
!  A total of 7516 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 3545 telescope corrections were flagged in sub-array 1.
!  A total of 1015 telescope corrections were flagged in sub-array 2.
!  A total of 7516 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 3545 telescope corrections were flagged in sub-array 1.
!  A total of 1015 telescope corrections were flagged in sub-array 2.
!  A total of 7516 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 3544 telescope corrections were flagged in sub-array 1.
!  A total of 1015 telescope corrections were flagged in sub-array 2.
!  A total of 7515 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.649449Jy  sigma=0.010255
! Fit after  self-cal, rms=1.337795Jy  sigma=0.008021
! 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=2.403 mas, bmaj=2.465 mas, bpa=-16.62 degrees
! Estimated noise=903.712 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.55123 Jy
! Component: 100  -  total flux cleaned = 1.89014 Jy
! Total flux subtracted in 100 components = 1.89014 Jy
! Clean residual min=-0.026002 max=0.100422 Jy/beam
! Clean residual mean=0.000135 rms=0.006703 Jy/beam
! Combined flux in latest and established models = 1.89014 Jy
! Performing phase self-cal
! Adding 3 model components to the UV plane model.
! The established model now contains 3 components and 1.89014 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.882493Jy  sigma=0.003115
! Fit after  self-cal, rms=0.882469Jy  sigma=0.003115
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.105621 Jy
! Component: 100  -  total flux cleaned = 0.16426 Jy
! Total flux subtracted in 100 components = 0.16426 Jy
! Clean residual min=-0.023099 max=0.034250 Jy/beam
! Clean residual mean=0.000029 rms=0.005415 Jy/beam
! Combined flux in latest and established models = 2.0544 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 17 components and 2.0544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.868201Jy  sigma=0.002808
! Fit after  self-cal, rms=0.868336Jy  sigma=0.002808
! Inverting map 
! Added new window around map position (0, 2.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0405415 Jy
! Component: 100  -  total flux cleaned = 0.0684533 Jy
! Total flux subtracted in 100 components = 0.0684533 Jy
! Clean residual min=-0.021796 max=0.023957 Jy/beam
! Clean residual mean=-0.000013 rms=0.005163 Jy/beam
! Combined flux in latest and established models = 2.12285 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 27 components and 2.12285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.866271Jy  sigma=0.002749
! Fit after  self-cal, rms=0.866355Jy  sigma=0.002748
! 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=3.047 mas, bmaj=3.186 mas, bpa=-34.13 degrees
! Estimated noise=328.951 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.0358122 Jy
! Component: 100  -  total flux cleaned = 0.0562673 Jy
! Component: 150  -  total flux cleaned = 0.0690492 Jy
! Component: 200  -  total flux cleaned = 0.0772231 Jy
! Total flux subtracted in 200 components = 0.0772231 Jy
! Clean residual min=-0.014306 max=0.014477 Jy/beam
! Clean residual mean=-0.000612 rms=0.003513 Jy/beam
! Combined flux in latest and established models = 2.20008 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 52 components and 2.20008 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.865333Jy  sigma=0.002717
! Fit after  self-cal, rms=0.865051Jy  sigma=0.002716
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 264 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.00     GC        1.01     HN        0.97     
!   KK        1.00     KP        1.02     LA        0.95     MK        0.98     
!   NL        0.97     NY        0.94     ON        1.03     OV        0.97     
!   PT        1.00     SC        1.04     WF        0.98     MC        1.03     
!   GN        0.96     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.06     HN        0.94     
!   KK        1.00*    KP        1.00*    LA        0.98     MK        1.00*    
!   NL        0.96     NY        0.99     ON        0.98     OV        1.00*    
!   PT        1.11     SC        1.10     WF        0.99     MC        1.00*    
!   GN        1.00*    
! 
!  A total of 291 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.02     GC        1.03     HN        1.00     
!   KK        0.96     KP        1.03     LA        0.96     MK        0.96     
!   NL        0.99     NY        0.93     ON        1.05     OV        1.01     
!   PT        1.03     SC        1.10     WF        1.01     MC        1.19     
!   GN        1.03     
! 
! 
! Correcting IF 2.
!  A total of 267 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.99     GC        0.99     HN        1.02     
!   KK        1.00     KP        0.99     LA        1.02     MK        1.06     
!   NL        0.96     NY        0.98     ON        1.05     OV        0.96     
!   PT        0.97     SC        1.05     WF        1.03     MC        1.01     
!   GN        0.95     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.13     HN        1.00     
!   KK        1.00*    KP        1.00*    LA        1.08     MK        1.00*    
!   NL        0.92     NY        1.02     ON        1.03     OV        1.00*    
!   PT        1.06     SC        1.14     WF        1.05     MC        1.00*    
!   GN        1.00*    
! 
!  A total of 291 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.02     GC        1.00     HN        1.06     
!   KK        0.97     KP        1.01     LA        1.02     MK        1.02     
!   NL        0.97     NY        0.98     ON        1.05     OV        1.00     
!   PT        1.00     SC        1.12     WF        1.05     MC        1.04     
!   GN        1.04     
! 
! 
! Correcting IF 3.
!  A total of 267 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.04     GC        1.03     HN        0.97     
!   KK        0.99     KP        1.00     LA        0.99     MK        0.99     
!   NL        0.96     NY        0.99     ON        1.03     OV        0.97     
!   PT        0.97     SC        1.05     WF        1.02     MC        0.83     
!   GN        0.97     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.05     HN        0.96     
!   KK        1.00*    KP        1.00*    LA        1.03     MK        1.00*    
!   NL        0.96     NY        0.97     ON        0.97     OV        1.00*    
!   PT        1.08     SC        1.10     WF        1.03     MC        1.00*    
!   GN        1.00*    
! 
!  A total of 291 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.06     GC        1.05     HN        1.02     
!   KK        0.97     KP        1.03     LA        1.00     MK        0.97     
!   NL        0.99     NY        0.98     ON        1.03     OV        1.01     
!   PT        0.96     SC        1.10     WF        1.04     MC        0.92     
!   GN        1.04     
! 
! 
! Correcting IF 4.
!  A total of 264 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00     GC        1.02     HN        0.99     
!   KK        1.00     KP        1.00     LA        1.00     MK        0.99     
!   NL        0.95     NY        0.99     ON        1.04     OV        0.98     
!   PT        0.99     SC        1.03     WF        1.00     MC        0.94     
!   GN        0.96     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.03     HN        0.96     
!   KK        1.00*    KP        1.00*    LA        1.02     MK        1.00*    
!   NL        0.95     NY        1.02     ON        1.04     OV        1.00*    
!   PT        1.09     SC        1.07     WF        1.03     MC        1.00*    
!   GN        1.00*    
! 
!  A total of 288 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.02     GC        1.06     HN        1.03     
!   KK        0.98     KP        1.04     LA        0.99     MK        0.98     
!   NL        0.98     NY        0.99     ON        1.05     OV        1.02     
!   PT        0.89     SC        1.07     WF        1.02     MC        0.82     
!   GN        1.03     
! 
! 
! Fit before self-cal, rms=0.865051Jy  sigma=0.002716
! Fit after  self-cal, rms=0.792336Jy  sigma=0.002605
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.098 mas, bmaj=3.246 mas, bpa=-38.81 degrees
! Estimated noise=329.058 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.00777707 Jy
! Component: 100  -  total flux cleaned = -0.00982252 Jy
! Component: 150  -  total flux cleaned = -0.010329 Jy
! Component: 200  -  total flux cleaned = -0.0104428 Jy
! Total flux subtracted in 200 components = -0.0104428 Jy
! Clean residual min=-0.010679 max=0.011352 Jy/beam
! Clean residual mean=-0.000180 rms=0.002512 Jy/beam
! Combined flux in latest and established models = 2.18963 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 61 components and 2.18963 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.792199Jy  sigma=0.002604
! Fit after  self-cal, rms=0.792855Jy  sigma=0.002604
! 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.792855Jy  sigma=0.002604
! Fit after  self-cal, rms=0.951616Jy  sigma=0.002494
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.094 mas, bmaj=3.253 mas, bpa=-38.85 degrees
! Estimated noise=329.064 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0013473 Jy
! Component: 100  -  total flux cleaned = -0.00100659 Jy
! Component: 150  -  total flux cleaned = -0.000733344 Jy
! Component: 200  -  total flux cleaned = -0.000624172 Jy
! Total flux subtracted in 200 components = -0.000624172 Jy
! Clean residual min=-0.003883 max=0.004270 Jy/beam
! Clean residual mean=0.000252 rms=0.001067 Jy/beam
! Combined flux in latest and established models = 2.18901 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 66 components and 2.18901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.951536Jy  sigma=0.002493
! Fit after  self-cal, rms=0.951732Jy  sigma=0.002493
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.000163268 Jy
! Component: 100  -  total flux cleaned = 0.000253359 Jy
! Component: 150  -  total flux cleaned = 0.000174009 Jy
! Component: 200  -  total flux cleaned = 9.86366e-05 Jy
! Total flux subtracted in 200 components = 9.86366e-05 Jy
! Clean residual min=-0.003873 max=0.004294 Jy/beam
! Clean residual mean=0.000250 rms=0.001061 Jy/beam
! Combined flux in latest and established models = 2.18911 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 68 components and 2.18911 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.951706Jy  sigma=0.002493
! Fit after  self-cal, rms=0.951710Jy  sigma=0.002493
! 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.951710Jy  sigma=0.002493
! Fit after  self-cal, rms=0.935064Jy  sigma=0.002480
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.092 mas, bmaj=3.258 mas, bpa=-38.32 degrees
! Estimated noise=329.141 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00177142 Jy
! Component: 100  -  total flux cleaned = -0.00177237 Jy
! Component: 150  -  total flux cleaned = -0.00187097 Jy
! Component: 200  -  total flux cleaned = -0.00195241 Jy
! Total flux subtracted in 200 components = -0.00195241 Jy
! Clean residual min=-0.003391 max=0.003805 Jy/beam
! Clean residual mean=0.000288 rms=0.000892 Jy/beam
! Combined flux in latest and established models = 2.18716 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 68 components and 2.18716 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.935030Jy  sigma=0.002480
! Fit after  self-cal, rms=0.935013Jy  sigma=0.002480
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.000268552 Jy
! Component: 100  -  total flux cleaned = -0.000269008 Jy
! Component: 150  -  total flux cleaned = -0.000269757 Jy
! Component: 200  -  total flux cleaned = -0.000387559 Jy
! Total flux subtracted in 200 components = -0.000387559 Jy
! Clean residual min=-0.003065 max=0.003785 Jy/beam
! Clean residual mean=0.000292 rms=0.000889 Jy/beam
! Combined flux in latest and established models = 2.18677 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 69 components and 2.18677 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.935003Jy  sigma=0.002480
! Fit after  self-cal, rms=0.935004Jy  sigma=0.002480
! 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.935004Jy  sigma=0.002480
! Fit after  self-cal, rms=0.933496Jy  sigma=0.002480
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.102 mas, bmaj=8.321 mas, bpa=52.62 degrees
! Estimated noise=444.072 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000964277 Jy
! Component: 100  -  total flux cleaned = 0.00094926 Jy
! Component: 150  -  total flux cleaned = 0.000912702 Jy
! Component: 200  -  total flux cleaned = 0.000909882 Jy
! Total flux subtracted in 200 components = 0.000909882 Jy
! Clean residual min=-0.002696 max=0.005956 Jy/beam
! Clean residual mean=0.000832 rms=0.001315 Jy/beam
! Combined flux in latest and established models = 2.18768 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 69 components and 2.18768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.933498Jy  sigma=0.002480
! Fit after  self-cal, rms=0.933477Jy  sigma=0.002480
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 (10, 16).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0061642 Jy
! Component: 100  -  total flux cleaned = 0.00949429 Jy
! Component: 150  -  total flux cleaned = 0.0107008 Jy
! Component: 200  -  total flux cleaned = 0.0109476 Jy
! Total flux subtracted in 200 components = 0.0109476 Jy
! Clean residual min=-0.002730 max=0.004999 Jy/beam
! Clean residual mean=0.000587 rms=0.001116 Jy/beam
! Combined flux in latest and established models = 2.19863 Jy
! Performing phase self-cal
! Adding 70 model components to the UV plane model.
! The established model now contains 137 components and 2.19863 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.933445Jy  sigma=0.002479
! Fit after  self-cal, rms=0.933469Jy  sigma=0.002479
! 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=3.091 mas, bmaj=3.261 mas, bpa=-37.96 degrees
! Estimated noise=329.244 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.091 x 3.261 at -37.96 degrees (North through East)
! Clean map  min=-0.0029754  max=2.0158 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.933469Jy  sigma=0.002479
! Fit after  self-cal, rms=0.971095Jy  sigma=0.002312
! Inverting map and beam 
! Estimated beam: bmin=3.092 mas, bmaj=3.261 mas, bpa=-37.93 degrees
! Estimated noise=329.149 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000156024 Jy
! Component: 100  -  total flux cleaned = -4.25599e-05 Jy
! Component: 150  -  total flux cleaned = -4.43785e-05 Jy
! Component: 200  -  total flux cleaned = 4.8276e-05 Jy
! Total flux subtracted in 200 components = 4.8276e-05 Jy
! Clean residual min=-0.002975 max=0.003199 Jy/beam
! Clean residual mean=0.000149 rms=0.000754 Jy/beam
! Combined flux in latest and established models = 2.19867 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 160 components and 2.19867 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.971065Jy  sigma=0.002311
! Fit after  self-cal, rms=0.971079Jy  sigma=0.002311
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -8.44301e-05 Jy
! Component: 100  -  total flux cleaned = 0.000176196 Jy
! Component: 150  -  total flux cleaned = 0.000257836 Jy
! Component: 200  -  total flux cleaned = 0.000337775 Jy
! Total flux subtracted in 200 components = 0.000337775 Jy
! Clean residual min=-0.002953 max=0.003159 Jy/beam
! Clean residual mean=0.000146 rms=0.000746 Jy/beam
! Combined flux in latest and established models = 2.19901 Jy
! Performing phase self-cal
! Adding 42 model components to the UV plane model.
! The established model now contains 175 components and 2.19901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.971055Jy  sigma=0.002311
! Fit after  self-cal, rms=0.971049Jy  sigma=0.002311
! 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.971049Jy  sigma=0.002311
! Fit after  self-cal, rms=1.009913Jy  sigma=0.002311
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=2.421 mas, bmaj=2.488 mas, bpa=-44.13 degrees
! Estimated noise=904.49 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.54882 Jy
! Component: 100  -  total flux cleaned = 1.88657 Jy
! Component: 150  -  total flux cleaned = 1.98194 Jy
! Component: 200  -  total flux cleaned = 2.03467 Jy
! Total flux subtracted in 200 components = 2.03467 Jy
! Clean residual min=-0.011331 max=0.028256 Jy/beam
! Clean residual mean=0.000099 rms=0.003051 Jy/beam
! Combined flux in latest and established models = 2.03467 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 17 model components to the UV plane model.
! The established model now contains 17 components and 2.03467 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.092 mas, bmaj=3.262 mas, bpa=-37.87 degrees
! Estimated noise=329.082 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.0614816 Jy
! Component: 100  -  total flux cleaned = 0.0952405 Jy
! Component: 150  -  total flux cleaned = 0.115666 Jy
! Component: 200  -  total flux cleaned = 0.128614 Jy
! Total flux subtracted in 200 components = 0.128614 Jy
! Clean residual min=-0.003249 max=0.006834 Jy/beam
! Clean residual mean=0.000435 rms=0.001026 Jy/beam
! Combined flux in latest and established models = 2.16329 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 68 components and 2.16329 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00841054 Jy
! Component: 100  -  total flux cleaned = 0.0144715 Jy
! Component: 150  -  total flux cleaned = 0.019218 Jy
! Component: 200  -  total flux cleaned = 0.0230831 Jy
! Total flux subtracted in 200 components = 0.0230831 Jy
! Clean residual min=-0.003009 max=0.003325 Jy/beam
! Clean residual mean=0.000249 rms=0.000790 Jy/beam
! Combined flux in latest and established models = 2.18637 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 98 components and 2.18637 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.102 mas, bmaj=8.318 mas, bpa=52.6 degrees
! Estimated noise=443.777 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00521816 Jy
! Component: 100  -  total flux cleaned = 0.00859559 Jy
! Component: 150  -  total flux cleaned = 0.0101261 Jy
! Component: 200  -  total flux cleaned = 0.0110392 Jy
! Total flux subtracted in 200 components = 0.0110392 Jy
! Clean residual min=-0.002375 max=0.004111 Jy/beam
! Clean residual mean=0.000479 rms=0.000976 Jy/beam
! Combined flux in latest and established models = 2.19741 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.000493822 Jy
! Component: 100  -  total flux cleaned = 0.000741233 Jy
! Component: 150  -  total flux cleaned = 0.000850967 Jy
! Component: 200  -  total flux cleaned = 0.00100054 Jy
! Total flux subtracted in 200 components = 0.00100054 Jy
! Clean residual min=-0.002388 max=0.004062 Jy/beam
! Clean residual mean=0.000453 rms=0.000950 Jy/beam
! Combined flux in latest and established models = 2.19841 Jy
! Adding 83 model components to the UV plane model.
! The established model now contains 170 components and 2.19841 Jy
! Inverting map 
! Added new window around map position (-13.5, -16).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00374449 Jy
! Component: 100  -  total flux cleaned = 0.00587259 Jy
! Component: 150  -  total flux cleaned = 0.0068711 Jy
! Component: 200  -  total flux cleaned = 0.00727272 Jy
! Total flux subtracted in 200 components = 0.00727272 Jy
! Clean residual min=-0.002368 max=0.003392 Jy/beam
! Clean residual mean=0.000298 rms=0.000846 Jy/beam
! Combined flux in latest and established models = 2.20568 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 203 components and 2.20568 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.092 mas, bmaj=3.262 mas, bpa=-37.87 degrees
! Estimated noise=329.082 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00171986 Jy
! Component: 100  -  total flux cleaned = -0.00213516 Jy
! Component: 150  -  total flux cleaned = -0.00203783 Jy
! Component: 200  -  total flux cleaned = -0.00185706 Jy
! Total flux subtracted in 200 components = -0.00185706 Jy
! Clean residual min=-0.002728 max=0.002970 Jy/beam
! Clean residual mean=0.000114 rms=0.000713 Jy/beam
! Combined flux in latest and established models = 2.20382 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 233 components and 2.20383 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.009829Jy  sigma=0.002311
! Fit after  self-cal, rms=1.009878Jy  sigma=0.002311
wmodel J1740+5211_S_1998_10_01_pus_map.mod
! Writing 233 model components to file: J1740+5211_S_1998_10_01_pus_map.mod
wobs J1740+5211_S_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1740+5211_S_1998_10_01_pus_uvs.fits
wwins J1740+5211_S_1998_10_01_pus_map.win
! wwins: Wrote 4 windows to J1740+5211_S_1998_10_01_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.000942467 Jy
! Component: 100  -  total flux cleaned = 0.00140415 Jy
! Component: 150  -  total flux cleaned = 0.00204062 Jy
! Component: 200  -  total flux cleaned = 0.00260861 Jy
! Component: 250  -  total flux cleaned = 0.00325372 Jy
! Component: 300  -  total flux cleaned = 0.00388125 Jy
! Component: 350  -  total flux cleaned = 0.00445028 Jy
! Component: 400  -  total flux cleaned = 0.00500842 Jy
! Component: 450  -  total flux cleaned = 0.00551466 Jy
! Component: 500  -  total flux cleaned = 0.005971 Jy
! Component: 550  -  total flux cleaned = 0.00633908 Jy
! Component: 600  -  total flux cleaned = 0.00678304 Jy
! Component: 650  -  total flux cleaned = 0.00718145 Jy
! Component: 700  -  total flux cleaned = 0.00745737 Jy
! Component: 750  -  total flux cleaned = 0.00773087 Jy
! Component: 800  -  total flux cleaned = 0.00800176 Jy
! Component: 850  -  total flux cleaned = 0.0082316 Jy
! Component: 900  -  total flux cleaned = 0.00845957 Jy
! Component: 950  -  total flux cleaned = 0.0086855 Jy
! Component: 1000  -  total flux cleaned = 0.0089098 Jy
! Component: 1050  -  total flux cleaned = 0.00909543 Jy
! Component: 1100  -  total flux cleaned = 0.00927975 Jy
! Component: 1150  -  total flux cleaned = 0.00946289 Jy
! Component: 1200  -  total flux cleaned = 0.0096082 Jy
! Component: 1250  -  total flux cleaned = 0.00971674 Jy
! Component: 1300  -  total flux cleaned = 0.00986055 Jy
! Component: 1350  -  total flux cleaned = 0.0100032 Jy
! Component: 1400  -  total flux cleaned = 0.0100036 Jy
! Component: 1450  -  total flux cleaned = 0.0102159 Jy
! Component: 1500  -  total flux cleaned = 0.0102508 Jy
! Component: 1550  -  total flux cleaned = 0.0103208 Jy
! Component: 1600  -  total flux cleaned = 0.0104255 Jy
! Component: 1650  -  total flux cleaned = 0.0104256 Jy
! Component: 1700  -  total flux cleaned = 0.0107018 Jy
! Component: 1750  -  total flux cleaned = 0.0107017 Jy
! Component: 1800  -  total flux cleaned = 0.0108042 Jy
! Component: 1850  -  total flux cleaned = 0.0108721 Jy
! Component: 1900  -  total flux cleaned = 0.0110073 Jy
! Component: 1950  -  total flux cleaned = 0.011041 Jy
! Component: 2000  -  total flux cleaned = 0.0111416 Jy
! Total flux subtracted in 2048 components = 0.011175 Jy
! Clean residual min=-0.001834 max=0.001897 Jy/beam
! Clean residual mean=0.000038 rms=0.000636 Jy/beam
! Combined flux in latest and established models = 2.215 Jy
keep
! Adding 148 model components to the UV plane model.
! The established model now contains 381 components and 2.215 Jy
![Exited script file: muppet]
wmap "J1740+5211_S_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.092 x 3.262 at -37.87 degrees (North through East)
! Clean map  min=-0.0025564  max=2.0164 Jy/beam
! Writing clean map to FITS file: J1740+5211_S_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 2.01636 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000635485 
device "J1740+5211_S_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1740+5211_S_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0945492 0.0945492 0.189098 0.378197 0.756393 1.51279 3.02557 6.05115 12.1023 24.2046 48.4092 96.8183
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 2.016 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.092 x 3.262 at -37.87 degrees (North through East)
! Clean map  min=-0.0025564  max=2.0164 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1740+5211_S_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1740+5211_S_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1740+5211_S_1998_10_01_pus_uvs.log closed on Thu Feb  7 17:25:12 2008