! Started logfile: J0102+5824_S_1998_10_01_pus_uvs.log on Thu Feb  7 16:58:53 2008
obs J0102+5824_S_1998_10_01_pus_uva.fits
! Reading UV FITS file: J0102+5824_S_1998_10_01_pus_uva.fits
! AN table 1: 1254 integrations on 136 of 136 possible baselines.
! AN table 2: 355 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.203081 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0102+5824
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22298e+09        4e+06          1        4e+06
!  02        2  2.24298e+09        4e+06          1        4e+06
!  03        3  2.33298e+09        4e+06          1        4e+06
!  04        4  2.36298e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 1537 lines of history.
! 
! Reading 177756 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 J0102+5824_S_1998_10_01_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 14355 telescope corrections were flagged in sub-array 1.
!  A total of 3777 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 14355 telescope corrections were flagged in sub-array 1.
!  A total of 3777 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 14355 telescope corrections were flagged in sub-array 1.
!  A total of 3777 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 14355 telescope corrections were flagged in sub-array 1.
!  A total of 3777 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=1.345383Jy  sigma=0.008284
! Fit after  self-cal, rms=0.947240Jy  sigma=0.005831
! 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.177 mas, bmaj=2.449 mas, bpa=-21.54 degrees
! Estimated noise=599.055 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.26362 Jy
! Component: 100  -  total flux cleaned = 1.55664 Jy
! Total flux subtracted in 100 components = 1.55664 Jy
! Clean residual min=-0.026287 max=0.113389 Jy/beam
! Clean residual mean=0.000164 rms=0.007812 Jy/beam
! Combined flux in latest and established models = 1.55664 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 1.55664 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.681313Jy  sigma=0.003359
! Fit after  self-cal, rms=0.681241Jy  sigma=0.003359
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.120926 Jy
! Component: 100  -  total flux cleaned = 0.186212 Jy
! Total flux subtracted in 100 components = 0.186212 Jy
! Clean residual min=-0.024763 max=0.035061 Jy/beam
! Clean residual mean=0.000062 rms=0.006554 Jy/beam
! Combined flux in latest and established models = 1.74285 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 14 components and 1.74285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.656856Jy  sigma=0.003008
! Fit after  self-cal, rms=0.656659Jy  sigma=0.003007
! 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.735 mas, bmaj=3.145 mas, bpa=-8.587 degrees
! Estimated noise=268.239 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.0682047 Jy
! Component: 100  -  total flux cleaned = 0.103798 Jy
! Component: 150  -  total flux cleaned = 0.123139 Jy
! Component: 200  -  total flux cleaned = 0.133727 Jy
! Total flux subtracted in 200 components = 0.133727 Jy
! Clean residual min=-0.021733 max=0.025856 Jy/beam
! Clean residual mean=-0.000303 rms=0.004467 Jy/beam
! Combined flux in latest and established models = 1.87658 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 27 components and 1.87658 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.653139Jy  sigma=0.002913
! Fit after  self-cal, rms=0.653052Jy  sigma=0.002912
! 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.0200683 Jy
! Component: 100  -  total flux cleaned = 0.0212049 Jy
! Component: 150  -  total flux cleaned = 0.0211865 Jy
! Component: 200  -  total flux cleaned = 0.0207939 Jy
! Total flux subtracted in 200 components = 0.0207939 Jy
! Clean residual min=-0.021554 max=0.018654 Jy/beam
! Clean residual mean=-0.000457 rms=0.004385 Jy/beam
! Combined flux in latest and established models = 1.89737 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 50 components and 1.89737 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.652204Jy  sigma=0.002901
! Fit after  self-cal, rms=0.652088Jy  sigma=0.002900
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 885 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.91     FD        1.00     GC        1.02     HN        0.97     
!   KK        0.99     KP        1.02     LA        0.93     MK        0.95     
!   NL        0.97     NY        0.95     ON        1.01     OV        0.97     
!   PT        1.00     SC        1.04     WF        0.99     MC        1.00     
!   GN        0.95     
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00     GC        1.02     HN        1.04     
!   KK        1.03     KP        1.12     LA        1.05     MK        0.94     
!   NL        1.03     NY        0.96     ON        1.00     OV        1.02     
!   PT        1.14     SC        1.12     WF        1.03     MC        0.98     
!   GN        1.02     
! 
! 
! Correcting IF 2.
!  A total of 885 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.91     FD        1.00     GC        1.01     HN        1.03     
!   KK        0.99     KP        0.97     LA        0.99     MK        1.02     
!   NL        0.96     NY        0.99     ON        1.03     OV        0.97     
!   PT        0.97     SC        1.07     WF        1.03     MC        1.11     
!   GN        0.96     
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GC        1.00     HN        1.09     
!   KK        1.03     KP        1.08     LA        1.10     MK        1.02     
!   NL        1.02     NY        1.00     ON        1.02     OV        1.02     
!   PT        1.11     SC        1.13     WF        1.10     MC        1.36     
!   GN        1.01     
! 
! 
! Correcting IF 3.
!  A total of 885 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.06     GC        1.04     HN        1.00     
!   KK        1.02     KP        0.98     LA        0.98     MK        0.96     
!   NL        0.97     NY        0.99     ON        1.00     OV        0.98     
!   PT        0.98     SC        1.08     WF        1.02     MC        0.98     
!   GN        0.97     
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.07     GC        1.07     HN        1.07     
!   KK        1.03     KP        1.08     LA        1.08     MK        0.96     
!   NL        1.04     NY        1.00     ON        0.97     OV        1.03     
!   PT        1.10     SC        1.17     WF        1.10     MC        0.80     
!   GN        1.07     
! 
! 
! Correcting IF 4.
!  A total of 885 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.02     GC        1.03     HN        1.01     
!   KK        1.02     KP        1.00     LA        0.98     MK        0.97     
!   NL        0.97     NY        1.00     ON        1.02     OV        1.00     
!   PT        0.99     SC        1.07     WF        1.01     MC        1.08     
!   GN        0.96     
! 
!  A total of 147 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.04     GC        1.07     HN        1.08     
!   KK        1.01     KP        1.09     LA        1.09     MK        0.99     
!   NL        1.04     NY        1.01     ON        1.01     OV        1.05     
!   PT        1.13     SC        1.15     WF        1.06     MC        1.06     
!   GN        1.04     
! 
! 
! Fit before self-cal, rms=0.652088Jy  sigma=0.002900
! Fit after  self-cal, rms=0.656717Jy  sigma=0.002808
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.792 mas, bmaj=3.168 mas, bpa=-6.193 degrees
! Estimated noise=269.524 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.00223375 Jy
! Component: 100  -  total flux cleaned = -0.00221683 Jy
! Component: 150  -  total flux cleaned = -0.00311015 Jy
! Component: 200  -  total flux cleaned = -0.00366273 Jy
! Total flux subtracted in 200 components = -0.00366273 Jy
! Clean residual min=-0.016516 max=0.015825 Jy/beam
! Clean residual mean=-0.000064 rms=0.003522 Jy/beam
! Combined flux in latest and established models = 1.89371 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 63 components and 1.89371 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.656352Jy  sigma=0.002805
! Fit after  self-cal, rms=0.656530Jy  sigma=0.002804
! 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.656530Jy  sigma=0.002804
! Fit after  self-cal, rms=0.674959Jy  sigma=0.002604
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.812 mas, bmaj=3.163 mas, bpa=-5.506 degrees
! Estimated noise=270.462 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00273692 Jy
! Component: 100  -  total flux cleaned = 0.00155404 Jy
! Component: 150  -  total flux cleaned = 0.0015541 Jy
! Component: 200  -  total flux cleaned = 0.00155567 Jy
! Total flux subtracted in 200 components = 0.00155567 Jy
! Clean residual min=-0.005302 max=0.004638 Jy/beam
! Clean residual mean=0.000177 rms=0.001110 Jy/beam
! Combined flux in latest and established models = 1.89526 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 73 components and 1.89526 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.674716Jy  sigma=0.002601
! Fit after  self-cal, rms=0.675318Jy  sigma=0.002600
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.000609305 Jy
! Component: 100  -  total flux cleaned = 0.000977568 Jy
! Component: 150  -  total flux cleaned = 0.000976126 Jy
! Component: 200  -  total flux cleaned = 0.00113077 Jy
! Total flux subtracted in 200 components = 0.00113077 Jy
! Clean residual min=-0.004536 max=0.004621 Jy/beam
! Clean residual mean=0.000169 rms=0.001084 Jy/beam
! Combined flux in latest and established models = 1.89639 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 80 components and 1.89639 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.675228Jy  sigma=0.002599
! Fit after  self-cal, rms=0.675212Jy  sigma=0.002599
! 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.675212Jy  sigma=0.002599
! Fit after  self-cal, rms=0.680714Jy  sigma=0.002591
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.814 mas, bmaj=3.161 mas, bpa=-6.445 degrees
! Estimated noise=270.306 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00166337 Jy
! Component: 100  -  total flux cleaned = -0.00186603 Jy
! Component: 150  -  total flux cleaned = -0.00168908 Jy
! Component: 200  -  total flux cleaned = -0.00137729 Jy
! Total flux subtracted in 200 components = -0.00137729 Jy
! Clean residual min=-0.004352 max=0.003865 Jy/beam
! Clean residual mean=0.000142 rms=0.000909 Jy/beam
! Combined flux in latest and established models = 1.89502 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 88 components and 1.89502 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.680593Jy  sigma=0.002589
! Fit after  self-cal, rms=0.680631Jy  sigma=0.002589
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.000433102 Jy
! Component: 100  -  total flux cleaned = 0.000431273 Jy
! Component: 150  -  total flux cleaned = 0.00056069 Jy
! Component: 200  -  total flux cleaned = 0.0006874 Jy
! Total flux subtracted in 200 components = 0.0006874 Jy
! Clean residual min=-0.003499 max=0.003876 Jy/beam
! Clean residual mean=0.000138 rms=0.000894 Jy/beam
! Combined flux in latest and established models = 1.8957 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 92 components and 1.8957 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.680581Jy  sigma=0.002589
! Fit after  self-cal, rms=0.680573Jy  sigma=0.002589
! Inverting map 
! Added new window around map position (-9, -1.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00271718 Jy
! Component: 100  -  total flux cleaned = 0.00323222 Jy
! Component: 150  -  total flux cleaned = 0.00334382 Jy
! Component: 200  -  total flux cleaned = 0.00366576 Jy
! Total flux subtracted in 200 components = 0.00366576 Jy
! Clean residual min=-0.003395 max=0.003328 Jy/beam
! Clean residual mean=0.000113 rms=0.000868 Jy/beam
! Combined flux in latest and established models = 1.89937 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 103 components and 1.89937 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.680531Jy  sigma=0.002588
! Fit after  self-cal, rms=0.680529Jy  sigma=0.002588
! 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.680529Jy  sigma=0.002588
! Fit after  self-cal, rms=0.682181Jy  sigma=0.002588
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.753 mas, bmaj=8.612 mas, bpa=26.47 degrees
! Estimated noise=381.901 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000778635 Jy
! Component: 100  -  total flux cleaned = 0.00106581 Jy
! Component: 150  -  total flux cleaned = 0.00139053 Jy
! Component: 200  -  total flux cleaned = 0.00162762 Jy
! Total flux subtracted in 200 components = 0.00162762 Jy
! Clean residual min=-0.003604 max=0.004749 Jy/beam
! Clean residual mean=0.000274 rms=0.001307 Jy/beam
! Combined flux in latest and established models = 1.901 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 121 components and 1.901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.682169Jy  sigma=0.002588
! Fit after  self-cal, rms=0.682171Jy  sigma=0.002588
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.000298359 Jy
! Component: 100  -  total flux cleaned = 0.000495143 Jy
! Component: 150  -  total flux cleaned = 0.000602351 Jy
! Component: 200  -  total flux cleaned = 0.000721639 Jy
! Total flux subtracted in 200 components = 0.000721639 Jy
! Clean residual min=-0.003595 max=0.004773 Jy/beam
! Clean residual mean=0.000260 rms=0.001319 Jy/beam
! Combined flux in latest and established models = 1.90172 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 130 components and 1.90172 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.682163Jy  sigma=0.002587
! Fit after  self-cal, rms=0.682161Jy  sigma=0.002587
! 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.818 mas, bmaj=3.162 mas, bpa=-6.734 degrees
! Estimated noise=270.296 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.818 x 3.162 at -6.734 degrees (North through East)
! Clean map  min=-0.0035898  max=1.6775 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.682161Jy  sigma=0.002587
! Fit after  self-cal, rms=3.683619Jy  sigma=0.002404
! Inverting map and beam 
! Estimated beam: bmin=2.818 mas, bmaj=3.161 mas, bpa=-6.787 degrees
! Estimated noise=269.947 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00329277 Jy
! Component: 100  -  total flux cleaned = -0.003175 Jy
! Component: 150  -  total flux cleaned = -0.00306703 Jy
! Component: 200  -  total flux cleaned = -0.00296644 Jy
! Total flux subtracted in 200 components = -0.00296644 Jy
! Clean residual min=-0.002896 max=0.003300 Jy/beam
! Clean residual mean=0.000100 rms=0.000763 Jy/beam
! Combined flux in latest and established models = 1.89875 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 134 components and 1.89875 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=3.683611Jy  sigma=0.002404
! Fit after  self-cal, rms=3.683626Jy  sigma=0.002404
! Inverting map 
! Added new window around map position (-37, 12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0017072 Jy
! Component: 100  -  total flux cleaned = 0.00180421 Jy
! Component: 150  -  total flux cleaned = 0.00189539 Jy
! Component: 200  -  total flux cleaned = 0.00206405 Jy
! Total flux subtracted in 200 components = 0.00206405 Jy
! Clean residual min=-0.002793 max=0.003207 Jy/beam
! Clean residual mean=0.000089 rms=0.000751 Jy/beam
! Combined flux in latest and established models = 1.90082 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 146 components and 1.90082 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=3.683621Jy  sigma=0.002404
! Fit after  self-cal, rms=3.683626Jy  sigma=0.002404
! Inverting map 
! Added new window around map position (-59, 27).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00305596 Jy
! Component: 100  -  total flux cleaned = 0.00394605 Jy
! Component: 150  -  total flux cleaned = 0.00427221 Jy
! Component: 200  -  total flux cleaned = 0.00458424 Jy
! Total flux subtracted in 200 components = 0.00458424 Jy
! Clean residual min=-0.002809 max=0.002914 Jy/beam
! Clean residual mean=0.000077 rms=0.000727 Jy/beam
! Combined flux in latest and established models = 1.9054 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 157 components and 1.9054 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=3.683624Jy  sigma=0.002403
! Fit after  self-cal, rms=3.683623Jy  sigma=0.002403
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=3.683623Jy  sigma=0.002403
! Fit after  self-cal, rms=6.226084Jy  sigma=0.002403
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.22 mas, bmaj=2.438 mas, bpa=-24.49 degrees
! Estimated noise=606.932 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.26884 Jy
! Component: 100  -  total flux cleaned = 1.55694 Jy
! Component: 150  -  total flux cleaned = 1.67142 Jy
! Component: 200  -  total flux cleaned = 1.73073 Jy
! Total flux subtracted in 200 components = 1.73073 Jy
! Clean residual min=-0.008616 max=0.031291 Jy/beam
! Clean residual mean=0.000101 rms=0.002461 Jy/beam
! Combined flux in latest and established models = 1.73073 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 18 model components to the UV plane model.
! The established model now contains 18 components and 1.73073 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.82 mas, bmaj=3.162 mas, bpa=-6.848 degrees
! Estimated noise=269.887 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.0650259 Jy
! Component: 100  -  total flux cleaned = 0.100301 Jy
! Component: 150  -  total flux cleaned = 0.121856 Jy
! Component: 200  -  total flux cleaned = 0.136096 Jy
! Total flux subtracted in 200 components = 0.136096 Jy
! Clean residual min=-0.003243 max=0.007815 Jy/beam
! Clean residual mean=0.000302 rms=0.001041 Jy/beam
! Combined flux in latest and established models = 1.86683 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 64 components and 1.86683 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00972504 Jy
! Component: 100  -  total flux cleaned = 0.0166163 Jy
! Component: 150  -  total flux cleaned = 0.0218212 Jy
! Component: 200  -  total flux cleaned = 0.0246478 Jy
! Total flux subtracted in 200 components = 0.0246478 Jy
! Clean residual min=-0.002749 max=0.003100 Jy/beam
! Clean residual mean=0.000142 rms=0.000780 Jy/beam
! Combined flux in latest and established models = 1.89148 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 81 components and 1.89148 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.752 mas, bmaj=8.616 mas, bpa=26.4 degrees
! Estimated noise=380.82 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00641038 Jy
! Component: 100  -  total flux cleaned = 0.0103061 Jy
! Component: 150  -  total flux cleaned = 0.0130575 Jy
! Component: 200  -  total flux cleaned = 0.0150905 Jy
! Total flux subtracted in 200 components = 0.0150905 Jy
! Clean residual min=-0.002407 max=0.003986 Jy/beam
! Clean residual mean=0.000222 rms=0.000989 Jy/beam
! Combined flux in latest and established models = 1.90657 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.00156004 Jy
! Component: 100  -  total flux cleaned = 0.00245946 Jy
! Component: 150  -  total flux cleaned = 0.00280174 Jy
! Component: 200  -  total flux cleaned = 0.00307226 Jy
! Total flux subtracted in 200 components = 0.00307226 Jy
! Clean residual min=-0.002453 max=0.003759 Jy/beam
! Clean residual mean=0.000178 rms=0.000958 Jy/beam
! Combined flux in latest and established models = 1.90964 Jy
! Adding 71 model components to the UV plane model.
! The established model now contains 141 components and 1.90964 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.82 mas, bmaj=3.162 mas, bpa=-6.848 degrees
! Estimated noise=269.887 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000789653 Jy
! Component: 100  -  total flux cleaned = 6.03414e-05 Jy
! Component: 150  -  total flux cleaned = 6.02621e-05 Jy
! Component: 200  -  total flux cleaned = 0.000255479 Jy
! Total flux subtracted in 200 components = 0.000255479 Jy
! Clean residual min=-0.002790 max=0.002773 Jy/beam
! Clean residual mean=0.000060 rms=0.000709 Jy/beam
! Combined flux in latest and established models = 1.9099 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 145 components and 1.9099 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=6.226091Jy  sigma=0.002403
! Fit after  self-cal, rms=6.226094Jy  sigma=0.002403
wmodel J0102+5824_S_1998_10_01_pus_map.mod
! Writing 145 model components to file: J0102+5824_S_1998_10_01_pus_map.mod
wobs J0102+5824_S_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J0102+5824_S_1998_10_01_pus_uvs.fits
wwins J0102+5824_S_1998_10_01_pus_map.win
! wwins: Wrote 5 windows to J0102+5824_S_1998_10_01_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000359599 Jy
! Component: 100  -  total flux cleaned = 0.000983745 Jy
! Component: 150  -  total flux cleaned = 0.00121137 Jy
! Component: 200  -  total flux cleaned = 0.00147928 Jy
! Component: 250  -  total flux cleaned = 0.00169756 Jy
! Component: 300  -  total flux cleaned = 0.0018263 Jy
! Component: 350  -  total flux cleaned = 0.00207938 Jy
! Component: 400  -  total flux cleaned = 0.00245262 Jy
! Component: 450  -  total flux cleaned = 0.00265696 Jy
! Component: 500  -  total flux cleaned = 0.00298002 Jy
! Component: 550  -  total flux cleaned = 0.00321907 Jy
! Component: 600  -  total flux cleaned = 0.00345591 Jy
! Component: 650  -  total flux cleaned = 0.00372998 Jy
! Component: 700  -  total flux cleaned = 0.00396262 Jy
! Component: 750  -  total flux cleaned = 0.00419345 Jy
! Component: 800  -  total flux cleaned = 0.00445945 Jy
! Component: 850  -  total flux cleaned = 0.00457266 Jy
! Component: 900  -  total flux cleaned = 0.00479716 Jy
! Component: 950  -  total flux cleaned = 0.00494564 Jy
! Component: 1000  -  total flux cleaned = 0.00509311 Jy
! Component: 1050  -  total flux cleaned = 0.0052396 Jy
! Component: 1100  -  total flux cleaned = 0.0053849 Jy
! Component: 1150  -  total flux cleaned = 0.0055654 Jy
! Component: 1200  -  total flux cleaned = 0.0055654 Jy
! Component: 1250  -  total flux cleaned = 0.00577956 Jy
! Component: 1300  -  total flux cleaned = 0.00585045 Jy
! Component: 1350  -  total flux cleaned = 0.00595629 Jy
! Component: 1400  -  total flux cleaned = 0.00595619 Jy
! Component: 1450  -  total flux cleaned = 0.00606092 Jy
! Component: 1500  -  total flux cleaned = 0.00616494 Jy
! Component: 1550  -  total flux cleaned = 0.0061997 Jy
! Component: 1600  -  total flux cleaned = 0.00630291 Jy
! Component: 1650  -  total flux cleaned = 0.00640572 Jy
! Component: 1700  -  total flux cleaned = 0.00650772 Jy
! Component: 1750  -  total flux cleaned = 0.00660931 Jy
! Component: 1800  -  total flux cleaned = 0.00664285 Jy
! Component: 1850  -  total flux cleaned = 0.00667652 Jy
! Component: 1900  -  total flux cleaned = 0.00681014 Jy
! Component: 1950  -  total flux cleaned = 0.00681012 Jy
! Component: 2000  -  total flux cleaned = 0.0070421 Jy
! Total flux subtracted in 2048 components = 0.00707508 Jy
! Clean residual min=-0.001989 max=0.002328 Jy/beam
! Clean residual mean=0.000025 rms=0.000630 Jy/beam
! Combined flux in latest and established models = 1.91697 Jy
keep
! Adding 163 model components to the UV plane model.
! The established model now contains 305 components and 1.91697 Jy
![Exited script file: muppet]
wmap "J0102+5824_S_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.82 x 3.162 at -6.848 degrees (North through East)
! Clean map  min=-0.0026429  max=1.6756 Jy/beam
! Writing clean map to FITS file: J0102+5824_S_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.67561 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00062894 
device "J0102+5824_S_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J0102+5824_S_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.112605 0.112605 0.22521 0.45042 0.90084 1.80168 3.60336 7.20672 14.4134 28.8269 57.6537
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0018 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.675 
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.82 x 3.162 at -6.848 degrees (North through East)
! Clean map  min=-0.0026429  max=1.6756 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0102+5824_S_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J0102+5824_S_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0102+5824_S_1998_10_01_pus_uvs.log closed on Thu Feb  7 16:59:57 2008