! Started logfile: J1740+5211_S_1999_12_20_pus_uvs.log on Thu Dec 20 15:26:50 2007
obs J1740+5211_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J1740+5211_S_1999_12_20_pus_uva.fits
! AN table 1: 307 integrations on 190 of 190 possible baselines.
! AN table 2: 111 integrations on 190 of 190 possible baselines.
! AN table 3: 339 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.230049 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.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 2298 lines of history.
! 
! Reading 132352 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_1999_12_20_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 3268 telescope corrections were flagged in sub-array 1.
!  A total of 1458 telescope corrections were flagged in sub-array 2.
!  A total of 4053 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 3268 telescope corrections were flagged in sub-array 1.
!  A total of 1458 telescope corrections were flagged in sub-array 2.
!  A total of 4053 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 3473 telescope corrections were flagged in sub-array 1.
!  A total of 1507 telescope corrections were flagged in sub-array 2.
!  A total of 4194 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 3268 telescope corrections were flagged in sub-array 1.
!  A total of 1458 telescope corrections were flagged in sub-array 2.
!  A total of 4051 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.933536Jy  sigma=0.006799
! Fit after  self-cal, rms=0.533070Jy  sigma=0.003625
! 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.933 mas, bmaj=2.384 mas, bpa=5.663 degrees
! Estimated noise=573.394 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.406505 Jy
! Component: 100  -  total flux cleaned = 0.500877 Jy
! Total flux subtracted in 100 components = 0.500877 Jy
! Clean residual min=-0.007358 max=0.037867 Jy/beam
! Clean residual mean=0.000078 rms=0.002299 Jy/beam
! Combined flux in latest and established models = 0.500877 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 10 components and 0.500877 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.307859Jy  sigma=0.001727
! Fit after  self-cal, rms=0.307816Jy  sigma=0.001727
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0467252 Jy
! Component: 100  -  total flux cleaned = 0.0794487 Jy
! Total flux subtracted in 100 components = 0.0794487 Jy
! Clean residual min=-0.006654 max=0.018599 Jy/beam
! Clean residual mean=0.000054 rms=0.001752 Jy/beam
! Combined flux in latest and established models = 0.580326 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 24 components and 0.580326 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.294799Jy  sigma=0.001549
! Fit after  self-cal, rms=0.294654Jy  sigma=0.001549
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.024269 Jy
! Component: 100  -  total flux cleaned = 0.0421457 Jy
! Total flux subtracted in 100 components = 0.0421457 Jy
! Clean residual min=-0.006424 max=0.013084 Jy/beam
! Clean residual mean=0.000042 rms=0.001564 Jy/beam
! Combined flux in latest and established models = 0.622472 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 27 components and 0.622472 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290810Jy  sigma=0.001489
! Fit after  self-cal, rms=0.290715Jy  sigma=0.001489
! Inverting map 
! Added new window around map position (-1, 3.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0148925 Jy
! Component: 100  -  total flux cleaned = 0.0262542 Jy
! Total flux subtracted in 100 components = 0.0262542 Jy
! Clean residual min=-0.006024 max=0.009115 Jy/beam
! Clean residual mean=0.000035 rms=0.001481 Jy/beam
! Combined flux in latest and established models = 0.648726 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 35 components and 0.648726 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289234Jy  sigma=0.001464
! Fit after  self-cal, rms=0.289142Jy  sigma=0.001463
! Inverting map 
! Added new window around map position (2.5, 2.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0105065 Jy
! Component: 100  -  total flux cleaned = 0.0188177 Jy
! Total flux subtracted in 100 components = 0.0188177 Jy
! Clean residual min=-0.005671 max=0.006909 Jy/beam
! Clean residual mean=0.000030 rms=0.001435 Jy/beam
! Combined flux in latest and established models = 0.667544 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 41 components and 0.667544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.288427Jy  sigma=0.001451
! Fit after  self-cal, rms=0.288375Jy  sigma=0.001451
! 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.33 mas, bmaj=2.979 mas, bpa=14.09 degrees
! Estimated noise=275.263 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.01483 Jy
! Component: 100  -  total flux cleaned = 0.0241171 Jy
! Component: 150  -  total flux cleaned = 0.0303122 Jy
! Component: 200  -  total flux cleaned = 0.034573 Jy
! Total flux subtracted in 200 components = 0.034573 Jy
! Clean residual min=-0.004465 max=0.006385 Jy/beam
! Clean residual mean=0.000163 rms=0.001185 Jy/beam
! Combined flux in latest and established models = 0.702117 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 69 components and 0.702116 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287740Jy  sigma=0.001438
! Fit after  self-cal, rms=0.287643Jy  sigma=0.001437
! Inverting map 
! Added new window around map position (0, 8.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0065422 Jy
! Component: 100  -  total flux cleaned = 0.0103778 Jy
! Component: 150  -  total flux cleaned = 0.012198 Jy
! Component: 200  -  total flux cleaned = 0.013013 Jy
! Total flux subtracted in 200 components = 0.013013 Jy
! Clean residual min=-0.004476 max=0.004466 Jy/beam
! Clean residual mean=0.000075 rms=0.001119 Jy/beam
! Combined flux in latest and established models = 0.715129 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 83 components and 0.71513 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287491Jy  sigma=0.001435
! Fit after  self-cal, rms=0.287472Jy  sigma=0.001434
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 81 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.01     GC        1.04     HH        1.00*    
!   HN        0.95     KK        1.00     KP        1.06     LA        1.03     
!   MC        1.00     MK        0.97     NY        1.00     ON        0.98     
!   OV        1.02     PT        1.03     SC        1.07     TS        1.01     
!   WF        1.03     WZ        0.98     GN        0.97     NL        0.99     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.03     GC        1.01     HH        1.00*    
!   HN        0.95     KK        1.00*    KP        1.19     LA        1.02     
!   MC        1.04     MK        1.00*    NY        1.01     ON        1.01     
!   OV        1.04     PT        1.05     SC        1.05     TS        0.96     
!   WF        1.01     WZ        0.92     GN        1.00*    NL        1.00     
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        0.96     GC        1.00     HH        1.00*    
!   HN        0.93     KK        1.00     KP        0.95     LA        0.97     
!   MC        1.13     MK        0.99     NY        0.96     ON        1.03     
!   OV        0.97     PT        0.97     SC        1.03     TS        1.05     
!   WF        1.00     WZ        1.02     GN        0.94     NL        0.95     
! 
! 
! Correcting IF 2.
!  A total of 81 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.07     GC        1.05     HH        1.00*    
!   HN        1.04     KK        0.98     KP        1.04     LA        1.00     
!   MC        1.19     MK        0.96     NY        0.99     ON        0.99     
!   OV        0.99     PT        1.03     SC        1.09     TS        1.02     
!   WF        1.02     WZ        1.03     GN        0.99     NL        1.01     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.08     GC        1.00     HH        1.00*    
!   HN        1.01     KK        1.00*    KP        1.10     LA        1.00     
!   MC        0.84     MK        1.00*    NY        1.02     ON        0.99     
!   OV        1.03     PT        1.00     SC        1.03     TS        1.05     
!   WF        1.02     WZ        1.00     GN        1.00*    NL        1.00     
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.01     GC        0.98     HH        1.00*    
!   HN        1.01     KK        0.96     KP        0.97     LA        0.94     
!   MC        1.09     MK        0.98     NY        0.97     ON        1.01     
!   OV        0.94     PT        0.95     SC        1.05     TS        1.06     
!   WF        1.01     WZ        1.07     GN        0.97     NL        0.95     
! 
! 
! Correcting IF 3.
!  A total of 75 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.04     GC        1.06     HH        1.00*    
!   HN        1.00     KK        1.02     KP        1.04     LA        1.04     
!   MC        1.00*    MK        0.93     NY        1.01     ON        1.02     
!   OV        1.03     PT        0.98     SC        1.12     TS        0.98     
!   WF        1.05     WZ        1.06     GN        1.00     NL        0.99     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.06     GC        1.03     HH        1.00*    
!   HN        1.00     KK        1.00*    KP        1.07     LA        1.04     
!   MC        1.00*    MK        1.00*    NY        1.00     ON        1.00     
!   OV        1.05     PT        0.91     SC        1.07     TS        0.95     
!   WF        1.01     WZ        1.00     GN        1.00*    NL        1.00     
! 
!  A total of 51 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        0.99     GC        1.01     HH        1.00*    
!   HN        0.97     KK        1.01     KP        0.96     LA        0.98     
!   MC        1.00*    MK        0.99     NY        0.98     ON        0.98     
!   OV        0.98     PT        0.94     SC        1.07     TS        1.03     
!   WF        0.99     WZ        1.09     GN        0.99     NL        0.95     
! 
! 
! Correcting IF 4.
!  A total of 81 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.03     GC        1.06     HH        1.00*    
!   HN        0.99     KK        1.04     KP        1.03     LA        1.04     
!   MC        0.83     MK        1.00     NY        1.01     ON        0.96     
!   OV        1.00     PT        0.97     SC        1.13     TS        1.01     
!   WF        1.06     WZ        1.05     GN        0.99     NL        0.99     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.06     GC        1.02     HH        1.00*    
!   HN        1.00     KK        1.00*    KP        1.08     LA        1.03     
!   MC        1.02     MK        1.00*    NY        1.00     ON        1.07     
!   OV        1.01     PT        0.80     SC        1.08     TS        0.95     
!   WF        1.11     WZ        0.99     GN        1.00*    NL        1.00     
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        0.98     GC        1.01     HH        1.00*    
!   HN        0.98     KK        0.99     KP        0.98     LA        0.97     
!   MC        0.94     MK        1.03     NY        0.97     ON        1.00     
!   OV        0.96     PT        1.01     SC        1.08     TS        1.06     
!   WF        1.02     WZ        1.10     GN        0.99     NL        0.95     
! 
! 
! Fit before self-cal, rms=0.287472Jy  sigma=0.001434
! Fit after  self-cal, rms=0.289092Jy  sigma=0.001404
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.345 mas, bmaj=2.991 mas, bpa=14.27 degrees
! Estimated noise=276.622 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.000387074 Jy
! Component: 100  -  total flux cleaned = 0.000992052 Jy
! Component: 150  -  total flux cleaned = 0.00140906 Jy
! Component: 200  -  total flux cleaned = 0.00171772 Jy
! Total flux subtracted in 200 components = 0.00171772 Jy
! Clean residual min=-0.003347 max=0.003963 Jy/beam
! Clean residual mean=0.000079 rms=0.000826 Jy/beam
! Combined flux in latest and established models = 0.716847 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 97 components and 0.716847 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289048Jy  sigma=0.001404
! Fit after  self-cal, rms=0.289155Jy  sigma=0.001403
! 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.289155Jy  sigma=0.001403
! Fit after  self-cal, rms=0.281354Jy  sigma=0.001374
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.35 mas, bmaj=2.999 mas, bpa=13.5 degrees
! Estimated noise=276.713 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00202946 Jy
! Component: 100  -  total flux cleaned = -0.00202684 Jy
! Component: 150  -  total flux cleaned = -0.00208533 Jy
! Component: 200  -  total flux cleaned = -0.00208333 Jy
! Total flux subtracted in 200 components = -0.00208333 Jy
! Clean residual min=-0.001824 max=0.002184 Jy/beam
! Clean residual mean=0.000113 rms=0.000503 Jy/beam
! Combined flux in latest and established models = 0.714764 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 107 components and 0.714764 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281317Jy  sigma=0.001374
! Fit after  self-cal, rms=0.281441Jy  sigma=0.001374
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 (1.5, 14.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00164472 Jy
! Component: 100  -  total flux cleaned = 0.00195029 Jy
! Component: 150  -  total flux cleaned = 0.00215938 Jy
! Component: 200  -  total flux cleaned = 0.00220575 Jy
! Total flux subtracted in 200 components = 0.00220575 Jy
! Clean residual min=-0.001846 max=0.002005 Jy/beam
! Clean residual mean=0.000098 rms=0.000498 Jy/beam
! Combined flux in latest and established models = 0.71697 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 123 components and 0.71697 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281413Jy  sigma=0.001373
! Fit after  self-cal, rms=0.281412Jy  sigma=0.001373
! 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.281412Jy  sigma=0.001373
! Fit after  self-cal, rms=0.281782Jy  sigma=0.001371
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.353 mas, bmaj=3.004 mas, bpa=13.38 degrees
! Estimated noise=276.802 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00144435 Jy
! Component: 100  -  total flux cleaned = -0.00132919 Jy
! Component: 150  -  total flux cleaned = -0.00127632 Jy
! Component: 200  -  total flux cleaned = -0.00127639 Jy
! Total flux subtracted in 200 components = -0.00127639 Jy
! Clean residual min=-0.001739 max=0.002200 Jy/beam
! Clean residual mean=0.000105 rms=0.000474 Jy/beam
! Combined flux in latest and established models = 0.715693 Jy
selfcal
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 130 components and 0.715693 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281762Jy  sigma=0.001371
! Fit after  self-cal, rms=0.281780Jy  sigma=0.001371
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 (5, 8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000965339 Jy
! Component: 100  -  total flux cleaned = 0.000965824 Jy
! Component: 150  -  total flux cleaned = 0.000966688 Jy
! Component: 200  -  total flux cleaned = 0.00100972 Jy
! Total flux subtracted in 200 components = 0.00100972 Jy
! Clean residual min=-0.001749 max=0.001914 Jy/beam
! Clean residual mean=0.000098 rms=0.000467 Jy/beam
! Combined flux in latest and established models = 0.716703 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 136 components and 0.716703 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281766Jy  sigma=0.001371
! Fit after  self-cal, rms=0.281763Jy  sigma=0.001371
! 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.281763Jy  sigma=0.001371
! Fit after  self-cal, rms=0.281900Jy  sigma=0.001371
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.189 mas, bmaj=8.901 mas, bpa=89.28 degrees
! Estimated noise=426.047 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000914554 Jy
! Component: 100  -  total flux cleaned = 0.00130124 Jy
! Component: 150  -  total flux cleaned = 0.00154723 Jy
! Component: 200  -  total flux cleaned = 0.00164348 Jy
! Total flux subtracted in 200 components = 0.00164348 Jy
! Clean residual min=-0.001811 max=0.003090 Jy/beam
! Clean residual mean=0.000284 rms=0.000841 Jy/beam
! Combined flux in latest and established models = 0.718347 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 144 components and 0.718347 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281900Jy  sigma=0.001371
! Fit after  self-cal, rms=0.281900Jy  sigma=0.001371
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.000450859 Jy
! Component: 100  -  total flux cleaned = 0.000590467 Jy
! Component: 150  -  total flux cleaned = 0.00064407 Jy
! Component: 200  -  total flux cleaned = 0.000688496 Jy
! Total flux subtracted in 200 components = 0.000688496 Jy
! Clean residual min=-0.001824 max=0.002929 Jy/beam
! Clean residual mean=0.000267 rms=0.000834 Jy/beam
! Combined flux in latest and established models = 0.719035 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 150 components and 0.719035 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281901Jy  sigma=0.001371
! Fit after  self-cal, rms=0.281899Jy  sigma=0.001371
! 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.354 mas, bmaj=3.007 mas, bpa=13.32 degrees
! Estimated noise=276.78 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.354 x 3.007 at 13.32 degrees (North through East)
! Clean map  min=-0.0014915  max=0.55244 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.281899Jy  sigma=0.001371
! Fit after  self-cal, rms=0.564521Jy  sigma=0.001268
! Inverting map and beam 
! Estimated beam: bmin=2.354 mas, bmaj=3.008 mas, bpa=13.44 degrees
! Estimated noise=276.849 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000234384 Jy
! Component: 100  -  total flux cleaned = -0.000618815 Jy
! Component: 150  -  total flux cleaned = -0.000702085 Jy
! Component: 200  -  total flux cleaned = -0.00077712 Jy
! Total flux subtracted in 200 components = -0.00077712 Jy
! Clean residual min=-0.001563 max=0.002239 Jy/beam
! Clean residual mean=0.000088 rms=0.000418 Jy/beam
! Combined flux in latest and established models = 0.718258 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 154 components and 0.718258 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.564490Jy  sigma=0.001268
! Fit after  self-cal, rms=0.564496Jy  sigma=0.001268
! Inverting map 
! Added new window around map position (-7, 2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00118257 Jy
! Component: 100  -  total flux cleaned = 0.000978531 Jy
! Component: 150  -  total flux cleaned = 0.000791795 Jy
! Component: 200  -  total flux cleaned = 0.000652667 Jy
! Total flux subtracted in 200 components = 0.000652667 Jy
! Clean residual min=-0.001566 max=0.001727 Jy/beam
! Clean residual mean=0.000083 rms=0.000413 Jy/beam
! Combined flux in latest and established models = 0.718911 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 164 components and 0.718911 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.564470Jy  sigma=0.001268
! Fit after  self-cal, rms=0.564469Jy  sigma=0.001268
! 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.564469Jy  sigma=0.001268
! Fit after  self-cal, rms=0.688850Jy  sigma=0.001268
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.944 mas, bmaj=2.412 mas, bpa=4.8 degrees
! Estimated noise=579.827 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.410337 Jy
! Component: 100  -  total flux cleaned = 0.504174 Jy
! Component: 150  -  total flux cleaned = 0.547063 Jy
! Component: 200  -  total flux cleaned = 0.577098 Jy
! Total flux subtracted in 200 components = 0.577098 Jy
! Clean residual min=-0.004279 max=0.017080 Jy/beam
! Clean residual mean=0.000046 rms=0.001266 Jy/beam
! Combined flux in latest and established models = 0.577098 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 30 model components to the UV plane model.
! The established model now contains 30 components and 0.577098 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.355 mas, bmaj=3.009 mas, bpa=13.45 degrees
! Estimated noise=277.281 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.0454777 Jy
! Component: 100  -  total flux cleaned = 0.0718598 Jy
! Component: 150  -  total flux cleaned = 0.0889223 Jy
! Component: 200  -  total flux cleaned = 0.10056 Jy
! Total flux subtracted in 200 components = 0.10056 Jy
! Clean residual min=-0.001723 max=0.006421 Jy/beam
! Clean residual mean=0.000369 rms=0.000865 Jy/beam
! Combined flux in latest and established models = 0.677659 Jy
! Adding 61 model components to the UV plane model.
! The established model now contains 75 components and 0.677659 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0081754 Jy
! Component: 100  -  total flux cleaned = 0.0144074 Jy
! Component: 150  -  total flux cleaned = 0.0193525 Jy
! Component: 200  -  total flux cleaned = 0.0233367 Jy
! Total flux subtracted in 200 components = 0.0233367 Jy
! Clean residual min=-0.001540 max=0.002655 Jy/beam
! Clean residual mean=0.000210 rms=0.000521 Jy/beam
! Combined flux in latest and established models = 0.700995 Jy
! Adding 52 model components to the UV plane model.
! The established model now contains 111 components and 0.700995 Jy
! Inverting map 
! Added new window around map position (-4, 12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00332042 Jy
! Component: 100  -  total flux cleaned = 0.0060764 Jy
! Component: 150  -  total flux cleaned = 0.00838404 Jy
! Component: 200  -  total flux cleaned = 0.0103273 Jy
! Total flux subtracted in 200 components = 0.0103273 Jy
! Clean residual min=-0.001623 max=0.001907 Jy/beam
! Clean residual mean=0.000139 rms=0.000438 Jy/beam
! Combined flux in latest and established models = 0.711323 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 126 components and 0.711323 Jy
! Inverting map 
! Added new window around map position (20, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00188689 Jy
! Component: 100  -  total flux cleaned = 0.00338601 Jy
! Component: 150  -  total flux cleaned = 0.00464497 Jy
! Component: 200  -  total flux cleaned = 0.00548687 Jy
! Total flux subtracted in 200 components = 0.00548687 Jy
! Clean residual min=-0.001682 max=0.001620 Jy/beam
! Clean residual mean=0.000101 rms=0.000416 Jy/beam
! Combined flux in latest and established models = 0.71681 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 145 components and 0.71681 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.191 mas, bmaj=8.905 mas, bpa=88.94 degrees
! Estimated noise=426.192 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00218427 Jy
! Component: 100  -  total flux cleaned = 0.00345314 Jy
! Component: 150  -  total flux cleaned = 0.00393461 Jy
! Component: 200  -  total flux cleaned = 0.0042724 Jy
! Total flux subtracted in 200 components = 0.0042724 Jy
! Clean residual min=-0.001662 max=0.002391 Jy/beam
! Clean residual mean=0.000251 rms=0.000670 Jy/beam
! Combined flux in latest and established models = 0.721082 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.000249803 Jy
! Component: 100  -  total flux cleaned = 0.00037354 Jy
! Component: 150  -  total flux cleaned = 0.000450284 Jy
! Component: 200  -  total flux cleaned = 0.000518422 Jy
! Total flux subtracted in 200 components = 0.000518422 Jy
! Clean residual min=-0.001659 max=0.002310 Jy/beam
! Clean residual mean=0.000238 rms=0.000664 Jy/beam
! Combined flux in latest and established models = 0.7216 Jy
! Adding 54 model components to the UV plane model.
! The established model now contains 190 components and 0.7216 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.355 mas, bmaj=3.009 mas, bpa=13.45 degrees
! Estimated noise=277.281 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00104828 Jy
! Component: 100  -  total flux cleaned = -0.00124638 Jy
! Component: 150  -  total flux cleaned = -0.00121001 Jy
! Component: 200  -  total flux cleaned = -0.00117699 Jy
! Total flux subtracted in 200 components = -0.00117699 Jy
! Clean residual min=-0.001683 max=0.001558 Jy/beam
! Clean residual mean=0.000075 rms=0.000402 Jy/beam
! Combined flux in latest and established models = 0.720423 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 199 components and 0.720423 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.688799Jy  sigma=0.001268
! Fit after  self-cal, rms=0.688800Jy  sigma=0.001268
wmodel J1740+5211_S_1999_12_20_pus_map.mod
! Writing 199 model components to file: J1740+5211_S_1999_12_20_pus_map.mod
wobs J1740+5211_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J1740+5211_S_1999_12_20_pus_uvs.fits
wwins J1740+5211_S_1999_12_20_pus_map.win
! wwins: Wrote 9 windows to J1740+5211_S_1999_12_20_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.000196032 Jy
! Component: 100  -  total flux cleaned = 0.00055146 Jy
! Component: 150  -  total flux cleaned = 0.000891836 Jy
! Component: 200  -  total flux cleaned = 0.00122367 Jy
! Component: 250  -  total flux cleaned = 0.00152416 Jy
! Component: 300  -  total flux cleaned = 0.00177083 Jy
! Component: 350  -  total flux cleaned = 0.00206252 Jy
! Component: 400  -  total flux cleaned = 0.00235008 Jy
! Component: 450  -  total flux cleaned = 0.00260997 Jy
! Component: 500  -  total flux cleaned = 0.00286665 Jy
! Component: 550  -  total flux cleaned = 0.00312001 Jy
! Component: 600  -  total flux cleaned = 0.00339316 Jy
! Component: 650  -  total flux cleaned = 0.00357322 Jy
! Component: 700  -  total flux cleaned = 0.00377389 Jy
! Component: 750  -  total flux cleaned = 0.00395065 Jy
! Component: 800  -  total flux cleaned = 0.00412581 Jy
! Component: 850  -  total flux cleaned = 0.00429921 Jy
! Component: 900  -  total flux cleaned = 0.0044067 Jy
! Component: 950  -  total flux cleaned = 0.00455595 Jy
! Component: 1000  -  total flux cleaned = 0.00472513 Jy
! Component: 1050  -  total flux cleaned = 0.00493478 Jy
! Component: 1100  -  total flux cleaned = 0.00501799 Jy
! Component: 1150  -  total flux cleaned = 0.00516288 Jy
! Component: 1200  -  total flux cleaned = 0.00538891 Jy
! Component: 1250  -  total flux cleaned = 0.00547043 Jy
! Component: 1300  -  total flux cleaned = 0.00561245 Jy
! Component: 1350  -  total flux cleaned = 0.0057737 Jy
! Component: 1400  -  total flux cleaned = 0.00589391 Jy
! Component: 1450  -  total flux cleaned = 0.00601344 Jy
! Component: 1500  -  total flux cleaned = 0.00615189 Jy
! Component: 1550  -  total flux cleaned = 0.00628956 Jy
! Component: 1600  -  total flux cleaned = 0.00636784 Jy
! Component: 1650  -  total flux cleaned = 0.00646516 Jy
! Component: 1700  -  total flux cleaned = 0.00660076 Jy
! Component: 1750  -  total flux cleaned = 0.00667783 Jy
! Component: 1800  -  total flux cleaned = 0.00683105 Jy
! Component: 1850  -  total flux cleaned = 0.00694537 Jy
! Component: 1900  -  total flux cleaned = 0.0069832 Jy
! Component: 1950  -  total flux cleaned = 0.00709644 Jy
! Component: 2000  -  total flux cleaned = 0.00719047 Jy
! Total flux subtracted in 2048 components = 0.00720918 Jy
! Clean residual min=-0.000945 max=0.001116 Jy/beam
! Clean residual mean=0.000027 rms=0.000354 Jy/beam
! Combined flux in latest and established models = 0.727633 Jy
keep
! Adding 166 model components to the UV plane model.
! The established model now contains 365 components and 0.727633 Jy
![Exited script file: muppet]
wmap "J1740+5211_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.355 x 3.009 at 13.45 degrees (North through East)
! Clean map  min=-0.0014933  max=0.55449 Jy/beam
! Writing clean map to FITS file: J1740+5211_S_1999_12_20_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.554492 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000354518 
device "J1740+5211_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J1740+5211_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.191807 0.191807 0.383613 0.767227 1.53445 3.06891 6.13782 12.2756 24.5513 49.1025 98.2051
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.554 
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.355 x 3.009 at 13.45 degrees (North through East)
! Clean map  min=-0.0014933  max=0.55449 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1740+5211_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J1740+5211_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1740+5211_S_1999_12_20_pus_uvs.log closed on Thu Dec 20 15:28:17 2007