! Started logfile: J0102+5824_S_2003_05_07_pus_uvs.log on Sun Dec 24 09:01:43 2006
obs J0102+5824_S_2003_05_07_pus_uva.fits
! Reading UV FITS file: J0102+5824_S_2003_05_07_pus_uva.fits
! AN table 1: 78 integrations on 171 of 171 possible baselines.
! AN table 2: 150 integrations on 171 of 171 possible baselines.
! AN table 3: 16 integrations on 171 of 171 possible baselines.
! AN table 4: 96 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.220382 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.23697e+09        8e+06          1        8e+06
!  02        2  2.26697e+09        8e+06          1        8e+06
!  03        3  2.35697e+09        8e+06          1        8e+06
!  04        4  2.37697e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1680 lines of history.
! 
! Reading 51252 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
float field_size
field_size = 512
float field_cell
field_cell = 0.5
float taper_size
taper_size = 20.
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 1200 telescope corrections were flagged in sub-array 1.
!  A total of 1519 telescope corrections were flagged in sub-array 2.
!  A total of 262 telescope corrections were flagged in sub-array 3.
!  A total of 1132 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1230 telescope corrections were flagged in sub-array 1.
!  A total of 1574 telescope corrections were flagged in sub-array 2.
!  A total of 274 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1230 telescope corrections were flagged in sub-array 1.
!  A total of 1574 telescope corrections were flagged in sub-array 2.
!  A total of 274 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1200 telescope corrections were flagged in sub-array 1.
!  A total of 1519 telescope corrections were flagged in sub-array 2.
!  A total of 262 telescope corrections were flagged in sub-array 3.
!  A total of 1131 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.436438Jy  sigma=0.011007
! Fit after  self-cal, rms=1.005502Jy  sigma=0.007974
! 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.89 mas, bmaj=2.386 mas, bpa=-11.68 degrees
! Estimated noise=918.26 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.37502 Jy
! Component: 100  -  total flux cleaned = 1.70643 Jy
! Total flux subtracted in 100 components = 1.70643 Jy
! Clean residual min=-0.033132 max=0.135675 Jy/beam
! Clean residual mean=0.000268 rms=0.010475 Jy/beam
! Combined flux in latest and established models = 1.70643 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 1.70643 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.522016Jy  sigma=0.003712
! Fit after  self-cal, rms=0.521996Jy  sigma=0.003712
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.163336 Jy
! Component: 100  -  total flux cleaned = 0.268208 Jy
! Total flux subtracted in 100 components = 0.268208 Jy
! Clean residual min=-0.026966 max=0.056309 Jy/beam
! Clean residual mean=0.000080 rms=0.007196 Jy/beam
! Combined flux in latest and established models = 1.97463 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 16 components and 1.97463 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.443502Jy  sigma=0.002765
! Fit after  self-cal, rms=0.443278Jy  sigma=0.002764
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0701314 Jy
! Component: 100  -  total flux cleaned = 0.117335 Jy
! Total flux subtracted in 100 components = 0.117335 Jy
! Clean residual min=-0.024054 max=0.039939 Jy/beam
! Clean residual mean=-0.000002 rms=0.006316 Jy/beam
! Combined flux in latest and established models = 2.09197 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 20 components and 2.09197 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.429071Jy  sigma=0.002530
! Fit after  self-cal, rms=0.428998Jy  sigma=0.002529
! Inverting map 
! Added new window around map position (-16.5, 2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0396903 Jy
! Component: 100  -  total flux cleaned = 0.0654767 Jy
! Total flux subtracted in 100 components = 0.0654767 Jy
! Clean residual min=-0.023902 max=0.037289 Jy/beam
! Clean residual mean=-0.000043 rms=0.005998 Jy/beam
! Combined flux in latest and established models = 2.15745 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 31 components and 2.15745 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.424949Jy  sigma=0.002468
! Fit after  self-cal, rms=0.424725Jy  sigma=0.002465
! 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.376 mas, bmaj=3.082 mas, bpa=-8.845 degrees
! Estimated noise=450.481 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.0345076 Jy
! Component: 100  -  total flux cleaned = 0.0485197 Jy
! Component: 150  -  total flux cleaned = 0.0538365 Jy
! Component: 200  -  total flux cleaned = 0.0575919 Jy
! Total flux subtracted in 200 components = 0.0575919 Jy
! Clean residual min=-0.023753 max=0.028306 Jy/beam
! Clean residual mean=-0.000326 rms=0.006475 Jy/beam
! Combined flux in latest and established models = 2.21504 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 49 components and 2.21504 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.423286Jy  sigma=0.002425
! Fit after  self-cal, rms=0.423232Jy  sigma=0.002424
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 54 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.05     GG        1.00*    HN        0.96     
!   KK        1.11     KP        0.99     LA        1.09     MA        0.93     
!   MC        1.00     MK        0.99     NL        0.98     ON        1.00*    
!   OV        0.98     PT        1.07     SC        1.00*    TC        1.00*    
!   TS        1.00*    WF        1.00*    WZ        1.01     
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GG        1.00*    HN        0.92     
!   KK        1.06     KP        0.96     LA        1.04     MA        0.90     
!   MC        1.27     MK        1.00     NL        0.95     ON        1.00     
!   OV        1.28     PT        1.00     SC        0.99     TC        1.00*    
!   TS        1.03     WF        1.00     WZ        0.99     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        0.93     
!   MC        1.11     MK        1.00*    NL        1.00*    ON        1.13     
!   OV        1.00*    PT        1.00*    SC        1.00*    TC        1.00*    
!   TS        1.04     WF        1.00*    WZ        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.02     GG        1.00*    HN        0.99     
!   KK        1.10     KP        0.93     LA        1.08     MA        1.76     
!   MC        0.98     MK        1.00     NL        0.97     ON        1.02     
!   OV        0.99     PT        1.06     SC        0.87     TC        1.00*    
!   TS        1.20     WF        0.96     WZ        1.03     
! 
! 
! Correcting IF 2.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.08     GG        1.00*    HN        1.02     
!   KK        1.15     KP        1.02     LA        1.03     MA        1.05     
!   MC        1.05     MK        1.03     NL        1.01     ON        1.00*    
!   OV        0.92     PT        1.05     SC        1.00*    TC        1.00*    
!   TS        1.00*    WF        1.00*    WZ        1.01     
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.01     GG        1.00*    HN        1.00     
!   KK        1.12     KP        0.94     LA        0.99     MA        1.03     
!   MC        1.05     MK        1.02     NL        0.97     ON        1.08     
!   OV        1.17     PT        0.99     SC        1.00     TC        1.00*    
!   TS        1.03     WF        1.06     WZ        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.05     FD        1.06     GG        1.00*    HN        1.05     
!   KK        1.12     KP        0.97     LA        1.01     MA        1.15     
!   MC        1.01     MK        1.05     NL        1.00     ON        1.12     
!   OV        0.96     PT        1.04     SC        0.89     TC        1.00*    
!   TS        1.19     WF        1.01     WZ        1.01     
! 
! 
! Correcting IF 3.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.04     GG        1.00*    HN        0.97     
!   KK        1.08     KP        1.03     LA        1.00     MA        1.03     
!   MC        1.10     MK        0.97     NL        1.00     ON        1.00*    
!   OV        0.95     PT        1.08     SC        1.00*    TC        1.00*    
!   TS        1.00*    WF        1.00*    WZ        1.04     
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.95     GG        1.00*    HN        0.99     
!   KK        1.06     KP        0.95     LA        0.98     MA        1.05     
!   MC        0.93     MK        0.97     NL        0.97     ON        1.03     
!   OV        1.25     PT        1.00     SC        1.14     TC        1.00*    
!   TS        1.04     WF        1.05     WZ        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MC        0.00*    MK        0.00*    NL        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TC        0.00*    
!   TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.00     GG        1.00*    HN        1.06     
!   KK        1.06     KP        1.00     LA        1.01     MA        1.02     
!   MC        0.95     MK        0.98     NL        1.00     ON        1.05     
!   OV        0.85     PT        1.05     SC        0.98     TC        1.00*    
!   TS        1.18     WF        1.01     WZ        1.02     
! 
! 
! Correcting IF 4.
!  A total of 54 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.02     GG        1.00*    HN        0.99     
!   KK        1.06     KP        1.00     LA        1.04     MA        1.03     
!   MC        0.99     MK        0.99     NL        0.95     ON        1.00*    
!   OV        1.03     PT        1.02     SC        1.00*    TC        1.00*    
!   TS        1.00*    WF        1.00*    WZ        1.01     
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.95     GG        1.00*    HN        0.98     
!   KK        1.03     KP        0.91     LA        0.98     MA        1.05     
!   MC        0.97     MK        1.00     NL        0.91     ON        0.95     
!   OV        0.94     PT        0.96     SC        1.17     TC        1.00*    
!   TS        0.98     WF        1.05     WZ        0.95     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        1.52     
!   MC        1.00     MK        1.00*    NL        1.00*    ON        1.03     
!   OV        1.00*    PT        1.00*    SC        1.00*    TC        1.00*    
!   TS        0.97     WF        1.00*    WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        1.00     GG        1.00*    HN        1.05     
!   KK        1.05     KP        0.99     LA        1.01     MA        0.98     
!   MC        0.91     MK        1.02     NL        0.94     ON        0.96     
!   OV        0.63     PT        1.00     SC        0.99     TC        1.00*    
!   TS        1.15     WF        1.03     WZ        0.99     
! 
! 
! Fit before self-cal, rms=0.423232Jy  sigma=0.002424
! Fit after  self-cal, rms=0.364587Jy  sigma=0.001865
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.384 mas, bmaj=3.111 mas, bpa=-8.371 degrees
! Estimated noise=450.914 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.012585 Jy
! Component: 100  -  total flux cleaned = -0.017 Jy
! Component: 150  -  total flux cleaned = -0.0185928 Jy
! Component: 200  -  total flux cleaned = -0.019195 Jy
! Total flux subtracted in 200 components = -0.019195 Jy
! Clean residual min=-0.010838 max=0.014041 Jy/beam
! Clean residual mean=0.000419 rms=0.002941 Jy/beam
! Combined flux in latest and established models = 2.19584 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 59 components and 2.19584 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.364015Jy  sigma=0.001860
! Fit after  self-cal, rms=0.364215Jy  sigma=0.001859
! 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.364215Jy  sigma=0.001859
! Fit after  self-cal, rms=0.353860Jy  sigma=0.001671
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.385 mas, bmaj=3.121 mas, bpa=-8.435 degrees
! Estimated noise=451.578 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00799517 Jy
! Component: 100  -  total flux cleaned = -0.00968344 Jy
! Component: 150  -  total flux cleaned = -0.0112923 Jy
! Component: 200  -  total flux cleaned = -0.0126495 Jy
! Total flux subtracted in 200 components = -0.0126495 Jy
! Clean residual min=-0.006691 max=0.011427 Jy/beam
! Clean residual mean=0.000469 rms=0.001638 Jy/beam
! Combined flux in latest and established models = 2.18319 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 62 components and 2.18319 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353383Jy  sigma=0.001665
! Fit after  self-cal, rms=0.353436Jy  sigma=0.001665
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 (-4.5, -1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00964751 Jy
! Component: 100  -  total flux cleaned = 0.00947652 Jy
! Component: 150  -  total flux cleaned = 0.00861441 Jy
! Component: 200  -  total flux cleaned = 0.00806941 Jy
! Total flux subtracted in 200 components = 0.00806941 Jy
! Clean residual min=-0.006872 max=0.005866 Jy/beam
! Clean residual mean=0.000409 rms=0.001423 Jy/beam
! Combined flux in latest and established models = 2.19126 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 75 components and 2.19126 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353023Jy  sigma=0.001659
! Fit after  self-cal, rms=0.352940Jy  sigma=0.001659
! 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.352940Jy  sigma=0.001659
! Fit after  self-cal, rms=0.353125Jy  sigma=0.001646
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.387 mas, bmaj=3.129 mas, bpa=-8.449 degrees
! Estimated noise=451.795 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000639551 Jy
! Component: 100  -  total flux cleaned = -0.000596545 Jy
! Component: 150  -  total flux cleaned = -0.00162789 Jy
! Component: 200  -  total flux cleaned = -0.00218102 Jy
! Total flux subtracted in 200 components = -0.00218102 Jy
! Clean residual min=-0.005741 max=0.005462 Jy/beam
! Clean residual mean=0.000333 rms=0.001229 Jy/beam
! Combined flux in latest and established models = 2.18908 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 77 components and 2.18908 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352804Jy  sigma=0.001642
! Fit after  self-cal, rms=0.352790Jy  sigma=0.001642
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 = 3.50636e-05 Jy
! Component: 100  -  total flux cleaned = -0.000436742 Jy
! Component: 150  -  total flux cleaned = -0.000861655 Jy
! Component: 200  -  total flux cleaned = -0.00073005 Jy
! Total flux subtracted in 200 components = -0.00073005 Jy
! Clean residual min=-0.005641 max=0.005176 Jy/beam
! Clean residual mean=0.000338 rms=0.001188 Jy/beam
! Combined flux in latest and established models = 2.18835 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 81 components and 2.18835 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352657Jy  sigma=0.001640
! Fit after  self-cal, rms=0.352639Jy  sigma=0.001640
! 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.352639Jy  sigma=0.001640
! Fit after  self-cal, rms=0.353444Jy  sigma=0.001639
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.289 mas, bmaj=9.1 mas, bpa=51.65 degrees
! Estimated noise=616.631 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000944565 Jy
! Component: 100  -  total flux cleaned = 0.000638244 Jy
! Component: 150  -  total flux cleaned = 0.000609469 Jy
! Component: 200  -  total flux cleaned = 0.000803769 Jy
! Total flux subtracted in 200 components = 0.000803769 Jy
! Clean residual min=-0.004034 max=0.007501 Jy/beam
! Clean residual mean=0.000762 rms=0.001716 Jy/beam
! Combined flux in latest and established models = 2.18915 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 89 components and 2.18915 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353387Jy  sigma=0.001639
! Fit after  self-cal, rms=0.353365Jy  sigma=0.001638
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.000415182 Jy
! Component: 100  -  total flux cleaned = 0.000545855 Jy
! Component: 150  -  total flux cleaned = 0.00060362 Jy
! Component: 200  -  total flux cleaned = 0.000603054 Jy
! Total flux subtracted in 200 components = 0.000603054 Jy
! Clean residual min=-0.003977 max=0.007180 Jy/beam
! Clean residual mean=0.000749 rms=0.001714 Jy/beam
! Combined flux in latest and established models = 2.18976 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 94 components and 2.18976 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353350Jy  sigma=0.001638
! Fit after  self-cal, rms=0.353338Jy  sigma=0.001638
! 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.389 mas, bmaj=3.136 mas, bpa=-8.472 degrees
! Estimated noise=452.046 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.389 x 3.136 at -8.472 degrees (North through East)
! Clean map  min=-0.006351  max=1.8732 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.353338Jy  sigma=0.001638
! Fit after  self-cal, rms=0.340281Jy  sigma=0.001385
! Inverting map and beam 
! Estimated beam: bmin=2.391 mas, bmaj=3.138 mas, bpa=-8.477 degrees
! Estimated noise=451.304 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00356055 Jy
! Component: 100  -  total flux cleaned = -0.00533293 Jy
! Component: 150  -  total flux cleaned = -0.00619857 Jy
! Component: 200  -  total flux cleaned = -0.0068235 Jy
! Total flux subtracted in 200 components = -0.0068235 Jy
! Clean residual min=-0.004324 max=0.004602 Jy/beam
! Clean residual mean=0.000291 rms=0.000975 Jy/beam
! Combined flux in latest and established models = 2.18293 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 98 components and 2.18293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340099Jy  sigma=0.001383
! Fit after  self-cal, rms=0.340086Jy  sigma=0.001383
! Inverting map 
! Added new window around map position (-15.5, 15).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00265267 Jy
! Component: 100  -  total flux cleaned = 0.00240414 Jy
! Component: 150  -  total flux cleaned = 0.00251294 Jy
! Component: 200  -  total flux cleaned = 0.00251026 Jy
! Total flux subtracted in 200 components = 0.00251026 Jy
! Clean residual min=-0.004016 max=0.004276 Jy/beam
! Clean residual mean=0.000280 rms=0.000931 Jy/beam
! Combined flux in latest and established models = 2.18544 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 107 components and 2.18544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340000Jy  sigma=0.001382
! Fit after  self-cal, rms=0.339995Jy  sigma=0.001382
! Inverting map 
! Added new window around map position (-37.5, -18.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00429875 Jy
! Component: 100  -  total flux cleaned = 0.00619341 Jy
! Component: 150  -  total flux cleaned = 0.00685062 Jy
! Component: 200  -  total flux cleaned = 0.00720043 Jy
! Total flux subtracted in 200 components = 0.00720043 Jy
! Clean residual min=-0.003755 max=0.003607 Jy/beam
! Clean residual mean=0.000235 rms=0.000870 Jy/beam
! Combined flux in latest and established models = 2.19264 Jy
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 125 components and 2.19264 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339915Jy  sigma=0.001381
! Fit after  self-cal, rms=0.339909Jy  sigma=0.001381
! 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.339909Jy  sigma=0.001381
! Fit after  self-cal, rms=0.340839Jy  sigma=0.001380
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.901 mas, bmaj=2.426 mas, bpa=-11.41 degrees
! Estimated noise=941.044 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.40318 Jy
! Component: 100  -  total flux cleaned = 1.72852 Jy
! Component: 150  -  total flux cleaned = 1.87791 Jy
! Component: 200  -  total flux cleaned = 1.9697 Jy
! Total flux subtracted in 200 components = 1.9697 Jy
! Clean residual min=-0.010348 max=0.047844 Jy/beam
! Clean residual mean=0.000151 rms=0.003505 Jy/beam
! Combined flux in latest and established models = 1.9697 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 15 model components to the UV plane model.
! The established model now contains 15 components and 1.9697 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.393 mas, bmaj=3.143 mas, bpa=-8.5 degrees
! Estimated noise=451.259 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.0923777 Jy
! Component: 100  -  total flux cleaned = 0.138166 Jy
! Component: 150  -  total flux cleaned = 0.163504 Jy
! Component: 200  -  total flux cleaned = 0.179062 Jy
! Total flux subtracted in 200 components = 0.179062 Jy
! Clean residual min=-0.003328 max=0.008857 Jy/beam
! Clean residual mean=0.000489 rms=0.001315 Jy/beam
! Combined flux in latest and established models = 2.14876 Jy
! Adding 49 model components to the UV plane model.
! The established model now contains 54 components and 2.14876 Jy
! Inverting map 
! Added new window around map position (-8.5, -2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0106804 Jy
! Component: 100  -  total flux cleaned = 0.0181804 Jy
! Component: 150  -  total flux cleaned = 0.0239106 Jy
! Component: 200  -  total flux cleaned = 0.0285773 Jy
! Total flux subtracted in 200 components = 0.0285773 Jy
! Clean residual min=-0.003598 max=0.004080 Jy/beam
! Clean residual mean=0.000285 rms=0.000915 Jy/beam
! Combined flux in latest and established models = 2.17734 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 82 components and 2.17734 Jy
! Inverting map 
! Added new window around map position (-21, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00373431 Jy
! Component: 100  -  total flux cleaned = 0.00533958 Jy
! Component: 150  -  total flux cleaned = 0.00683229 Jy
! Component: 200  -  total flux cleaned = 0.00822331 Jy
! Total flux subtracted in 200 components = 0.00822331 Jy
! Clean residual min=-0.003549 max=0.003226 Jy/beam
! Clean residual mean=0.000229 rms=0.000846 Jy/beam
! Combined flux in latest and established models = 2.18556 Jy
! Adding 33 model components to the UV plane model.
! The established model now contains 99 components and 2.18556 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.295 mas, bmaj=9.093 mas, bpa=51.38 degrees
! Estimated noise=614.032 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00444716 Jy
! Component: 100  -  total flux cleaned = 0.00743336 Jy
! Component: 150  -  total flux cleaned = 0.00927956 Jy
! Component: 200  -  total flux cleaned = 0.0103349 Jy
! Total flux subtracted in 200 components = 0.0103349 Jy
! Clean residual min=-0.003020 max=0.004020 Jy/beam
! Clean residual mean=0.000471 rms=0.001181 Jy/beam
! Combined flux in latest and established models = 2.1959 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.000833005 Jy
! Component: 100  -  total flux cleaned = 0.00127844 Jy
! Component: 150  -  total flux cleaned = 0.00162616 Jy
! Component: 200  -  total flux cleaned = 0.00198157 Jy
! Total flux subtracted in 200 components = 0.00198157 Jy
! Clean residual min=-0.002923 max=0.004073 Jy/beam
! Clean residual mean=0.000435 rms=0.001160 Jy/beam
! Combined flux in latest and established models = 2.19788 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 143 components and 2.19788 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.393 mas, bmaj=3.143 mas, bpa=-8.5 degrees
! Estimated noise=451.259 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000425271 Jy
! Component: 100  -  total flux cleaned = -0.00031318 Jy
! Component: 150  -  total flux cleaned = -0.000215728 Jy
! Component: 200  -  total flux cleaned = 5.52814e-05 Jy
! Total flux subtracted in 200 components = 5.52814e-05 Jy
! Clean residual min=-0.003268 max=0.003273 Jy/beam
! Clean residual mean=0.000150 rms=0.000800 Jy/beam
! Combined flux in latest and established models = 2.19793 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 150 components and 2.19793 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340781Jy  sigma=0.001379
! Fit after  self-cal, rms=0.340689Jy  sigma=0.001379
wmodel J0102+5824_S_2003_05_07_pus_map.mod
! Writing 150 model components to file: J0102+5824_S_2003_05_07_pus_map.mod
wobs J0102+5824_S_2003_05_07_pus_uvs.fits
! Writing UV FITS file: J0102+5824_S_2003_05_07_pus_uvs.fits
wwins J0102+5824_S_2003_05_07_pus_map.win
! wwins: Wrote 7 windows to J0102+5824_S_2003_05_07_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.000342676 Jy
! Component: 100  -  total flux cleaned = -0.000511679 Jy
! Component: 150  -  total flux cleaned = -0.000405463 Jy
! Component: 200  -  total flux cleaned = -0.000355145 Jy
! Component: 250  -  total flux cleaned = -0.0001559 Jy
! Component: 300  -  total flux cleaned = -9.34271e-06 Jy
! Component: 350  -  total flux cleaned = 0.000276517 Jy
! Component: 400  -  total flux cleaned = 0.000416096 Jy
! Component: 450  -  total flux cleaned = 0.000507444 Jy
! Component: 500  -  total flux cleaned = 0.000642026 Jy
! Component: 550  -  total flux cleaned = 0.000730921 Jy
! Component: 600  -  total flux cleaned = 0.000906101 Jy
! Component: 650  -  total flux cleaned = 0.001165 Jy
! Component: 700  -  total flux cleaned = 0.00133535 Jy
! Component: 750  -  total flux cleaned = 0.00154594 Jy
! Component: 800  -  total flux cleaned = 0.001754 Jy
! Component: 850  -  total flux cleaned = 0.00191915 Jy
! Component: 900  -  total flux cleaned = 0.00212353 Jy
! Component: 950  -  total flux cleaned = 0.00232626 Jy
! Component: 1000  -  total flux cleaned = 0.0025271 Jy
! Component: 1050  -  total flux cleaned = 0.00280605 Jy
! Component: 1100  -  total flux cleaned = 0.00312189 Jy
! Component: 1150  -  total flux cleaned = 0.00331774 Jy
! Component: 1200  -  total flux cleaned = 0.0035508 Jy
! Component: 1250  -  total flux cleaned = 0.00385938 Jy
! Component: 1300  -  total flux cleaned = 0.00408888 Jy
! Component: 1350  -  total flux cleaned = 0.00435497 Jy
! Component: 1400  -  total flux cleaned = 0.00450611 Jy
! Component: 1450  -  total flux cleaned = 0.00476854 Jy
! Component: 1500  -  total flux cleaned = 0.00499189 Jy
! Component: 1550  -  total flux cleaned = 0.00528781 Jy
! Component: 1600  -  total flux cleaned = 0.00543472 Jy
! Component: 1650  -  total flux cleaned = 0.00569046 Jy
! Component: 1700  -  total flux cleaned = 0.00587183 Jy
! Component: 1750  -  total flux cleaned = 0.00608841 Jy
! Component: 1800  -  total flux cleaned = 0.0062678 Jy
! Component: 1850  -  total flux cleaned = 0.0064819 Jy
! Component: 1900  -  total flux cleaned = 0.00662399 Jy
! Component: 1950  -  total flux cleaned = 0.00683594 Jy
! Component: 2000  -  total flux cleaned = 0.0070464 Jy
! Total flux subtracted in 2048 components = 0.00715125 Jy
! Clean residual min=-0.002197 max=0.002270 Jy/beam
! Clean residual mean=0.000106 rms=0.000644 Jy/beam
! Combined flux in latest and established models = 2.20508 Jy
keep
! Adding 172 model components to the UV plane model.
! The established model now contains 321 components and 2.20508 Jy
wmap "J0102+5824_S_2003_05_07_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.393 x 3.143 at -8.5 degrees (North through East)
! Clean map  min=-0.0026486  max=1.8769 Jy/beam
! Writing clean map to FITS file: J0102+5824_S_2003_05_07_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.87695 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000641941 
device "J0102+5824_S_2003_05_07_pus\_map.eps/VPS"
! Attempting to open device: 'J0102+5824_S_2003_05_07_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.102604 0.102604 0.205208 0.410416 0.820831 1.64166 3.28333 6.56665 13.1333 26.2666 52.5332
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.876 
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.393 x 3.143 at -8.5 degrees (North through East)
! Clean map  min=-0.0026486  max=1.8769 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0102+5824_S_2003_05_07_pus\_map.gif/vgif"
! Attempting to open device: 'J0102+5824_S_2003_05_07_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0102+5824_S_2003_05_07_pus_uvs.log closed on Sun Dec 24 09:04:29 2006