! Started logfile: J1640+3946_S_1999_05_10_pus_uvs.log on Tue Jan 22 12:57:07 2008
obs J1640+3946_S_1999_05_10_pus_uva.fits
! Reading UV FITS file: J1640+3946_S_1999_05_10_pus_uva.fits
! AN table 1: 255 integrations on 153 of 153 possible baselines.
! AN table 2: 224 integrations on 153 of 153 possible baselines.
! AN table 3: 88 integrations on 153 of 153 possible baselines.
! AN table 4: 12 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.148306 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1640+3946
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2003 lines of history.
! 
! Reading 52552 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 J1640+3946_S_1999_05_10_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 2598 telescope corrections were flagged in sub-array 1.
!  A total of 2955 telescope corrections were flagged in sub-array 2.
!  A total of 1120 telescope corrections were flagged in sub-array 3.
!  A total of 216 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 2601 telescope corrections were flagged in sub-array 1.
!  A total of 2955 telescope corrections were flagged in sub-array 2.
!  A total of 1120 telescope corrections were flagged in sub-array 3.
!  A total of 216 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 2603 telescope corrections were flagged in sub-array 1.
!  A total of 2958 telescope corrections were flagged in sub-array 2.
!  A total of 1120 telescope corrections were flagged in sub-array 3.
!  A total of 216 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 2681 telescope corrections were flagged in sub-array 1.
!  A total of 3050 telescope corrections were flagged in sub-array 2.
!  A total of 1120 telescope corrections were flagged in sub-array 3.
!  A total of 216 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.588906Jy  sigma=0.004068
! Fit after  self-cal, rms=0.292129Jy  sigma=0.002176
! 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.161 mas, bmaj=2.973 mas, bpa=-3.114 degrees
! Estimated noise=1082.05 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.662965 Jy
! Component: 100  -  total flux cleaned = 0.889777 Jy
! Total flux subtracted in 100 components = 0.889777 Jy
! Clean residual min=-0.028449 max=0.095173 Jy/beam
! Clean residual mean=0.000093 rms=0.007856 Jy/beam
! Combined flux in latest and established models = 0.889777 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 0.889777 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.307519Jy  sigma=0.002217
! Fit after  self-cal, rms=0.307379Jy  sigma=0.002216
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0997189 Jy
! Component: 100  -  total flux cleaned = 0.152251 Jy
! Total flux subtracted in 100 components = 0.152251 Jy
! Clean residual min=-0.026011 max=0.036850 Jy/beam
! Clean residual mean=0.000005 rms=0.005244 Jy/beam
! Combined flux in latest and established models = 1.04203 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 21 components and 1.04203 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.260596Jy  sigma=0.001652
! Fit after  self-cal, rms=0.260502Jy  sigma=0.001652
! Inverting map 
! Added new window around map position (-3, -5.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0367152 Jy
! Component: 100  -  total flux cleaned = 0.0542377 Jy
! Total flux subtracted in 100 components = 0.0542377 Jy
! Clean residual min=-0.025353 max=0.026357 Jy/beam
! Clean residual mean=-0.000020 rms=0.004807 Jy/beam
! Combined flux in latest and established models = 1.09627 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 30 components and 1.09627 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254785Jy  sigma=0.001573
! Fit after  self-cal, rms=0.254616Jy  sigma=0.001571
! 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.727 mas, bmaj=4.167 mas, bpa=12.44 degrees
! Estimated noise=411.373 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.0250458 Jy
! Component: 100  -  total flux cleaned = 0.033055 Jy
! Component: 150  -  total flux cleaned = 0.0351647 Jy
! Component: 200  -  total flux cleaned = 0.0362895 Jy
! Total flux subtracted in 200 components = 0.0362895 Jy
! Clean residual min=-0.014692 max=0.014980 Jy/beam
! Clean residual mean=-0.000983 rms=0.003017 Jy/beam
! Combined flux in latest and established models = 1.13256 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 39 components and 1.13256 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.252425Jy  sigma=0.001541
! Fit after  self-cal, rms=0.252418Jy  sigma=0.001541
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.99     GC        0.99     HH        1.00*    
!   HN        1.02     KK        1.00*    KP        0.95     LA        1.00     
!   MC        5.80     MK        1.00*    NL        0.99     NY        0.98     
!   ON        1.01     OV        1.04     PT        1.02     SC        1.00*    
!   WF        1.08     WZ        0.98     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.95     GC        1.02     HH        1.15     
!   HN        0.98     KK        1.13     KP        1.01     LA        0.98     
!   MC        1.14     MK        1.02     NL        0.96     NY        0.92     
!   ON        0.97     OV        1.01     PT        1.01     SC        1.02     
!   WF        0.98     WZ        0.94     
! 
!  A total of 93 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GC        1.01     HH        1.00*    
!   HN        1.00*    KK        0.98     KP        0.86     LA        0.97     
!   MC        1.00*    MK        0.95     NL        1.00*    NY        0.89     
!   ON        1.00*    OV        1.01     PT        0.99     SC        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 45 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.04     GC        0.96     HH        1.00*    
!   HN        1.00     KK        1.00*    KP        1.00     LA        0.98     
!   MC        1.01     MK        1.00*    NL        1.00     NY        0.98     
!   ON        1.10     OV        1.00     PT        1.00     SC        1.00*    
!   WF        1.09     WZ        1.00     
! 
!  A total of 150 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.99     GC        1.02     HH        1.09     
!   HN        0.99     KK        1.11     KP        0.98     LA        0.95     
!   MC        1.14     MK        1.14     NL        1.00     NY        0.92     
!   ON        0.98     OV        0.97     PT        1.01     SC        1.03     
!   WF        0.99     WZ        0.94     
! 
!  A total of 93 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GC        0.99     HH        1.00*    
!   HN        1.00*    KK        0.96     KP        0.93     LA        0.94     
!   MC        1.00*    MK        0.99     NL        1.00*    NY        0.89     
!   ON        1.00*    OV        0.99     PT        0.98     SC        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.02     GC        0.96     HH        1.00*    
!   HN        1.02     KK        1.00*    KP        0.98     LA        1.00     
!   MC        1.31     MK        1.00*    NL        1.01     NY        1.01     
!   ON        1.07     OV        0.99     PT        0.97     SC        1.00*    
!   WF        1.08     WZ        0.97     
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.97     GC        1.00     HH        1.06     
!   HN        0.98     KK        1.09     KP        0.97     LA        0.97     
!   MC        1.32     MK        1.08     NL        1.01     NY        0.95     
!   ON        0.99     OV        0.96     PT        0.97     SC        1.04     
!   WF        1.01     WZ        0.96     
! 
!  A total of 93 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GC        1.01     HH        1.00*    
!   HN        1.00*    KK        0.95     KP        1.01     LA        0.92     
!   MC        1.00*    MK        0.95     NL        1.00*    NY        0.91     
!   ON        1.00*    OV        0.96     PT        0.94     SC        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 225 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.01     GC        1.00     HH        1.00*    
!   HN        1.00     KK        1.00*    KP        0.96     LA        1.00     
!   MC        0.92     MK        1.00*    NL        1.02     NY        1.06     
!   ON        0.97     OV        0.93     PT        1.01     SC        1.00*    
!   WF        1.19     WZ        1.00*    
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        0.96     GC        1.03     HH        1.09     
!   HN        0.98     KK        1.08     KP        0.97     LA        1.00     
!   MC        1.25     MK        1.28     NL        1.02     NY        0.97     
!   ON        1.02     OV        0.93     PT        1.02     SC        1.05     
!   WF        1.00     WZ        1.00*    
! 
!  A total of 93 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        1.00*    GC        1.02     HH        1.00*    
!   HN        1.00*    KK        0.95     KP        1.07     LA        0.94     
!   MC        1.00*    MK        0.97     NL        1.00*    NY        0.93     
!   ON        1.00*    OV        0.93     PT        0.92     SC        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Fit before self-cal, rms=0.252418Jy  sigma=0.001541
! Fit after  self-cal, rms=0.251737Jy  sigma=0.001459
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.782 mas, bmaj=4.283 mas, bpa=18.22 degrees
! Estimated noise=417.376 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.00510322 Jy
! Component: 100  -  total flux cleaned = -0.00599192 Jy
! Component: 150  -  total flux cleaned = -0.00644183 Jy
! Component: 200  -  total flux cleaned = -0.00683182 Jy
! Total flux subtracted in 200 components = -0.00683182 Jy
! Clean residual min=-0.007923 max=0.008296 Jy/beam
! Clean residual mean=-0.000272 rms=0.001719 Jy/beam
! Combined flux in latest and established models = 1.12572 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 49 components and 1.12572 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.251355Jy  sigma=0.001457
! Fit after  self-cal, rms=0.251649Jy  sigma=0.001457
! 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.251649Jy  sigma=0.001457
! Fit after  self-cal, rms=0.251345Jy  sigma=0.001452
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.791 mas, bmaj=4.299 mas, bpa=19.16 degrees
! Estimated noise=417.593 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00255349 Jy
! Component: 100  -  total flux cleaned = -0.00312202 Jy
! Component: 150  -  total flux cleaned = -0.0033608 Jy
! Component: 200  -  total flux cleaned = -0.00346373 Jy
! Total flux subtracted in 200 components = -0.00346373 Jy
! Clean residual min=-0.007902 max=0.007558 Jy/beam
! Clean residual mean=-0.000141 rms=0.001590 Jy/beam
! Combined flux in latest and established models = 1.12226 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 54 components and 1.12226 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.251157Jy  sigma=0.001451
! Fit after  self-cal, rms=0.251160Jy  sigma=0.001451
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 (-11, 40).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00238027 Jy
! Component: 100  -  total flux cleaned = 0.00329454 Jy
! Component: 150  -  total flux cleaned = 0.00370206 Jy
! Component: 200  -  total flux cleaned = 0.0038846 Jy
! Total flux subtracted in 200 components = 0.0038846 Jy
! Clean residual min=-0.007176 max=0.006925 Jy/beam
! Clean residual mean=-0.000169 rms=0.001542 Jy/beam
! Combined flux in latest and established models = 1.12614 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 72 components and 1.12614 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.250753Jy  sigma=0.001447
! Fit after  self-cal, rms=0.250726Jy  sigma=0.001447
! 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.250726Jy  sigma=0.001447
! Fit after  self-cal, rms=0.250706Jy  sigma=0.001447
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.79 mas, bmaj=4.3 mas, bpa=19.06 degrees
! Estimated noise=417.368 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00103589 Jy
! Component: 100  -  total flux cleaned = 0.00103519 Jy
! Component: 150  -  total flux cleaned = 0.00086968 Jy
! Component: 200  -  total flux cleaned = 0.000877526 Jy
! Total flux subtracted in 200 components = 0.000877526 Jy
! Clean residual min=-0.007040 max=0.006707 Jy/beam
! Clean residual mean=-0.000108 rms=0.001515 Jy/beam
! Combined flux in latest and established models = 1.12702 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 81 components and 1.12702 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.250475Jy  sigma=0.001445
! Fit after  self-cal, rms=0.250463Jy  sigma=0.001445
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.000155505 Jy
! Component: 100  -  total flux cleaned = -0.00030042 Jy
! Component: 150  -  total flux cleaned = -0.00029614 Jy
! Component: 200  -  total flux cleaned = -0.000428985 Jy
! Total flux subtracted in 200 components = -0.000428985 Jy
! Clean residual min=-0.006963 max=0.006681 Jy/beam
! Clean residual mean=-0.000107 rms=0.001499 Jy/beam
! Combined flux in latest and established models = 1.12659 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 84 components and 1.12659 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.250295Jy  sigma=0.001443
! Fit after  self-cal, rms=0.250293Jy  sigma=0.001443
! 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.250293Jy  sigma=0.001443
! Fit after  self-cal, rms=0.249957Jy  sigma=0.001443
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.81 mas, bmaj=10.24 mas, bpa=54.55 degrees
! Estimated noise=501.239 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00191256 Jy
! Component: 100  -  total flux cleaned = -0.00210176 Jy
! Component: 150  -  total flux cleaned = -0.00225355 Jy
! Component: 200  -  total flux cleaned = -0.00224872 Jy
! Total flux subtracted in 200 components = -0.00224872 Jy
! Clean residual min=-0.005186 max=0.004857 Jy/beam
! Clean residual mean=-0.000173 rms=0.001427 Jy/beam
! Combined flux in latest and established models = 1.12434 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 92 components and 1.12434 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249902Jy  sigma=0.001443
! Fit after  self-cal, rms=0.249909Jy  sigma=0.001443
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.000194351 Jy
! Component: 100  -  total flux cleaned = 0.000126168 Jy
! Component: 150  -  total flux cleaned = 6.61212e-05 Jy
! Component: 200  -  total flux cleaned = 9.84995e-06 Jy
! Total flux subtracted in 200 components = 9.84995e-06 Jy
! Clean residual min=-0.005079 max=0.004817 Jy/beam
! Clean residual mean=-0.000172 rms=0.001427 Jy/beam
! Combined flux in latest and established models = 1.12435 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 95 components and 1.12435 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249901Jy  sigma=0.001443
! Fit after  self-cal, rms=0.249900Jy  sigma=0.001443
! 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.786 mas, bmaj=4.297 mas, bpa=18.71 degrees
! Estimated noise=416.989 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.786 x 4.297 at 18.71 degrees (North through East)
! Clean map  min=-0.0064016  max=0.98273 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.249900Jy  sigma=0.001443
! Fit after  self-cal, rms=0.241370Jy  sigma=0.001318
! Inverting map and beam 
! Estimated beam: bmin=3.785 mas, bmaj=4.294 mas, bpa=18.65 degrees
! Estimated noise=415.679 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00128629 Jy
! Component: 100  -  total flux cleaned = -0.00129084 Jy
! Component: 150  -  total flux cleaned = -0.0014169 Jy
! Component: 200  -  total flux cleaned = -0.00142051 Jy
! Total flux subtracted in 200 components = -0.00142051 Jy
! Clean residual min=-0.007069 max=0.006300 Jy/beam
! Clean residual mean=-0.000113 rms=0.001412 Jy/beam
! Combined flux in latest and established models = 1.12293 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 99 components and 1.12293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.241216Jy  sigma=0.001317
! Fit after  self-cal, rms=0.241228Jy  sigma=0.001317
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000388284 Jy
! Component: 100  -  total flux cleaned = -0.000390602 Jy
! Component: 150  -  total flux cleaned = -0.000501805 Jy
! Component: 200  -  total flux cleaned = -0.000503324 Jy
! Total flux subtracted in 200 components = -0.000503324 Jy
! Clean residual min=-0.007145 max=0.006275 Jy/beam
! Clean residual mean=-0.000111 rms=0.001401 Jy/beam
! Combined flux in latest and established models = 1.12243 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 103 components and 1.12243 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.241115Jy  sigma=0.001316
! Fit after  self-cal, rms=0.241130Jy  sigma=0.001316
! 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.241130Jy  sigma=0.001316
! Fit after  self-cal, rms=0.240941Jy  sigma=0.001316
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.227 mas, bmaj=2.967 mas, bpa=-2.713 degrees
! Estimated noise=1111.63 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.674102 Jy
! Component: 100  -  total flux cleaned = 0.896499 Jy
! Component: 150  -  total flux cleaned = 0.9911 Jy
! Component: 200  -  total flux cleaned = 1.04193 Jy
! Total flux subtracted in 200 components = 1.04193 Jy
! Clean residual min=-0.020015 max=0.032275 Jy/beam
! Clean residual mean=0.000037 rms=0.004311 Jy/beam
! Combined flux in latest and established models = 1.04193 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 21 model components to the UV plane model.
! The established model now contains 21 components and 1.04193 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.786 mas, bmaj=4.294 mas, bpa=18.72 degrees
! Estimated noise=415.293 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.0412973 Jy
! Component: 100  -  total flux cleaned = 0.0584473 Jy
! Component: 150  -  total flux cleaned = 0.0653566 Jy
! Component: 200  -  total flux cleaned = 0.0681537 Jy
! Total flux subtracted in 200 components = 0.0681537 Jy
! Clean residual min=-0.007606 max=0.008380 Jy/beam
! Clean residual mean=-0.000036 rms=0.001602 Jy/beam
! Combined flux in latest and established models = 1.11008 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 44 components and 1.11008 Jy
! Inverting map 
! Added new window around map position (-6.5, 3.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00320686 Jy
! Component: 100  -  total flux cleaned = 0.00456463 Jy
! Component: 150  -  total flux cleaned = 0.0055528 Jy
! Component: 200  -  total flux cleaned = 0.0062442 Jy
! Total flux subtracted in 200 components = 0.0062442 Jy
! Clean residual min=-0.006714 max=0.007469 Jy/beam
! Clean residual mean=-0.000070 rms=0.001465 Jy/beam
! Combined flux in latest and established models = 1.11633 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 62 components and 1.11633 Jy
! Inverting map 
! Added new window around map position (-5, -11.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00475162 Jy
! Component: 100  -  total flux cleaned = 0.004999 Jy
! Component: 150  -  total flux cleaned = 0.00543306 Jy
! Component: 200  -  total flux cleaned = 0.00583196 Jy
! Total flux subtracted in 200 components = 0.00583196 Jy
! Clean residual min=-0.005253 max=0.006859 Jy/beam
! Clean residual mean=-0.000100 rms=0.001390 Jy/beam
! Combined flux in latest and established models = 1.12216 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 82 components and 1.12216 Jy
! Inverting map 
! Added new window around map position (20.5, -37.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00294101 Jy
! Component: 100  -  total flux cleaned = 0.00294059 Jy
! Component: 150  -  total flux cleaned = 0.00275857 Jy
! Component: 200  -  total flux cleaned = 0.00276265 Jy
! Total flux subtracted in 200 components = 0.00276265 Jy
! Clean residual min=-0.004936 max=0.005563 Jy/beam
! Clean residual mean=-0.000120 rms=0.001332 Jy/beam
! Combined flux in latest and established models = 1.12492 Jy
! Adding 42 model components to the UV plane model.
! The established model now contains 99 components and 1.12492 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.81 mas, bmaj=10.24 mas, bpa=54.48 degrees
! Estimated noise=499.285 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00149958 Jy
! Component: 100  -  total flux cleaned = -0.0021509 Jy
! Component: 150  -  total flux cleaned = -0.00239733 Jy
! Component: 200  -  total flux cleaned = -0.0025502 Jy
! Total flux subtracted in 200 components = -0.0025502 Jy
! Clean residual min=-0.004270 max=0.004239 Jy/beam
! Clean residual mean=-0.000220 rms=0.001275 Jy/beam
! Combined flux in latest and established models = 1.12237 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.00014116 Jy
! Component: 100  -  total flux cleaned = -0.000274307 Jy
! Component: 150  -  total flux cleaned = -0.00046287 Jy
! Component: 200  -  total flux cleaned = -0.000641775 Jy
! Total flux subtracted in 200 components = -0.000641775 Jy
! Clean residual min=-0.004275 max=0.004291 Jy/beam
! Clean residual mean=-0.000212 rms=0.001260 Jy/beam
! Combined flux in latest and established models = 1.12173 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 142 components and 1.12173 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.786 mas, bmaj=4.294 mas, bpa=18.72 degrees
! Estimated noise=415.293 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000913009 Jy
! Component: 100  -  total flux cleaned = 0.00108366 Jy
! Component: 150  -  total flux cleaned = 0.000925234 Jy
! Component: 200  -  total flux cleaned = 0.00123905 Jy
! Total flux subtracted in 200 components = 0.00123905 Jy
! Clean residual min=-0.004880 max=0.005253 Jy/beam
! Clean residual mean=-0.000107 rms=0.001273 Jy/beam
! Combined flux in latest and established models = 1.12297 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 153 components and 1.12297 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.240684Jy  sigma=0.001311
! Fit after  self-cal, rms=0.240655Jy  sigma=0.001311
wmodel J1640+3946_S_1999_05_10_pus_map.mod
! Writing 153 model components to file: J1640+3946_S_1999_05_10_pus_map.mod
wobs J1640+3946_S_1999_05_10_pus_uvs.fits
! Writing UV FITS file: J1640+3946_S_1999_05_10_pus_uvs.fits
wwins J1640+3946_S_1999_05_10_pus_map.win
! wwins: Wrote 6 windows to J1640+3946_S_1999_05_10_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.00071566 Jy
! Component: 100  -  total flux cleaned = 0.00196428 Jy
! Component: 150  -  total flux cleaned = 0.00264926 Jy
! Component: 200  -  total flux cleaned = 0.00289609 Jy
! Component: 250  -  total flux cleaned = 0.00329586 Jy
! Component: 300  -  total flux cleaned = 0.00360808 Jy
! Component: 350  -  total flux cleaned = 0.00376188 Jy
! Component: 400  -  total flux cleaned = 0.0040616 Jy
! Component: 450  -  total flux cleaned = 0.00435393 Jy
! Component: 500  -  total flux cleaned = 0.00435505 Jy
! Component: 550  -  total flux cleaned = 0.00471079 Jy
! Component: 600  -  total flux cleaned = 0.00485048 Jy
! Component: 650  -  total flux cleaned = 0.00485129 Jy
! Component: 700  -  total flux cleaned = 0.00491972 Jy
! Component: 750  -  total flux cleaned = 0.00498683 Jy
! Component: 800  -  total flux cleaned = 0.00492088 Jy
! Component: 850  -  total flux cleaned = 0.00498647 Jy
! Component: 900  -  total flux cleaned = 0.00498595 Jy
! Component: 950  -  total flux cleaned = 0.00492108 Jy
! Component: 1000  -  total flux cleaned = 0.00498483 Jy
! Component: 1050  -  total flux cleaned = 0.00492217 Jy
! Component: 1100  -  total flux cleaned = 0.00498421 Jy
! Component: 1150  -  total flux cleaned = 0.0048596 Jy
! Component: 1200  -  total flux cleaned = 0.00479771 Jy
! Component: 1250  -  total flux cleaned = 0.00485884 Jy
! Component: 1300  -  total flux cleaned = 0.00473668 Jy
! Component: 1350  -  total flux cleaned = 0.00473609 Jy
! Component: 1400  -  total flux cleaned = 0.00461587 Jy
! Component: 1450  -  total flux cleaned = 0.00449672 Jy
! Component: 1500  -  total flux cleaned = 0.00437863 Jy
! Component: 1550  -  total flux cleaned = 0.00437826 Jy
! Component: 1600  -  total flux cleaned = 0.00426116 Jy
! Component: 1650  -  total flux cleaned = 0.00408756 Jy
! Component: 1700  -  total flux cleaned = 0.00397241 Jy
! Component: 1750  -  total flux cleaned = 0.00385803 Jy
! Component: 1800  -  total flux cleaned = 0.00391512 Jy
! Component: 1850  -  total flux cleaned = 0.00374545 Jy
! Component: 1900  -  total flux cleaned = 0.00363339 Jy
! Component: 1950  -  total flux cleaned = 0.00346617 Jy
! Component: 2000  -  total flux cleaned = 0.00352187 Jy
! Total flux subtracted in 2048 components = 0.00335632 Jy
! Clean residual min=-0.002992 max=0.002849 Jy/beam
! Clean residual mean=-0.000099 rms=0.000999 Jy/beam
! Combined flux in latest and established models = 1.12633 Jy
keep
! Adding 112 model components to the UV plane model.
! The established model now contains 260 components and 1.12633 Jy
![Exited script file: muppet]
wmap "J1640+3946_S_1999_05_10_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.786 x 4.294 at 18.72 degrees (North through East)
! Clean map  min=-0.0071572  max=0.98008 Jy/beam
! Writing clean map to FITS file: J1640+3946_S_1999_05_10_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.980081 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000998712 
device "J1640+3946_S_1999_05_10_pus\_map.eps/VPS"
! Attempting to open device: 'J1640+3946_S_1999_05_10_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.305703 0.305703 0.611406 1.22281 2.44562 4.89125 9.78249 19.565 39.13 78.2599
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0029 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.98 
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.786 x 4.294 at 18.72 degrees (North through East)
! Clean map  min=-0.0071572  max=0.98008 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1640+3946_S_1999_05_10_pus\_map.gif/vgif"
! Attempting to open device: 'J1640+3946_S_1999_05_10_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1640+3946_S_1999_05_10_pus_uvs.log closed on Tue Jan 22 12:57:30 2008