! Started logfile: J0958+4725_S_2001_10_29_pus_uvs.log on Wed Feb 27 15:18:22 2008
obs J0958+4725_S_2001_10_29_pus_uva.fits
! Reading UV FITS file: J0958+4725_S_2001_10_29_pus_uva.fits
! AN table 1: 104 integrations on 153 of 153 possible baselines.
! AN table 2: 179 integrations on 153 of 153 possible baselines.
! AN table 3: 325 integrations on 153 of 153 possible baselines.
! AN table 4: 122 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.138258 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0958+4725
! 
! 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.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2604 lines of history.
! 
! Reading 61768 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 J0958+4725_S_2001_10_29_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 1390 telescope corrections were flagged in sub-array 1.
!  A total of 1685 telescope corrections were flagged in sub-array 2.
!  A total of 4255 telescope corrections were flagged in sub-array 3.
!  A total of 1537 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1390 telescope corrections were flagged in sub-array 1.
!  A total of 1685 telescope corrections were flagged in sub-array 2.
!  A total of 4255 telescope corrections were flagged in sub-array 3.
!  A total of 1537 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1390 telescope corrections were flagged in sub-array 1.
!  A total of 1685 telescope corrections were flagged in sub-array 2.
!  A total of 4255 telescope corrections were flagged in sub-array 3.
!  A total of 1537 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1477 telescope corrections were flagged in sub-array 1.
!  A total of 1685 telescope corrections were flagged in sub-array 2.
!  A total of 4554 telescope corrections were flagged in sub-array 3.
!  A total of 1767 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.632058Jy  sigma=0.004747
! Fit after  self-cal, rms=0.228279Jy  sigma=0.001488
! 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.714 mas, bmaj=2.695 mas, bpa=-11.35 degrees
! Estimated noise=812.593 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.757064 Jy
! Component: 100  -  total flux cleaned = 0.922484 Jy
! Total flux subtracted in 100 components = 0.922484 Jy
! Clean residual min=-0.013902 max=0.050120 Jy/beam
! Clean residual mean=0.000092 rms=0.003824 Jy/beam
! Combined flux in latest and established models = 0.922484 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.922484 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.239862Jy  sigma=0.001622
! Fit after  self-cal, rms=0.239858Jy  sigma=0.001622
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0547496 Jy
! Component: 100  -  total flux cleaned = 0.0864918 Jy
! Total flux subtracted in 100 components = 0.0864918 Jy
! Clean residual min=-0.011578 max=0.017229 Jy/beam
! Clean residual mean=0.000030 rms=0.002823 Jy/beam
! Combined flux in latest and established models = 1.00898 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 19 components and 1.00898 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222556Jy  sigma=0.001432
! Fit after  self-cal, rms=0.222493Jy  sigma=0.001432
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0219683 Jy
! Component: 100  -  total flux cleaned = 0.0375466 Jy
! Total flux subtracted in 100 components = 0.0375466 Jy
! Clean residual min=-0.011429 max=0.012662 Jy/beam
! Clean residual mean=0.000003 rms=0.002608 Jy/beam
! Combined flux in latest and established models = 1.04652 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 25 components and 1.04652 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.220116Jy  sigma=0.001402
! Fit after  self-cal, rms=0.220093Jy  sigma=0.001402
! 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.046 mas, bmaj=3.372 mas, bpa=-15.51 degrees
! Estimated noise=365.069 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 (4, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0105048 Jy
! Component: 100  -  total flux cleaned = 0.0131137 Jy
! Component: 150  -  total flux cleaned = 0.014958 Jy
! Component: 200  -  total flux cleaned = 0.0157395 Jy
! Total flux subtracted in 200 components = 0.0157395 Jy
! Clean residual min=-0.011477 max=0.010819 Jy/beam
! Clean residual mean=0.000046 rms=0.001991 Jy/beam
! Combined flux in latest and established models = 1.06226 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 41 components and 1.06226 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.219300Jy  sigma=0.001393
! Fit after  self-cal, rms=0.219237Jy  sigma=0.001392
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.93     KK        1.00*    KP        1.01     LA        0.95     
!   MA        1.02     MC        0.96     MK        1.00*    NL        0.97     
!   OV        1.03     PT        0.95     SC        1.00     TS        1.00*    
!   WF        0.91     WZ        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.94     KK        0.95     KP        1.05     LA        1.00     
!   MA        1.00*    MC        1.00*    MK        1.01     NL        0.98     
!   OV        0.99     PT        1.01     SC        1.00*    TS        0.95     
!   WF        1.06     WZ        1.04     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.99     KK        1.04     KP        1.02     LA        0.96     
!   MA        1.03     MC        1.01     MK        1.00     NL        1.03     
!   OV        1.00     PT        0.99     SC        1.01     TS        1.04     
!   WF        1.04     WZ        1.00     
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.00     KP        1.02     LA        0.97     
!   MA        0.96     MC        1.03     MK        0.99     NL        0.91     
!   OV        0.95     PT        1.01     SC        1.01     TS        1.01     
!   WF        0.96     WZ        0.98     
! 
! 
! Correcting IF 2.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.94     KK        1.00*    KP        1.18     LA        0.92     
!   MA        1.11     MC        0.91     MK        1.00*    NL        0.97     
!   OV        1.06     PT        0.95     SC        1.01     TS        1.00*    
!   WF        0.98     WZ        0.97     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        0.97     KP        1.01     LA        0.98     
!   MA        1.00*    MC        1.00*    MK        1.01     NL        1.00     
!   OV        1.02     PT        1.00     SC        1.00*    TS        0.98     
!   WF        1.01     WZ        1.06     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.97     KK        1.02     KP        0.98     LA        0.92     
!   MA        0.82     MC        1.03     MK        1.01     NL        1.06     
!   OV        1.01     PT        0.97     SC        1.01     TS        1.09     
!   WF        0.99     WZ        1.01     
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.01     KP        1.00     LA        0.96     
!   MA        0.93     MC        1.06     MK        1.02     NL        0.94     
!   OV        1.00     PT        0.98     SC        1.00     TS        1.03     
!   WF        1.04     WZ        0.96     
! 
! 
! Correcting IF 3.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.95     KK        1.00*    KP        1.04     LA        0.90     
!   MA        0.99     MC        0.91     MK        1.00*    NL        0.97     
!   OV        1.07     PT        0.97     SC        1.00     TS        1.00*    
!   WF        0.99     WZ        0.98     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.99     KK        0.95     KP        1.01     LA        0.97     
!   MA        1.00*    MC        1.00*    MK        0.97     NL        0.99     
!   OV        1.01     PT        1.00     SC        1.00*    TS        0.97     
!   WF        0.93     WZ        1.09     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.02     KP        0.99     LA        0.93     
!   MA        0.97     MC        1.18     MK        0.97     NL        1.04     
!   OV        1.01     PT        1.01     SC        1.02     TS        1.05     
!   WF        1.01     WZ        1.01     
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.97     KK        1.04     KP        0.99     LA        0.95     
!   MA        1.17     MC        1.53     MK        0.97     NL        0.92     
!   OV        0.98     PT        1.00     SC        1.00     TS        1.02     
!   WF        1.03     WZ        0.97     
! 
! 
! Correcting IF 4.
!  A total of 177 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.91     KK        1.00*    KP        1.05     LA        0.94     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        0.99     
!   OV        1.00     PT        0.96     SC        1.01     TS        1.00*    
!   WF        1.05     WZ        1.03     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.99     KK        0.98     KP        1.02     LA        0.99     
!   MA        1.00*    MC        1.00*    MK        1.00     NL        1.02     
!   OV        1.00     PT        0.98     SC        1.00*    TS        0.99     
!   WF        1.03     WZ        1.09     
! 
!  A total of 162 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        0.98     KP        0.97     LA        0.95     
!   MA        1.00*    MC        1.00*    MK        1.00     NL        1.13     
!   OV        0.97     PT        1.66     SC        1.02     TS        1.08     
!   WF        1.02     WZ        1.01     
! 
!  A total of 54 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.97     KK        0.98     KP        1.03     LA        0.97     
!   MA        1.00*    MC        1.00*    MK        1.00     NL        0.95     
!   OV        0.95     PT        1.03     SC        0.99     TS        1.04     
!   WF        1.02     WZ        0.98     
! 
! 
! Fit before self-cal, rms=0.219237Jy  sigma=0.001392
! Fit after  self-cal, rms=0.209973Jy  sigma=0.001279
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.053 mas, bmaj=3.398 mas, bpa=-15.85 degrees
! Estimated noise=368.413 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.00149659 Jy
! Component: 100  -  total flux cleaned = 0.00134921 Jy
! Component: 150  -  total flux cleaned = 0.00133402 Jy
! Component: 200  -  total flux cleaned = 0.00132924 Jy
! Total flux subtracted in 200 components = 0.00132924 Jy
! Clean residual min=-0.004214 max=0.003937 Jy/beam
! Clean residual mean=-0.000001 rms=0.000913 Jy/beam
! Combined flux in latest and established models = 1.06359 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 56 components and 1.06359 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.209805Jy  sigma=0.001277
! Fit after  self-cal, rms=0.209896Jy  sigma=0.001277
! 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.209896Jy  sigma=0.001277
! Fit after  self-cal, rms=0.208491Jy  sigma=0.001265
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.056 mas, bmaj=3.395 mas, bpa=-15.75 degrees
! Estimated noise=368.26 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000716689 Jy
! Component: 100  -  total flux cleaned = 0.000514979 Jy
! Component: 150  -  total flux cleaned = 0.000440053 Jy
! Component: 200  -  total flux cleaned = 0.000510642 Jy
! Total flux subtracted in 200 components = 0.000510642 Jy
! Clean residual min=-0.003295 max=0.002713 Jy/beam
! Clean residual mean=-0.000017 rms=0.000706 Jy/beam
! Combined flux in latest and established models = 1.0641 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 66 components and 1.0641 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208412Jy  sigma=0.001264
! Fit after  self-cal, rms=0.208430Jy  sigma=0.001264
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.000198851 Jy
! Component: 100  -  total flux cleaned = 0.000252843 Jy
! Component: 150  -  total flux cleaned = 0.000303367 Jy
! Component: 200  -  total flux cleaned = 0.000304637 Jy
! Total flux subtracted in 200 components = 0.000304637 Jy
! Clean residual min=-0.003118 max=0.002653 Jy/beam
! Clean residual mean=-0.000019 rms=0.000690 Jy/beam
! Combined flux in latest and established models = 1.06441 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 72 components and 1.06441 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208404Jy  sigma=0.001264
! Fit after  self-cal, rms=0.208404Jy  sigma=0.001264
! 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.208404Jy  sigma=0.001264
! Fit after  self-cal, rms=0.208391Jy  sigma=0.001264
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.057 mas, bmaj=3.396 mas, bpa=-15.75 degrees
! Estimated noise=368.223 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000227202 Jy
! Component: 100  -  total flux cleaned = -0.000338274 Jy
! Component: 150  -  total flux cleaned = -0.000336372 Jy
! Component: 200  -  total flux cleaned = -0.00029427 Jy
! Total flux subtracted in 200 components = -0.00029427 Jy
! Clean residual min=-0.002892 max=0.002655 Jy/beam
! Clean residual mean=-0.000018 rms=0.000669 Jy/beam
! Combined flux in latest and established models = 1.06411 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 75 components and 1.06411 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208367Jy  sigma=0.001264
! Fit after  self-cal, rms=0.208367Jy  sigma=0.001264
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 = -1.88915e-05 Jy
! Component: 100  -  total flux cleaned = -5.51643e-05 Jy
! Component: 150  -  total flux cleaned = -5.478e-05 Jy
! Component: 200  -  total flux cleaned = -8.64845e-05 Jy
! Total flux subtracted in 200 components = -8.64845e-05 Jy
! Clean residual min=-0.002824 max=0.002613 Jy/beam
! Clean residual mean=-0.000018 rms=0.000663 Jy/beam
! Combined flux in latest and established models = 1.06403 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 79 components and 1.06403 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208355Jy  sigma=0.001263
! Fit after  self-cal, rms=0.208356Jy  sigma=0.001263
! 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.208356Jy  sigma=0.001263
! Fit after  self-cal, rms=0.208395Jy  sigma=0.001263
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.681 mas, bmaj=9.861 mas, bpa=82.76 degrees
! Estimated noise=593.084 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 3.11716e-05 Jy
! Component: 100  -  total flux cleaned = -0.000226806 Jy
! Component: 150  -  total flux cleaned = -0.000373575 Jy
! Component: 200  -  total flux cleaned = -0.000486514 Jy
! Total flux subtracted in 200 components = -0.000486514 Jy
! Clean residual min=-0.003000 max=0.002558 Jy/beam
! Clean residual mean=-0.000062 rms=0.000945 Jy/beam
! Combined flux in latest and established models = 1.06354 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 88 components and 1.06354 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208390Jy  sigma=0.001263
! Fit after  self-cal, rms=0.208390Jy  sigma=0.001263
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 = 1.82407e-05 Jy
! Component: 100  -  total flux cleaned = -7.21989e-05 Jy
! Component: 150  -  total flux cleaned = -9.16693e-05 Jy
! Component: 200  -  total flux cleaned = -0.000128761 Jy
! Total flux subtracted in 200 components = -0.000128761 Jy
! Clean residual min=-0.002892 max=0.002556 Jy/beam
! Clean residual mean=-0.000060 rms=0.000934 Jy/beam
! Combined flux in latest and established models = 1.06341 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 91 components and 1.06341 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208391Jy  sigma=0.001263
! Fit after  self-cal, rms=0.208391Jy  sigma=0.001263
! 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.058 mas, bmaj=3.396 mas, bpa=-15.75 degrees
! Estimated noise=368.245 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.058 x 3.396 at -15.75 degrees (North through East)
! Clean map  min=-0.0023758  max=0.99026 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.208391Jy  sigma=0.001263
! Fit after  self-cal, rms=0.201997Jy  sigma=0.001130
! Inverting map and beam 
! Estimated beam: bmin=2.059 mas, bmaj=3.398 mas, bpa=-15.73 degrees
! Estimated noise=367.914 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00142041 Jy
! Component: 100  -  total flux cleaned = -0.00177599 Jy
! Component: 150  -  total flux cleaned = -0.00192179 Jy
! Component: 200  -  total flux cleaned = -0.00201701 Jy
! Total flux subtracted in 200 components = -0.00201701 Jy
! Clean residual min=-0.001934 max=0.001823 Jy/beam
! Clean residual mean=-0.000014 rms=0.000483 Jy/beam
! Combined flux in latest and established models = 1.06139 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 98 components and 1.06139 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201976Jy  sigma=0.001130
! Fit after  self-cal, rms=0.201974Jy  sigma=0.001130
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00023 Jy
! Component: 100  -  total flux cleaned = -0.000284968 Jy
! Component: 150  -  total flux cleaned = -0.000284626 Jy
! Component: 200  -  total flux cleaned = -0.00030975 Jy
! Total flux subtracted in 200 components = -0.00030975 Jy
! Clean residual min=-0.001889 max=0.001822 Jy/beam
! Clean residual mean=-0.000013 rms=0.000479 Jy/beam
! Combined flux in latest and established models = 1.06108 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 105 components and 1.06108 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201967Jy  sigma=0.001130
! Fit after  self-cal, rms=0.201966Jy  sigma=0.001130
! 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.201966Jy  sigma=0.001130
! Fit after  self-cal, rms=0.201883Jy  sigma=0.001130
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.735 mas, bmaj=2.713 mas, bpa=-11 degrees
! Estimated noise=822.879 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.760667 Jy
! Component: 100  -  total flux cleaned = 0.92656 Jy
! Component: 150  -  total flux cleaned = 0.975506 Jy
! Component: 200  -  total flux cleaned = 1.00094 Jy
! Total flux subtracted in 200 components = 1.00094 Jy
! Clean residual min=-0.004889 max=0.012490 Jy/beam
! Clean residual mean=0.000044 rms=0.001307 Jy/beam
! Combined flux in latest and established models = 1.00094 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 12 model components to the UV plane model.
! The established model now contains 12 components and 1.00094 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.06 mas, bmaj=3.399 mas, bpa=-15.73 degrees
! Estimated noise=367.785 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.0234768 Jy
! Component: 100  -  total flux cleaned = 0.0359234 Jy
! Component: 150  -  total flux cleaned = 0.0438589 Jy
! Component: 200  -  total flux cleaned = 0.0491181 Jy
! Total flux subtracted in 200 components = 0.0491181 Jy
! Clean residual min=-0.002294 max=0.003967 Jy/beam
! Clean residual mean=0.000046 rms=0.000620 Jy/beam
! Combined flux in latest and established models = 1.05006 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 43 components and 1.05006 Jy
! Inverting map 
! Added new window around map position (4, -6.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00403322 Jy
! Component: 100  -  total flux cleaned = 0.00641425 Jy
! Component: 150  -  total flux cleaned = 0.00764643 Jy
! Component: 200  -  total flux cleaned = 0.00872648 Jy
! Total flux subtracted in 200 components = 0.00872648 Jy
! Clean residual min=-0.001885 max=0.002088 Jy/beam
! Clean residual mean=-0.000002 rms=0.000481 Jy/beam
! Combined flux in latest and established models = 1.05878 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 59 components and 1.05878 Jy
! Inverting map 
! Added new window around map position (-16.5, 29).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00178998 Jy
! Component: 100  -  total flux cleaned = 0.00272167 Jy
! Component: 150  -  total flux cleaned = 0.00333584 Jy
! Component: 200  -  total flux cleaned = 0.00375357 Jy
! Total flux subtracted in 200 components = 0.00375357 Jy
! Clean residual min=-0.001841 max=0.001832 Jy/beam
! Clean residual mean=-0.000020 rms=0.000458 Jy/beam
! Combined flux in latest and established models = 1.06254 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 73 components and 1.06254 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.681 mas, bmaj=9.863 mas, bpa=82.62 degrees
! Estimated noise=591.476 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -1.75299e-05 Jy
! Component: 100  -  total flux cleaned = -4.85324e-05 Jy
! Component: 150  -  total flux cleaned = -4.87855e-05 Jy
! Component: 200  -  total flux cleaned = -2.7909e-05 Jy
! Total flux subtracted in 200 components = -2.7909e-05 Jy
! Clean residual min=-0.002680 max=0.001820 Jy/beam
! Clean residual mean=-0.000081 rms=0.000726 Jy/beam
! Combined flux in latest and established models = 1.06251 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 = -1.83776e-05 Jy
! Component: 100  -  total flux cleaned = -5.3057e-05 Jy
! Component: 150  -  total flux cleaned = -8.52032e-05 Jy
! Component: 200  -  total flux cleaned = -0.000100479 Jy
! Total flux subtracted in 200 components = -0.000100479 Jy
! Clean residual min=-0.002714 max=0.001823 Jy/beam
! Clean residual mean=-0.000080 rms=0.000721 Jy/beam
! Combined flux in latest and established models = 1.06241 Jy
! Adding 21 model components to the UV plane model.
! The established model now contains 93 components and 1.06241 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.06 mas, bmaj=3.399 mas, bpa=-15.73 degrees
! Estimated noise=367.785 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000169923 Jy
! Component: 100  -  total flux cleaned = 0.000246421 Jy
! Component: 150  -  total flux cleaned = 0.000282225 Jy
! Component: 200  -  total flux cleaned = 0.000315525 Jy
! Total flux subtracted in 200 components = 0.000315525 Jy
! Clean residual min=-0.001819 max=0.001762 Jy/beam
! Clean residual mean=-0.000022 rms=0.000449 Jy/beam
! Combined flux in latest and established models = 1.06272 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 104 components and 1.06272 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201877Jy  sigma=0.001129
! Fit after  self-cal, rms=0.201869Jy  sigma=0.001129
wmodel J0958+4725_S_2001_10_29_pus_map.mod
! Writing 104 model components to file: J0958+4725_S_2001_10_29_pus_map.mod
wobs J0958+4725_S_2001_10_29_pus_uvs.fits
! Writing UV FITS file: J0958+4725_S_2001_10_29_pus_uvs.fits
wwins J0958+4725_S_2001_10_29_pus_map.win
! wwins: Wrote 4 windows to J0958+4725_S_2001_10_29_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 = -5.44833e-05 Jy
! Component: 100  -  total flux cleaned = -0.000366474 Jy
! Component: 150  -  total flux cleaned = -0.000662486 Jy
! Component: 200  -  total flux cleaned = -0.000918872 Jy
! Component: 250  -  total flux cleaned = -0.00100177 Jy
! Component: 300  -  total flux cleaned = -0.00102972 Jy
! Component: 350  -  total flux cleaned = -0.00105574 Jy
! Component: 400  -  total flux cleaned = -0.00105522 Jy
! Component: 450  -  total flux cleaned = -0.00100501 Jy
! Component: 500  -  total flux cleaned = -0.000980689 Jy
! Component: 550  -  total flux cleaned = -0.000980713 Jy
! Component: 600  -  total flux cleaned = -0.000956657 Jy
! Component: 650  -  total flux cleaned = -0.000885944 Jy
! Component: 700  -  total flux cleaned = -0.00081643 Jy
! Component: 750  -  total flux cleaned = -0.000770785 Jy
! Component: 800  -  total flux cleaned = -0.00074833 Jy
! Component: 850  -  total flux cleaned = -0.000770812 Jy
! Component: 900  -  total flux cleaned = -0.00079273 Jy
! Component: 950  -  total flux cleaned = -0.000748855 Jy
! Component: 1000  -  total flux cleaned = -0.000705698 Jy
! Component: 1050  -  total flux cleaned = -0.000727505 Jy
! Component: 1100  -  total flux cleaned = -0.000770243 Jy
! Component: 1150  -  total flux cleaned = -0.000812247 Jy
! Component: 1200  -  total flux cleaned = -0.000854111 Jy
! Component: 1250  -  total flux cleaned = -0.00089537 Jy
! Component: 1300  -  total flux cleaned = -0.000792569 Jy
! Component: 1350  -  total flux cleaned = -0.000874569 Jy
! Component: 1400  -  total flux cleaned = -0.000895006 Jy
! Component: 1450  -  total flux cleaned = -0.000975582 Jy
! Component: 1500  -  total flux cleaned = -0.000955459 Jy
! Component: 1550  -  total flux cleaned = -0.000995189 Jy
! Component: 1600  -  total flux cleaned = -0.00101493 Jy
! Component: 1650  -  total flux cleaned = -0.00105422 Jy
! Component: 1700  -  total flux cleaned = -0.00113211 Jy
! Component: 1750  -  total flux cleaned = -0.00107413 Jy
! Component: 1800  -  total flux cleaned = -0.00117046 Jy
! Component: 1850  -  total flux cleaned = -0.00117055 Jy
! Component: 1900  -  total flux cleaned = -0.00118962 Jy
! Component: 1950  -  total flux cleaned = -0.00118949 Jy
! Component: 2000  -  total flux cleaned = -0.00122705 Jy
! Total flux subtracted in 2048 components = -0.0012084 Jy
! Clean residual min=-0.001229 max=0.001323 Jy/beam
! Clean residual mean=-0.000022 rms=0.000344 Jy/beam
! Combined flux in latest and established models = 1.06151 Jy
keep
! Adding 166 model components to the UV plane model.
! The established model now contains 270 components and 1.06152 Jy
![Exited script file: muppet]
wmap "J0958+4725_S_2001_10_29_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.06 x 3.399 at -15.73 degrees (North through East)
! Clean map  min=-0.0014041  max=0.99096 Jy/beam
! Writing clean map to FITS file: J0958+4725_S_2001_10_29_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.990961 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000343979 
device "J0958+4725_S_2001_10_29_pus\_map.eps/VPS"
! Attempting to open device: 'J0958+4725_S_2001_10_29_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.104135 0.104135 0.20827 0.41654 0.83308 1.66616 3.33232 6.66464 13.3293 26.6585 53.3171
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.99 
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.06 x 3.399 at -15.73 degrees (North through East)
! Clean map  min=-0.0014041  max=0.99096 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0958+4725_S_2001_10_29_pus\_map.gif/vgif"
! Attempting to open device: 'J0958+4725_S_2001_10_29_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0958+4725_S_2001_10_29_pus_uvs.log closed on Wed Feb 27 15:18:48 2008