! Started logfile: J0017+8135_X_2003_09_17_pus_uvs.log on Sun May 13 20:26:15 2007
obs J0017+8135_X_2003_09_17_pus_uva.fits
! Reading UV FITS file: J0017+8135_X_2003_09_17_pus_uva.fits
! AN table 1: 132 integrations on 120 of 120 possible baselines.
! AN table 2: 107 integrations on 120 of 120 possible baselines.
! AN table 3: 304 integrations on 120 of 120 possible baselines.
! AN table 4: 189 integrations on 120 of 120 possible baselines.
! AN table 5: 153 integrations on 120 of 120 possible baselines.
! AN table 6: 100 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.0215736 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0017+8135
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! 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  8.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1489 lines of history.
! 
! Reading 10200 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 = 256
float field_cell
field_cell = 0.2
float taper_size
taper_size = 70.
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 = 256x256 pixels with 0.200x0.200 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 2112 telescope corrections were flagged in sub-array 1.
!  A total of 1712 telescope corrections were flagged in sub-array 2.
!  A total of 4864 telescope corrections were flagged in sub-array 3.
!  A total of 3024 telescope corrections were flagged in sub-array 4.
!  A total of 2348 telescope corrections were flagged in sub-array 5.
!  A total of 1139 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 2.
!  A total of 2112 telescope corrections were flagged in sub-array 1.
!  A total of 1712 telescope corrections were flagged in sub-array 2.
!  A total of 4864 telescope corrections were flagged in sub-array 3.
!  A total of 3024 telescope corrections were flagged in sub-array 4.
!  A total of 2348 telescope corrections were flagged in sub-array 5.
!  A total of 1139 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 3.
!  A total of 2112 telescope corrections were flagged in sub-array 1.
!  A total of 1712 telescope corrections were flagged in sub-array 2.
!  A total of 4864 telescope corrections were flagged in sub-array 3.
!  A total of 3024 telescope corrections were flagged in sub-array 4.
!  A total of 2348 telescope corrections were flagged in sub-array 5.
!  A total of 1180 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 4.
!  A total of 2112 telescope corrections were flagged in sub-array 1.
!  A total of 1712 telescope corrections were flagged in sub-array 2.
!  A total of 4864 telescope corrections were flagged in sub-array 3.
!  A total of 3024 telescope corrections were flagged in sub-array 4.
!  A total of 2348 telescope corrections were flagged in sub-array 5.
!  A total of 1139 telescope corrections were flagged in sub-array 6.
! 
! Fit before self-cal, rms=0.806899Jy  sigma=0.003317
! Fit after  self-cal, rms=0.806105Jy  sigma=0.003292
! 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=0.9223 mas, bmaj=1.1 mas, bpa=61.08 degrees
! Estimated noise=4012.39 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.506503 Jy
! Component: 100  -  total flux cleaned = 0.645528 Jy
! Total flux subtracted in 100 components = 0.645528 Jy
! Clean residual min=-0.031052 max=0.062444 Jy/beam
! Clean residual mean=0.000048 rms=0.013237 Jy/beam
! Combined flux in latest and established models = 0.645528 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 0.645527 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.755776Jy  sigma=0.001624
! Fit after  self-cal, rms=0.755671Jy  sigma=0.001621
! 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=1.29 mas, bmaj=1.643 mas, bpa=76.41 degrees
! Estimated noise=1047.65 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.0924208 Jy
! Component: 100  -  total flux cleaned = 0.126408 Jy
! Component: 150  -  total flux cleaned = 0.139805 Jy
! Component: 200  -  total flux cleaned = 0.145548 Jy
! Total flux subtracted in 200 components = 0.145548 Jy
! Clean residual min=-0.005999 max=0.005821 Jy/beam
! Clean residual mean=0.000251 rms=0.001889 Jy/beam
! Combined flux in latest and established models = 0.791075 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 32 components and 0.791075 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.747651Jy  sigma=0.000979
! Fit after  self-cal, rms=0.747577Jy  sigma=0.000977
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.01     HN        1.00     KP        1.00*    
!   LA        1.00*    MK        0.99     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.00*    PT        1.00     SC        1.00*    
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        1.00     GC        1.00*    HN        1.00*    KP        1.00     
!   LA        1.00     MK        1.00*    NL        1.00     NY        1.00*    
!   ON        1.00*    OV        1.00     PT        1.00     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00     
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.01     HN        1.00     KP        1.00*    
!   LA        1.00*    MK        0.99     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.00*    PT        1.00     SC        1.00*    
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        1.00     GC        1.00*    HN        1.00*    KP        1.00     
!   LA        1.00     MK        1.00*    NL        1.00     NY        1.00*    
!   ON        1.00*    OV        1.00     PT        1.00     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.01     HN        1.00     KP        1.00*    
!   LA        1.00*    MK        0.99     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.00*    PT        1.00     SC        1.00*    
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        1.00     GC        1.00*    HN        1.00*    KP        1.00     
!   LA        1.00     MK        1.00*    NL        1.00     NY        1.00*    
!   ON        1.00*    OV        1.00     PT        1.00     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.01     HN        1.00     KP        1.00*    
!   LA        1.00*    MK        0.99     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.00*    PT        1.00     SC        1.00*    
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        1.00     GC        1.00*    HN        1.00*    KP        1.00     
!   LA        1.00     MK        1.00*    NL        1.00     NY        1.00*    
!   ON        1.00*    OV        1.00     PT        1.00     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.00     
! 
! 
! Fit before self-cal, rms=0.747577Jy  sigma=0.000977
! Fit after  self-cal, rms=0.750131Jy  sigma=0.000976
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=1.293 mas, bmaj=1.643 mas, bpa=76.18 degrees
! Estimated noise=1045.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)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000680033 Jy
! Component: 100  -  total flux cleaned = 0.000690499 Jy
! Component: 150  -  total flux cleaned = 0.000683839 Jy
! Component: 200  -  total flux cleaned = 0.000683256 Jy
! Total flux subtracted in 200 components = 0.000683256 Jy
! Clean residual min=-0.005550 max=0.005390 Jy/beam
! Clean residual mean=0.000171 rms=0.001705 Jy/beam
! Combined flux in latest and established models = 0.791758 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 36 components and 0.791759 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.750157Jy  sigma=0.000975
! Fit after  self-cal, rms=0.750138Jy  sigma=0.000975
! 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.750138Jy  sigma=0.000975
! Fit after  self-cal, rms=0.760803Jy  sigma=0.000975
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.292 mas, bmaj=1.642 mas, bpa=76.26 degrees
! Estimated noise=1044.93 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000554288 Jy
! Component: 100  -  total flux cleaned = 0.000557215 Jy
! Component: 150  -  total flux cleaned = 0.000560079 Jy
! Component: 200  -  total flux cleaned = 0.000560023 Jy
! Total flux subtracted in 200 components = 0.000560023 Jy
! Clean residual min=-0.005547 max=0.005215 Jy/beam
! Clean residual mean=0.000174 rms=0.001666 Jy/beam
! Combined flux in latest and established models = 0.792319 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 36 components and 0.792319 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.760826Jy  sigma=0.000974
! Fit after  self-cal, rms=0.760810Jy  sigma=0.000974
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 = -2.24506e-05 Jy
! Component: 100  -  total flux cleaned = -3.05887e-05 Jy
! Component: 150  -  total flux cleaned = -2.88517e-05 Jy
! Component: 200  -  total flux cleaned = -2.59369e-05 Jy
! Total flux subtracted in 200 components = -2.59369e-05 Jy
! Clean residual min=-0.005525 max=0.005060 Jy/beam
! Clean residual mean=0.000175 rms=0.001642 Jy/beam
! Combined flux in latest and established models = 0.792293 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 38 components and 0.792293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.760816Jy  sigma=0.000973
! Fit after  self-cal, rms=0.760802Jy  sigma=0.000973
! 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.760802Jy  sigma=0.000973
! Fit after  self-cal, rms=0.778112Jy  sigma=0.000973
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.29 mas, bmaj=1.641 mas, bpa=76.31 degrees
! Estimated noise=1044.39 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000444407 Jy
! Component: 100  -  total flux cleaned = 0.000494672 Jy
! Component: 150  -  total flux cleaned = 0.000451857 Jy
! Component: 200  -  total flux cleaned = 0.000415538 Jy
! Total flux subtracted in 200 components = 0.000415538 Jy
! Clean residual min=-0.005482 max=0.004901 Jy/beam
! Clean residual mean=0.000182 rms=0.001612 Jy/beam
! Combined flux in latest and established models = 0.792708 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 39 components and 0.792708 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.778133Jy  sigma=0.000973
! Fit after  self-cal, rms=0.778122Jy  sigma=0.000972
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.37167e-06 Jy
! Component: 100  -  total flux cleaned = -2.10628e-06 Jy
! Component: 150  -  total flux cleaned = -3.755e-05 Jy
! Component: 200  -  total flux cleaned = -3.65019e-05 Jy
! Total flux subtracted in 200 components = -3.65019e-05 Jy
! Clean residual min=-0.005471 max=0.004810 Jy/beam
! Clean residual mean=0.000182 rms=0.001595 Jy/beam
! Combined flux in latest and established models = 0.792672 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 39 components and 0.792672 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.778130Jy  sigma=0.000972
! Fit after  self-cal, rms=0.778120Jy  sigma=0.000972
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 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.778120Jy  sigma=0.000972
! Fit after  self-cal, rms=0.789778Jy  sigma=0.000972
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.595 mas, bmaj=5.168 mas, bpa=84.44 degrees
! Estimated noise=1173.34 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000262855 Jy
! Component: 100  -  total flux cleaned = 0.000261877 Jy
! Component: 150  -  total flux cleaned = 0.000259592 Jy
! Component: 200  -  total flux cleaned = 0.000257284 Jy
! Total flux subtracted in 200 components = 0.000257284 Jy
! Clean residual min=-0.006056 max=0.005096 Jy/beam
! Clean residual mean=0.000307 rms=0.002071 Jy/beam
! Combined flux in latest and established models = 0.792929 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 44 components and 0.792929 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.789795Jy  sigma=0.000972
! Fit after  self-cal, rms=0.789786Jy  sigma=0.000972
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 = -5.97525e-06 Jy
! Component: 100  -  total flux cleaned = -9.59398e-06 Jy
! Component: 150  -  total flux cleaned = -1.21597e-05 Jy
! Component: 200  -  total flux cleaned = -1.12672e-05 Jy
! Total flux subtracted in 200 components = -1.12672e-05 Jy
! Clean residual min=-0.006061 max=0.005045 Jy/beam
! Clean residual mean=0.000307 rms=0.002064 Jy/beam
! Combined flux in latest and established models = 0.792918 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 46 components and 0.792918 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.789798Jy  sigma=0.000972
! Fit after  self-cal, rms=0.789790Jy  sigma=0.000972
! 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=1.289 mas, bmaj=1.64 mas, bpa=76.35 degrees
! Estimated noise=1043.95 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.289 x 1.64 at 76.35 degrees (North through East)
! Clean map  min=-0.0053502  max=0.69646 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.789790Jy  sigma=0.000972
! Fit after  self-cal, rms=0.796272Jy  sigma=0.000971
! Inverting map and beam 
! Estimated beam: bmin=1.289 mas, bmaj=1.642 mas, bpa=76.48 degrees
! Estimated noise=1044.11 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000289742 Jy
! Component: 100  -  total flux cleaned = 0.000250422 Jy
! Component: 150  -  total flux cleaned = 0.000220319 Jy
! Component: 200  -  total flux cleaned = 0.0001927 Jy
! Total flux subtracted in 200 components = 0.0001927 Jy
! Clean residual min=-0.005465 max=0.004867 Jy/beam
! Clean residual mean=0.000193 rms=0.001559 Jy/beam
! Combined flux in latest and established models = 0.79311 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 47 components and 0.79311 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.796287Jy  sigma=0.000971
! Fit after  self-cal, rms=0.796281Jy  sigma=0.000971
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 5.25619e-06 Jy
! Component: 100  -  total flux cleaned = 6.45227e-06 Jy
! Component: 150  -  total flux cleaned = -1.98667e-05 Jy
! Component: 200  -  total flux cleaned = -1.95214e-05 Jy
! Total flux subtracted in 200 components = -1.95214e-05 Jy
! Clean residual min=-0.005458 max=0.004841 Jy/beam
! Clean residual mean=0.000193 rms=0.001551 Jy/beam
! Combined flux in latest and established models = 0.793091 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 47 components and 0.793091 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.796288Jy  sigma=0.000971
! Fit after  self-cal, rms=0.796281Jy  sigma=0.000971
! 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.796281Jy  sigma=0.000971
! Fit after  self-cal, rms=0.806182Jy  sigma=0.000971
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=0.9223 mas, bmaj=1.1 mas, bpa=61.19 degrees
! Estimated noise=3992.77 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.503696 Jy
! Component: 100  -  total flux cleaned = 0.644466 Jy
! Component: 150  -  total flux cleaned = 0.712954 Jy
! Component: 200  -  total flux cleaned = 0.748131 Jy
! Total flux subtracted in 200 components = 0.748131 Jy
! Clean residual min=-0.016348 max=0.018096 Jy/beam
! Clean residual mean=0.000056 rms=0.005562 Jy/beam
! Combined flux in latest and established models = 0.748131 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 0.748131 Jy
! Inverting map and beam 
! Estimated beam: bmin=1.288 mas, bmaj=1.641 mas, bpa=76.5 degrees
! Estimated noise=1043.76 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.0277374 Jy
! Component: 100  -  total flux cleaned = 0.0381531 Jy
! Component: 150  -  total flux cleaned = 0.0424811 Jy
! Component: 200  -  total flux cleaned = 0.0443721 Jy
! Total flux subtracted in 200 components = 0.0443721 Jy
! Clean residual min=-0.005435 max=0.004938 Jy/beam
! Clean residual mean=0.000215 rms=0.001552 Jy/beam
! Combined flux in latest and established models = 0.792503 Jy
! Adding 20 model components to the UV plane model.
! The established model now contains 31 components and 0.792503 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.594 mas, bmaj=5.168 mas, bpa=84.45 degrees
! Estimated noise=1173.64 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000837829 Jy
! Component: 100  -  total flux cleaned = 0.000852872 Jy
! Component: 150  -  total flux cleaned = 0.000843424 Jy
! Component: 200  -  total flux cleaned = 0.000844813 Jy
! Total flux subtracted in 200 components = 0.000844813 Jy
! Clean residual min=-0.005984 max=0.004953 Jy/beam
! Clean residual mean=0.000317 rms=0.002058 Jy/beam
! Combined flux in latest and established models = 0.793348 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.53514e-06 Jy
! Component: 100  -  total flux cleaned = 3.11775e-06 Jy
! Component: 150  -  total flux cleaned = 4.69901e-06 Jy
! Component: 200  -  total flux cleaned = 1.38228e-05 Jy
! Total flux subtracted in 200 components = 1.38228e-05 Jy
! Clean residual min=-0.005979 max=0.004958 Jy/beam
! Clean residual mean=0.000316 rms=0.002059 Jy/beam
! Combined flux in latest and established models = 0.793362 Jy
! Adding 6 model components to the UV plane model.
! The established model now contains 35 components and 0.793362 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=1.288 mas, bmaj=1.641 mas, bpa=76.5 degrees
! Estimated noise=1043.76 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000243545 Jy
! Component: 100  -  total flux cleaned = -0.000134814 Jy
! Component: 150  -  total flux cleaned = -6.33851e-05 Jy
! Component: 200  -  total flux cleaned = 2.21166e-05 Jy
! Total flux subtracted in 200 components = 2.21166e-05 Jy
! Clean residual min=-0.005313 max=0.004824 Jy/beam
! Clean residual mean=0.000192 rms=0.001542 Jy/beam
! Combined flux in latest and established models = 0.793384 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 37 components and 0.793384 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.806189Jy  sigma=0.000971
! Fit after  self-cal, rms=0.806180Jy  sigma=0.000971
wmodel J0017+8135_X_2003_09_17_pus_map.mod
! Writing 37 model components to file: J0017+8135_X_2003_09_17_pus_map.mod
wobs J0017+8135_X_2003_09_17_pus_uvs.fits
! Writing UV FITS file: J0017+8135_X_2003_09_17_pus_uvs.fits
wwins J0017+8135_X_2003_09_17_pus_map.win
! wwins: Wrote 1 windows to J0017+8135_X_2003_09_17_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=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.00029496 Jy
! Component: 100  -  total flux cleaned = 0.00106215 Jy
! Component: 150  -  total flux cleaned = 0.00225889 Jy
! Component: 200  -  total flux cleaned = 0.00315152 Jy
! Component: 250  -  total flux cleaned = 0.00353026 Jy
! Component: 300  -  total flux cleaned = 0.00368023 Jy
! Component: 350  -  total flux cleaned = 0.00367947 Jy
! Component: 400  -  total flux cleaned = 0.0035951 Jy
! Component: 450  -  total flux cleaned = 0.00363477 Jy
! Component: 500  -  total flux cleaned = 0.00363337 Jy
! Component: 550  -  total flux cleaned = 0.00370576 Jy
! Component: 600  -  total flux cleaned = 0.00366873 Jy
! Component: 650  -  total flux cleaned = 0.00353135 Jy
! Component: 700  -  total flux cleaned = 0.00336431 Jy
! Component: 750  -  total flux cleaned = 0.00323367 Jy
! Component: 800  -  total flux cleaned = 0.00320164 Jy
! Component: 850  -  total flux cleaned = 0.00317065 Jy
! Component: 900  -  total flux cleaned = 0.0031093 Jy
! Component: 950  -  total flux cleaned = 0.0031398 Jy
! Component: 1000  -  total flux cleaned = 0.00314004 Jy
! Total flux subtracted in 1024 components = 0.00316931 Jy
! Clean residual min=-0.001634 max=0.001480 Jy/beam
! Clean residual mean=0.000020 rms=0.000598 Jy/beam
! Combined flux in latest and established models = 0.796553 Jy
keep
! Adding 57 model components to the UV plane model.
! The established model now contains 94 components and 0.796553 Jy
wmap "J0017+8135_X_2003_09_17_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.288 x 1.641 at 76.5 degrees (North through East)
! Clean map  min=-0.0030871  max=0.69581 Jy/beam
! Writing clean map to FITS file: J0017+8135_X_2003_09_17_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.695812 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000585052 
device "J0017+8135_X_2003_09_17_pus\_map.eps/VPS"
! Attempting to open device: 'J0017+8135_X_2003_09_17_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.252246 0.252246 0.504491 1.00898 2.01797 4.03593 8.07186 16.1437 32.2874 64.5749
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.695 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 1.288 x 1.641 at 76.5 degrees (North through East)
! Clean map  min=-0.0030871  max=0.69581 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0017+8135_X_2003_09_17_pus\_map.gif/vgif"
! Attempting to open device: 'J0017+8135_X_2003_09_17_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0017+8135_X_2003_09_17_pus_uvs.log closed on Sun May 13 20:28:32 2007