! Started logfile: J1310+3220_S_1999_12_20_pus_uvs.log on Thu Dec 20 15:15:28 2007
obs J1310+3220_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J1310+3220_S_1999_12_20_pus_uva.fits
! AN table 1: 53 integrations on 190 of 190 possible baselines.
! AN table 2: 82 integrations on 190 of 190 possible baselines.
! AN table 3: 58 integrations on 190 of 190 possible baselines.
! AN table 4: 442 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.126564 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1310+3220
! 
! 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 61080 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 J1310+3220_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 813 telescope corrections were flagged in sub-array 1.
!  A total of 1242 telescope corrections were flagged in sub-array 2.
!  A total of 861 telescope corrections were flagged in sub-array 3.
!  A total of 6416 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 813 telescope corrections were flagged in sub-array 1.
!  A total of 1242 telescope corrections were flagged in sub-array 2.
!  A total of 861 telescope corrections were flagged in sub-array 3.
!  A total of 6415 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 825 telescope corrections were flagged in sub-array 1.
!  A total of 1242 telescope corrections were flagged in sub-array 2.
!  A total of 861 telescope corrections were flagged in sub-array 3.
!  A total of 6597 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 816 telescope corrections were flagged in sub-array 1.
!  A total of 1242 telescope corrections were flagged in sub-array 2.
!  A total of 861 telescope corrections were flagged in sub-array 3.
!  A total of 6414 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.319208Jy  sigma=0.009799
! Fit after  self-cal, rms=0.741478Jy  sigma=0.004877
! 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.874 mas, bmaj=3.098 mas, bpa=-2.744 degrees
! Estimated noise=739.818 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.971562 Jy
! Component: 100  -  total flux cleaned = 1.32875 Jy
! Total flux subtracted in 100 components = 1.32875 Jy
! Clean residual min=-0.025068 max=0.163416 Jy/beam
! Clean residual mean=0.000026 rms=0.008254 Jy/beam
! Combined flux in latest and established models = 1.32875 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.32875 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.594587Jy  sigma=0.003272
! Fit after  self-cal, rms=0.593231Jy  sigma=0.003270
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.178168 Jy
! Component: 100  -  total flux cleaned = 0.268637 Jy
! Total flux subtracted in 100 components = 0.268637 Jy
! Clean residual min=-0.018607 max=0.045192 Jy/beam
! Clean residual mean=-0.000013 rms=0.005271 Jy/beam
! Combined flux in latest and established models = 1.59738 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 14 components and 1.59738 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.528328Jy  sigma=0.002378
! Fit after  self-cal, rms=0.528104Jy  sigma=0.002378
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0557332 Jy
! Component: 100  -  total flux cleaned = 0.0942048 Jy
! Total flux subtracted in 100 components = 0.0942048 Jy
! Clean residual min=-0.018939 max=0.036162 Jy/beam
! Clean residual mean=-0.000027 rms=0.004826 Jy/beam
! Combined flux in latest and established models = 1.69159 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 29 components and 1.69159 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.519078Jy  sigma=0.002237
! Fit after  self-cal, rms=0.519018Jy  sigma=0.002237
! Inverting map 
! Added new window around map position (-6.5, 1).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0348079 Jy
! Component: 100  -  total flux cleaned = 0.0600412 Jy
! Total flux subtracted in 100 components = 0.0600412 Jy
! Clean residual min=-0.018818 max=0.023981 Jy/beam
! Clean residual mean=-0.000039 rms=0.004628 Jy/beam
! Combined flux in latest and established models = 1.75163 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 40 components and 1.75163 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.514989Jy  sigma=0.002186
! Fit after  self-cal, rms=0.514846Jy  sigma=0.002184
! 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.222 mas, bmaj=3.974 mas, bpa=-7.658 degrees
! Estimated noise=405.537 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.0342085 Jy
! Component: 100  -  total flux cleaned = 0.0564023 Jy
! Component: 150  -  total flux cleaned = 0.0716147 Jy
! Component: 200  -  total flux cleaned = 0.0821576 Jy
! Total flux subtracted in 200 components = 0.0821576 Jy
! Clean residual min=-0.019161 max=0.028699 Jy/beam
! Clean residual mean=0.000161 rms=0.006435 Jy/beam
! Combined flux in latest and established models = 1.83379 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 52 components and 1.83379 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.511870Jy  sigma=0.002156
! Fit after  self-cal, rms=0.511781Jy  sigma=0.002154
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 57 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.14     GC        1.03     HH        1.00*    
!   HN        1.00*    KK        1.03     KP        1.09     LA        1.06     
!   MC        0.92     MK        1.00     NY        1.04     ON        1.03     
!   OV        1.04     PT        1.10     SC        1.00*    TS        0.98     
!   WF        1.00*    WZ        1.02     GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.98     GC        1.00     HH        1.00*    
!   HN        0.95     KK        1.07     KP        0.85     LA        0.98     
!   MC        1.00*    MK        1.01     NY        0.99     ON        1.06     
!   OV        0.96     PT        1.00     SC        1.04     TS        1.06     
!   WF        0.95     WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00     GC        1.03     HH        1.00*    
!   HN        0.91     KK        1.03     KP        1.03     LA        1.01     
!   MC        1.00*    MK        0.99     NY        1.00*    ON        1.00*    
!   OV        1.00     PT        1.02     SC        1.07     TS        0.98     
!   WF        0.98     WZ        1.00*    GN        0.97     NL        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.92     FD        1.00     GC        1.00     HH        1.05     
!   HN        0.93     KK        1.22     KP        0.86     LA        0.99     
!   MC        1.14     MK        1.05     NY        0.99     ON        1.04     
!   OV        0.92     PT        1.01     SC        1.00     TS        1.00*    
!   WF        1.02     WZ        1.02     GN        0.97     NL        0.95     
! 
! 
! Correcting IF 2.
!  A total of 57 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.13     GC        1.03     HH        1.00*    
!   HN        1.00*    KK        0.98     KP        1.06     LA        1.04     
!   MC        1.17     MK        0.97     NY        0.99     ON        1.08     
!   OV        1.02     PT        1.08     SC        1.00*    TS        0.98     
!   WF        1.00*    WZ        1.06     GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.02     GC        1.00     HH        1.00*    
!   HN        1.00     KK        1.02     KP        0.92     LA        0.96     
!   MC        1.00*    MK        0.98     NY        0.99     ON        1.07     
!   OV        0.93     PT        1.00     SC        1.04     TS        1.08     
!   WF        0.97     WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.06     GC        1.25     HH        1.00*    
!   HN        0.96     KK        1.00     KP        1.01     LA        0.99     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        0.97     PT        1.01     SC        1.05     TS        1.00     
!   WF        1.01     WZ        1.00*    GN        0.97     NL        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        1.04     GC        0.99     HH        1.17     
!   HN        0.98     KK        1.18     KP        0.91     LA        0.96     
!   MC        1.32     MK        1.04     NY        1.00     ON        1.09     
!   OV        0.90     PT        0.99     SC        1.00     TS        1.00*    
!   WF        1.02     WZ        1.09     GN        0.96     NL        0.95     
! 
! 
! Correcting IF 3.
!  A total of 81 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.11     GC        1.04     HH        1.00*    
!   HN        1.00*    KK        1.03     KP        1.07     LA        1.09     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        1.05     PT        1.03     SC        1.00*    TS        0.97     
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00     GC        1.02     HH        1.00*    
!   HN        0.99     KK        1.06     KP        0.96     LA        0.98     
!   MC        1.00*    MK        1.00     NY        0.99     ON        1.02     
!   OV        0.97     PT        1.03     SC        1.09     TS        1.04     
!   WF        0.99     WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.03     GC        1.03     HH        1.00*    
!   HN        0.95     KK        1.04     KP        1.00     LA        1.02     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        1.01     PT        0.97     SC        1.07     TS        0.99     
!   WF        1.01     WZ        1.00*    GN        0.98     NL        1.00*    
! 
!  A total of 213 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        1.02     GC        1.03     HH        1.11     
!   HN        0.96     KK        1.25     KP        0.95     LA        1.00     
!   MC        1.00*    MK        1.03     NY        1.01     ON        1.04     
!   OV        0.95     PT        1.01     SC        1.04     TS        1.00*    
!   WF        1.04     WZ        1.10     GN        0.99     NL        0.93     
! 
! 
! Correcting IF 4.
!  A total of 54 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.08     GC        1.04     HH        1.00*    
!   HN        1.00*    KK        0.99     KP        1.07     LA        1.08     
!   MC        0.96     MK        1.03     NY        1.10     ON        1.19     
!   OV        1.02     PT        1.01     SC        1.00*    TS        0.99     
!   WF        1.00*    WZ        1.00     GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.99     GC        1.01     HH        1.00*    
!   HN        0.98     KK        1.06     KP        0.95     LA        0.98     
!   MC        1.00*    MK        1.04     NY        0.98     ON        1.03     
!   OV        0.93     PT        1.24     SC        1.08     TS        1.07     
!   WF        0.98     WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.02     GC        1.04     HH        1.00*    
!   HN        0.94     KK        1.02     KP        1.02     LA        1.01     
!   MC        1.00*    MK        1.02     NY        1.00*    ON        1.00*    
!   OV        0.97     PT        1.01     SC        1.09     TS        1.02     
!   WF        1.02     WZ        1.00*    GN        0.98     NL        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.91     FD        1.01     GC        1.02     HH        1.10     
!   HN        0.95     KK        1.14     KP        0.92     LA        1.00     
!   MC        1.04     MK        1.09     NY        1.00     ON        1.08     
!   OV        0.91     PT        1.26     SC        1.04     TS        1.00*    
!   WF        1.05     WZ        1.09     GN        0.98     NL        0.93     
! 
! 
! Fit before self-cal, rms=0.511781Jy  sigma=0.002154
! Fit after  self-cal, rms=0.495877Jy  sigma=0.001878
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.265 mas, bmaj=4.018 mas, bpa=-7.703 degrees
! Estimated noise=414.318 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.0124356 Jy
! Component: 100  -  total flux cleaned = 0.013288 Jy
! Component: 150  -  total flux cleaned = 0.0139715 Jy
! Component: 200  -  total flux cleaned = 0.0142477 Jy
! Total flux subtracted in 200 components = 0.0142477 Jy
! Clean residual min=-0.015285 max=0.018906 Jy/beam
! Clean residual mean=0.000245 rms=0.004459 Jy/beam
! Combined flux in latest and established models = 1.84804 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 63 components and 1.84804 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.495042Jy  sigma=0.001871
! Fit after  self-cal, rms=0.495503Jy  sigma=0.001870
! 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.495503Jy  sigma=0.001870
! Fit after  self-cal, rms=0.477568Jy  sigma=0.001622
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.264 mas, bmaj=4.026 mas, bpa=-7.847 degrees
! Estimated noise=418.826 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0152406 Jy
! Component: 100  -  total flux cleaned = 0.019708 Jy
! Component: 150  -  total flux cleaned = 0.020466 Jy
! Component: 200  -  total flux cleaned = 0.021102 Jy
! Total flux subtracted in 200 components = 0.021102 Jy
! Clean residual min=-0.010219 max=0.010759 Jy/beam
! Clean residual mean=0.000043 rms=0.003133 Jy/beam
! Combined flux in latest and established models = 1.86914 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 71 components and 1.86914 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.476951Jy  sigma=0.001618
! Fit after  self-cal, rms=0.477205Jy  sigma=0.001618
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.0013143 Jy
! Component: 100  -  total flux cleaned = 0.00157123 Jy
! Component: 150  -  total flux cleaned = 0.00168368 Jy
! Component: 200  -  total flux cleaned = 0.00168106 Jy
! Total flux subtracted in 200 components = 0.00168106 Jy
! Clean residual min=-0.010188 max=0.010874 Jy/beam
! Clean residual mean=0.000034 rms=0.003130 Jy/beam
! Combined flux in latest and established models = 1.87082 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 74 components and 1.87082 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.477129Jy  sigma=0.001617
! Fit after  self-cal, rms=0.477111Jy  sigma=0.001617
! 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.477111Jy  sigma=0.001617
! Fit after  self-cal, rms=0.461837Jy  sigma=0.001410
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.27 mas, bmaj=4.039 mas, bpa=-7.96 degrees
! Estimated noise=420.045 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00557826 Jy
! Component: 100  -  total flux cleaned = -0.00720918 Jy
! Component: 150  -  total flux cleaned = -0.00806122 Jy
! Component: 200  -  total flux cleaned = -0.00836358 Jy
! Total flux subtracted in 200 components = -0.00836358 Jy
! Clean residual min=-0.005112 max=0.009499 Jy/beam
! Clean residual mean=0.000144 rms=0.001131 Jy/beam
! Combined flux in latest and established models = 1.86246 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 81 components and 1.86246 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.461629Jy  sigma=0.001407
! Fit after  self-cal, rms=0.462650Jy  sigma=0.001407
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 (-9.5, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00572466 Jy
! Component: 100  -  total flux cleaned = 0.00610064 Jy
! Component: 150  -  total flux cleaned = 0.00625313 Jy
! Component: 200  -  total flux cleaned = 0.00637851 Jy
! Total flux subtracted in 200 components = 0.0063785 Jy
! Clean residual min=-0.005034 max=0.007198 Jy/beam
! Clean residual mean=0.000108 rms=0.001035 Jy/beam
! Combined flux in latest and established models = 1.86883 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 92 components and 1.86883 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.462521Jy  sigma=0.001404
! Fit after  self-cal, rms=0.462445Jy  sigma=0.001404
! Inverting map 
! Added new window around map position (-3.5, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00434159 Jy
! Component: 100  -  total flux cleaned = 0.00405557 Jy
! Component: 150  -  total flux cleaned = 0.00379334 Jy
! Component: 200  -  total flux cleaned = 0.00379168 Jy
! Total flux subtracted in 200 components = 0.00379168 Jy
! Clean residual min=-0.005549 max=0.004398 Jy/beam
! Clean residual mean=0.000087 rms=0.001013 Jy/beam
! Combined flux in latest and established models = 1.87263 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 108 components and 1.87263 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.462329Jy  sigma=0.001402
! Fit after  self-cal, rms=0.462640Jy  sigma=0.001402
! 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.462640Jy  sigma=0.001402
! Fit after  self-cal, rms=0.464144Jy  sigma=0.001400
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.642 mas, bmaj=9.672 mas, bpa=14.09 degrees
! Estimated noise=597.73 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000639658 Jy
! Component: 100  -  total flux cleaned = -0.000760491 Jy
! Component: 150  -  total flux cleaned = -0.000937568 Jy
! Component: 200  -  total flux cleaned = -0.000998054 Jy
! Total flux subtracted in 200 components = -0.000998054 Jy
! Clean residual min=-0.004594 max=0.006847 Jy/beam
! Clean residual mean=0.000289 rms=0.001886 Jy/beam
! Combined flux in latest and established models = 1.87163 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 126 components and 1.87163 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.464143Jy  sigma=0.001400
! Fit after  self-cal, rms=0.463612Jy  sigma=0.001400
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.000841251 Jy
! Component: 100  -  total flux cleaned = 0.000840468 Jy
! Component: 150  -  total flux cleaned = 0.000799712 Jy
! Component: 200  -  total flux cleaned = 0.000766507 Jy
! Total flux subtracted in 200 components = 0.000766507 Jy
! Clean residual min=-0.004449 max=0.006866 Jy/beam
! Clean residual mean=0.000273 rms=0.001878 Jy/beam
! Combined flux in latest and established models = 1.87239 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 132 components and 1.87239 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.463616Jy  sigma=0.001400
! Fit after  self-cal, rms=0.463470Jy  sigma=0.001400
! 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.273 mas, bmaj=4.044 mas, bpa=-7.97 degrees
! Estimated noise=420.461 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.273 x 4.044 at -7.97 degrees (North through East)
! Clean map  min=-0.0031926  max=1.3789 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.463470Jy  sigma=0.001400
! Fit after  self-cal, rms=1.123416Jy  sigma=0.001232
! Inverting map and beam 
! Estimated beam: bmin=2.274 mas, bmaj=4.047 mas, bpa=-7.949 degrees
! Estimated noise=419.802 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00332657 Jy
! Component: 100  -  total flux cleaned = -0.00412278 Jy
! Component: 150  -  total flux cleaned = -0.00470154 Jy
! Component: 200  -  total flux cleaned = -0.00491027 Jy
! Total flux subtracted in 200 components = -0.00491027 Jy
! Clean residual min=-0.005617 max=0.003558 Jy/beam
! Clean residual mean=0.000076 rms=0.000770 Jy/beam
! Combined flux in latest and established models = 1.86748 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 137 components and 1.86748 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.123380Jy  sigma=0.001230
! Fit after  self-cal, rms=1.123362Jy  sigma=0.001230
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000219102 Jy
! Component: 100  -  total flux cleaned = -0.000411545 Jy
! Component: 150  -  total flux cleaned = -0.000503069 Jy
! Component: 200  -  total flux cleaned = -0.000589817 Jy
! Total flux subtracted in 200 components = -0.000589817 Jy
! Clean residual min=-0.005339 max=0.003516 Jy/beam
! Clean residual mean=0.000079 rms=0.000759 Jy/beam
! Combined flux in latest and established models = 1.86689 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 141 components and 1.86689 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.123349Jy  sigma=0.001230
! Fit after  self-cal, rms=1.123333Jy  sigma=0.001230
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.123333Jy  sigma=0.001230
! Fit after  self-cal, rms=1.123217Jy  sigma=0.001229
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.918 mas, bmaj=3.148 mas, bpa=-3.477 degrees
! Estimated noise=774.572 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.00864 Jy
! Component: 100  -  total flux cleaned = 1.36078 Jy
! Component: 150  -  total flux cleaned = 1.53265 Jy
! Component: 200  -  total flux cleaned = 1.61757 Jy
! Total flux subtracted in 200 components = 1.61757 Jy
! Clean residual min=-0.009980 max=0.039755 Jy/beam
! Clean residual mean=0.000049 rms=0.002853 Jy/beam
! Combined flux in latest and established models = 1.61757 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 9 model components to the UV plane model.
! The established model now contains 9 components and 1.61757 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.275 mas, bmaj=4.05 mas, bpa=-7.946 degrees
! Estimated noise=419.7 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.0783332 Jy
! Component: 100  -  total flux cleaned = 0.126651 Jy
! Component: 150  -  total flux cleaned = 0.15963 Jy
! Component: 200  -  total flux cleaned = 0.182846 Jy
! Total flux subtracted in 200 components = 0.182846 Jy
! Clean residual min=-0.004097 max=0.013023 Jy/beam
! Clean residual mean=0.000424 rms=0.001984 Jy/beam
! Combined flux in latest and established models = 1.80041 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 59 components and 1.80042 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0166435 Jy
! Component: 100  -  total flux cleaned = 0.0288519 Jy
! Component: 150  -  total flux cleaned = 0.0379212 Jy
! Component: 200  -  total flux cleaned = 0.0447944 Jy
! Total flux subtracted in 200 components = 0.0447944 Jy
! Clean residual min=-0.002911 max=0.004659 Jy/beam
! Clean residual mean=0.000181 rms=0.000932 Jy/beam
! Combined flux in latest and established models = 1.84521 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 83 components and 1.84521 Jy
! Inverting map 
! Added new window around map position (-13, 6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0050271 Jy
! Component: 100  -  total flux cleaned = 0.00718437 Jy
! Component: 150  -  total flux cleaned = 0.00893686 Jy
! Component: 200  -  total flux cleaned = 0.0105041 Jy
! Total flux subtracted in 200 components = 0.0105041 Jy
! Clean residual min=-0.003119 max=0.003925 Jy/beam
! Clean residual mean=0.000123 rms=0.000796 Jy/beam
! Combined flux in latest and established models = 1.85571 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 95 components and 1.85571 Jy
! Inverting map 
! Added new window around map position (4.5, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000922785 Jy
! Component: 100  -  total flux cleaned = 0.00185261 Jy
! Component: 150  -  total flux cleaned = 0.00259673 Jy
! Component: 200  -  total flux cleaned = 0.00330066 Jy
! Total flux subtracted in 200 components = 0.00330066 Jy
! Clean residual min=-0.002645 max=0.003548 Jy/beam
! Clean residual mean=0.000105 rms=0.000767 Jy/beam
! Combined flux in latest and established models = 1.85901 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 107 components and 1.85901 Jy
! Inverting map 
! Added new window around map position (-26.5, 6.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00335221 Jy
! Component: 100  -  total flux cleaned = 0.00401703 Jy
! Component: 150  -  total flux cleaned = 0.00454571 Jy
! Component: 200  -  total flux cleaned = 0.00504884 Jy
! Total flux subtracted in 200 components = 0.00504884 Jy
! Clean residual min=-0.002537 max=0.002918 Jy/beam
! Clean residual mean=0.000076 rms=0.000716 Jy/beam
! Combined flux in latest and established models = 1.86406 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 116 components and 1.86406 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.648 mas, bmaj=9.682 mas, bpa=14.07 degrees
! Estimated noise=595.099 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00397806 Jy
! Component: 100  -  total flux cleaned = 0.00627297 Jy
! Component: 150  -  total flux cleaned = 0.00765148 Jy
! Component: 200  -  total flux cleaned = 0.00794815 Jy
! Total flux subtracted in 200 components = 0.00794815 Jy
! Clean residual min=-0.003909 max=0.003872 Jy/beam
! Clean residual mean=0.000100 rms=0.001104 Jy/beam
! Combined flux in latest and established models = 1.87201 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.000150001 Jy
! Component: 100  -  total flux cleaned = 0.000320057 Jy
! Component: 150  -  total flux cleaned = 0.000444573 Jy
! Component: 200  -  total flux cleaned = 0.000530243 Jy
! Total flux subtracted in 200 components = 0.000530243 Jy
! Clean residual min=-0.003972 max=0.003870 Jy/beam
! Clean residual mean=0.000091 rms=0.001099 Jy/beam
! Combined flux in latest and established models = 1.87254 Jy
! Adding 54 model components to the UV plane model.
! The established model now contains 162 components and 1.87254 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.275 mas, bmaj=4.05 mas, bpa=-7.946 degrees
! Estimated noise=419.7 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000555359 Jy
! Component: 100  -  total flux cleaned = -0.000650806 Jy
! Component: 150  -  total flux cleaned = -0.000558715 Jy
! Component: 200  -  total flux cleaned = -0.0005583 Jy
! Total flux subtracted in 200 components = -0.0005583 Jy
! Clean residual min=-0.002458 max=0.002828 Jy/beam
! Clean residual mean=0.000031 rms=0.000680 Jy/beam
! Combined flux in latest and established models = 1.87198 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 171 components and 1.87198 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.123226Jy  sigma=0.001229
! Fit after  self-cal, rms=1.123255Jy  sigma=0.001229
wmodel J1310+3220_S_1999_12_20_pus_map.mod
! Writing 171 model components to file: J1310+3220_S_1999_12_20_pus_map.mod
wobs J1310+3220_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J1310+3220_S_1999_12_20_pus_uvs.fits
wwins J1310+3220_S_1999_12_20_pus_map.win
! wwins: Wrote 7 windows to J1310+3220_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.0011883 Jy
! Component: 100  -  total flux cleaned = 0.00195492 Jy
! Component: 150  -  total flux cleaned = 0.00245223 Jy
! Component: 200  -  total flux cleaned = 0.00275715 Jy
! Component: 250  -  total flux cleaned = 0.00309487 Jy
! Component: 300  -  total flux cleaned = 0.00334138 Jy
! Component: 350  -  total flux cleaned = 0.0035433 Jy
! Component: 400  -  total flux cleaned = 0.00382025 Jy
! Component: 450  -  total flux cleaned = 0.00397569 Jy
! Component: 500  -  total flux cleaned = 0.0041671 Jy
! Component: 550  -  total flux cleaned = 0.00428054 Jy
! Component: 600  -  total flux cleaned = 0.00442991 Jy
! Component: 650  -  total flux cleaned = 0.00450385 Jy
! Component: 700  -  total flux cleaned = 0.00461329 Jy
! Component: 750  -  total flux cleaned = 0.00461325 Jy
! Component: 800  -  total flux cleaned = 0.00482824 Jy
! Component: 850  -  total flux cleaned = 0.0048278 Jy
! Component: 900  -  total flux cleaned = 0.00489808 Jy
! Component: 950  -  total flux cleaned = 0.00500256 Jy
! Component: 1000  -  total flux cleaned = 0.00500237 Jy
! Component: 1050  -  total flux cleaned = 0.00503711 Jy
! Component: 1100  -  total flux cleaned = 0.00527679 Jy
! Component: 1150  -  total flux cleaned = 0.00514059 Jy
! Component: 1200  -  total flux cleaned = 0.00531013 Jy
! Component: 1250  -  total flux cleaned = 0.00537732 Jy
! Component: 1300  -  total flux cleaned = 0.00544391 Jy
! Component: 1350  -  total flux cleaned = 0.00544407 Jy
! Component: 1400  -  total flux cleaned = 0.00551004 Jy
! Component: 1450  -  total flux cleaned = 0.00557579 Jy
! Component: 1500  -  total flux cleaned = 0.00564119 Jy
! Component: 1550  -  total flux cleaned = 0.00573861 Jy
! Component: 1600  -  total flux cleaned = 0.00573853 Jy
! Component: 1650  -  total flux cleaned = 0.00586696 Jy
! Component: 1700  -  total flux cleaned = 0.00580295 Jy
! Component: 1750  -  total flux cleaned = 0.00583477 Jy
! Component: 1800  -  total flux cleaned = 0.0058349 Jy
! Component: 1850  -  total flux cleaned = 0.00596115 Jy
! Component: 1900  -  total flux cleaned = 0.0060238 Jy
! Component: 1950  -  total flux cleaned = 0.00599248 Jy
! Component: 2000  -  total flux cleaned = 0.00605479 Jy
! Total flux subtracted in 2048 components = 0.00614801 Jy
! Clean residual min=-0.001605 max=0.002057 Jy/beam
! Clean residual mean=0.000008 rms=0.000583 Jy/beam
! Combined flux in latest and established models = 1.87813 Jy
keep
! Adding 172 model components to the UV plane model.
! The established model now contains 340 components and 1.87813 Jy
![Exited script file: muppet]
wmap "J1310+3220_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.275 x 4.05 at -7.946 degrees (North through East)
! Clean map  min=-0.0021368  max=1.3784 Jy/beam
! Writing clean map to FITS file: J1310+3220_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 1.37841 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000583136 
device "J1310+3220_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J1310+3220_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.126915 0.126915 0.253829 0.507659 1.01532 2.03063 4.06127 8.12254 16.2451 32.4902 64.9803
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.378 
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.275 x 4.05 at -7.946 degrees (North through East)
! Clean map  min=-0.0021368  max=1.3784 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1310+3220_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J1310+3220_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1310+3220_S_1999_12_20_pus_uvs.log closed on Thu Dec 20 15:17:30 2007