! Started logfile: J0238+1636_S_2001_07_05_pus_uvs.log on Fri Aug 10 00:00:57 2007
obs J0238+1636_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0238+1636_S_2001_07_05_pus_uva.fits
! AN table 1: 90 integrations on 171 of 171 possible baselines.
! AN table 2: 53 integrations on 171 of 171 possible baselines.
! AN table 3: 35 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.122544 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0238+1636
! 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  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 1774 lines of history.
! 
! Reading 14920 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 
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 1512 telescope corrections were flagged in sub-array 1.
!  A total of 455 telescope corrections were flagged in sub-array 2.
!  A total of 480 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1512 telescope corrections were flagged in sub-array 1.
!  A total of 455 telescope corrections were flagged in sub-array 2.
!  A total of 480 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1512 telescope corrections were flagged in sub-array 1.
!  A total of 455 telescope corrections were flagged in sub-array 2.
!  A total of 480 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1512 telescope corrections were flagged in sub-array 1.
!  A total of 455 telescope corrections were flagged in sub-array 2.
!  A total of 480 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.872101Jy  sigma=0.005584
! Fit after  self-cal, rms=0.315277Jy  sigma=0.001849
! 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.942 mas, bmaj=3.425 mas, bpa=-6.428 degrees
! Estimated noise=1152.09 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.707917 Jy
! Component: 100  -  total flux cleaned = 0.864639 Jy
! Total flux subtracted in 100 components = 0.864639 Jy
! Clean residual min=-0.017257 max=0.052039 Jy/beam
! Clean residual mean=0.000270 rms=0.005387 Jy/beam
! Combined flux in latest and established models = 0.864639 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.864639 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304613Jy  sigma=0.001823
! Fit after  self-cal, rms=0.304475Jy  sigma=0.001823
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0566529 Jy
! Component: 100  -  total flux cleaned = 0.0878228 Jy
! Total flux subtracted in 100 components = 0.0878228 Jy
! Clean residual min=-0.013704 max=0.019249 Jy/beam
! Clean residual mean=0.000149 rms=0.003947 Jy/beam
! Combined flux in latest and established models = 0.952462 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 13 components and 0.952462 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.296360Jy  sigma=0.001698
! Fit after  self-cal, rms=0.296321Jy  sigma=0.001698
! 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.184 mas, bmaj=3.944 mas, bpa=-8.305 degrees
! Estimated noise=809.097 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.0184646 Jy
! Component: 100  -  total flux cleaned = 0.0289764 Jy
! Component: 150  -  total flux cleaned = 0.0353134 Jy
! Component: 200  -  total flux cleaned = 0.0392064 Jy
! Total flux subtracted in 200 components = 0.0392064 Jy
! Clean residual min=-0.011867 max=0.015772 Jy/beam
! Clean residual mean=0.000466 rms=0.003487 Jy/beam
! Combined flux in latest and established models = 0.991668 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 27 components and 0.991668 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.295756Jy  sigma=0.001681
! Fit after  self-cal, rms=0.295760Jy  sigma=0.001681
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 117 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.01     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.97     MK        1.00*    NL        1.00*    
!   NY        0.94     OV        1.00*    PT        1.00*    SC        0.91     
!   TS        1.00*    WF        1.02     WZ        0.88     
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.98     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        0.99     KP        0.99     
!   LA        1.00     MC        1.10     MK        0.99     NL        1.01     
!   NY        1.03     OV        0.96     PT        0.96     SC        0.98     
!   TS        0.95     WF        1.05     WZ        1.22     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.99     HN        0.85     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.92     MK        1.00*    NL        1.04     
!   NY        0.93     OV        1.00*    PT        1.00*    SC        0.87     
!   TS        1.00*    WF        0.96     WZ        0.82     
! 
! 
! Correcting IF 2.
!  A total of 117 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.07     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        1.08     MK        1.00*    NL        1.00*    
!   NY        0.95     OV        1.00*    PT        1.00*    SC        0.94     
!   TS        1.00*    WF        0.93     WZ        0.88     
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.99     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.00     KP        0.98     
!   LA        0.95     MC        0.99     MK        0.96     NL        0.99     
!   NY        1.03     OV        1.00     PT        0.99     SC        0.99     
!   TS        0.92     WF        1.04     WZ        1.23     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.11     HN        0.86     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.84     MK        1.00*    NL        1.07     
!   NY        0.92     OV        1.00*    PT        1.00*    SC        0.93     
!   TS        1.00*    WF        0.94     WZ        0.88     
! 
! 
! Correcting IF 3.
!  A total of 117 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.01     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.95     MK        1.00*    NL        1.00*    
!   NY        0.96     OV        1.00*    PT        1.00*    SC        0.93     
!   TS        1.00*    WF        1.17     WZ        0.91     
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.94     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.02     KP        1.11     
!   LA        0.99     MC        1.38     MK        1.00     NL        1.02     
!   NY        1.06     OV        1.03     PT        0.97     SC        0.98     
!   TS        0.94     WF        1.08     WZ        1.20     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.01     HN        0.98     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        0.94     MK        1.00*    NL        1.29     
!   NY        0.96     OV        1.00*    PT        1.00*    SC        0.89     
!   TS        1.00*    WF        1.13     WZ        0.91     
! 
! 
! Correcting IF 4.
!  A total of 117 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.02     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        1.57     MK        1.00*    NL        1.00*    
!   NY        1.07     OV        1.00*    PT        1.00*    SC        0.94     
!   TS        1.00*    WF        0.97     WZ        0.95     
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.02     KP        1.18     
!   LA        0.99     MC        0.96     MK        0.98     NL        1.02     
!   NY        1.04     OV        1.00     PT        0.94     SC        1.01     
!   TS        0.95     WF        1.07     WZ        1.20     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.96     HN        0.85     KK        1.00*    KP        1.00*    
!   LA        1.00*    MC        1.49     MK        1.00*    NL        1.09     
!   NY        0.97     OV        1.00*    PT        1.00*    SC        0.92     
!   TS        1.00*    WF        0.87     WZ        0.94     
! 
! 
! Fit before self-cal, rms=0.295760Jy  sigma=0.001681
! Fit after  self-cal, rms=0.303472Jy  sigma=0.001557
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.226 mas, bmaj=4.083 mas, bpa=-7.815 degrees
! Estimated noise=817.825 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.00919691 Jy
! Component: 100  -  total flux cleaned = -0.00944103 Jy
! Component: 150  -  total flux cleaned = -0.0096224 Jy
! Component: 200  -  total flux cleaned = -0.00950092 Jy
! Total flux subtracted in 200 components = -0.00950092 Jy
! Clean residual min=-0.006406 max=0.007982 Jy/beam
! Clean residual mean=0.000223 rms=0.001828 Jy/beam
! Combined flux in latest and established models = 0.982167 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 34 components and 0.982167 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302963Jy  sigma=0.001555
! Fit after  self-cal, rms=0.303699Jy  sigma=0.001553
! 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.303699Jy  sigma=0.001553
! Fit after  self-cal, rms=0.300298Jy  sigma=0.001538
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.235 mas, bmaj=4.082 mas, bpa=-7.84 degrees
! Estimated noise=816.808 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00249038 Jy
! Component: 100  -  total flux cleaned = -0.00282404 Jy
! Component: 150  -  total flux cleaned = -0.00268303 Jy
! Component: 200  -  total flux cleaned = -0.00255689 Jy
! Total flux subtracted in 200 components = -0.00255689 Jy
! Clean residual min=-0.005024 max=0.007399 Jy/beam
! Clean residual mean=0.000163 rms=0.001434 Jy/beam
! Combined flux in latest and established models = 0.979611 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 41 components and 0.979611 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.300132Jy  sigma=0.001537
! Fit after  self-cal, rms=0.300254Jy  sigma=0.001537
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 (3, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00516162 Jy
! Component: 100  -  total flux cleaned = 0.00565499 Jy
! Component: 150  -  total flux cleaned = 0.00579644 Jy
! Component: 200  -  total flux cleaned = 0.00602514 Jy
! Total flux subtracted in 200 components = 0.00602514 Jy
! Clean residual min=-0.005026 max=0.005891 Jy/beam
! Clean residual mean=0.000137 rms=0.001364 Jy/beam
! Combined flux in latest and established models = 0.985636 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 50 components and 0.985636 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.300063Jy  sigma=0.001535
! Fit after  self-cal, rms=0.300033Jy  sigma=0.001535
! Inverting map 
! Added new window around map position (2.5, -25).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00172483 Jy
! Component: 100  -  total flux cleaned = 0.00184735 Jy
! Component: 150  -  total flux cleaned = 0.00185339 Jy
! Component: 200  -  total flux cleaned = 0.0018539 Jy
! Total flux subtracted in 200 components = 0.0018539 Jy
! Clean residual min=-0.004746 max=0.005438 Jy/beam
! Clean residual mean=0.000129 rms=0.001304 Jy/beam
! Combined flux in latest and established models = 0.98749 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 70 components and 0.98749 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299809Jy  sigma=0.001533
! Fit after  self-cal, rms=0.299788Jy  sigma=0.001533
! 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.299788Jy  sigma=0.001533
! Fit after  self-cal, rms=0.299774Jy  sigma=0.001533
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.237 mas, bmaj=4.082 mas, bpa=-7.83 degrees
! Estimated noise=815.571 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000532208 Jy
! Component: 100  -  total flux cleaned = -0.000407065 Jy
! Component: 150  -  total flux cleaned = -0.000620544 Jy
! Component: 200  -  total flux cleaned = -0.000522947 Jy
! Total flux subtracted in 200 components = -0.000522947 Jy
! Clean residual min=-0.004571 max=0.005460 Jy/beam
! Clean residual mean=0.000106 rms=0.001265 Jy/beam
! Combined flux in latest and established models = 0.986967 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 79 components and 0.986967 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299670Jy  sigma=0.001532
! Fit after  self-cal, rms=0.299695Jy  sigma=0.001532
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 (-13.5, -51).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00238623 Jy
! Component: 100  -  total flux cleaned = 0.00211198 Jy
! Component: 150  -  total flux cleaned = 0.00270367 Jy
! Component: 200  -  total flux cleaned = 0.00288557 Jy
! Total flux subtracted in 200 components = 0.00288557 Jy
! Clean residual min=-0.004331 max=0.005321 Jy/beam
! Clean residual mean=0.000094 rms=0.001233 Jy/beam
! Combined flux in latest and established models = 0.989852 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 95 components and 0.989852 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299548Jy  sigma=0.001531
! Fit after  self-cal, rms=0.299542Jy  sigma=0.001531
! Inverting map 
! Added new window around map position (45.5, -15).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00225355 Jy
! Component: 100  -  total flux cleaned = 0.00132301 Jy
! Component: 150  -  total flux cleaned = 0.00104974 Jy
! Component: 200  -  total flux cleaned = 0.00113933 Jy
! Total flux subtracted in 200 components = 0.00113933 Jy
! Clean residual min=-0.004500 max=0.004733 Jy/beam
! Clean residual mean=0.000093 rms=0.001202 Jy/beam
! Combined flux in latest and established models = 0.990992 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 107 components and 0.990992 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299404Jy  sigma=0.001530
! Fit after  self-cal, rms=0.299393Jy  sigma=0.001530
! 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.299393Jy  sigma=0.001530
! Fit after  self-cal, rms=0.299291Jy  sigma=0.001530
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.803 mas, bmaj=8.58 mas, bpa=-0.663 degrees
! Estimated noise=1230.5 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000267793 Jy
! Component: 100  -  total flux cleaned = -7.74772e-05 Jy
! Component: 150  -  total flux cleaned = -0.000317995 Jy
! Component: 200  -  total flux cleaned = -0.000480686 Jy
! Total flux subtracted in 200 components = -0.000480686 Jy
! Clean residual min=-0.004997 max=0.005272 Jy/beam
! Clean residual mean=0.000281 rms=0.001582 Jy/beam
! Combined flux in latest and established models = 0.990511 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 117 components and 0.990511 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299274Jy  sigma=0.001530
! Fit after  self-cal, rms=0.299280Jy  sigma=0.001530
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.000156379 Jy
! Component: 100  -  total flux cleaned = -0.000158006 Jy
! Component: 150  -  total flux cleaned = -0.000158365 Jy
! Component: 200  -  total flux cleaned = -7.97879e-05 Jy
! Total flux subtracted in 200 components = -7.97879e-05 Jy
! Clean residual min=-0.004932 max=0.005287 Jy/beam
! Clean residual mean=0.000281 rms=0.001566 Jy/beam
! Combined flux in latest and established models = 0.990431 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 129 components and 0.990431 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299276Jy  sigma=0.001530
! Fit after  self-cal, rms=0.299275Jy  sigma=0.001530
! 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.238 mas, bmaj=4.083 mas, bpa=-7.821 degrees
! Estimated noise=814.713 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.238 x 4.083 at -7.821 degrees (North through East)
! Clean map  min=-0.0040993  max=0.9074 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.299275Jy  sigma=0.001530
! Fit after  self-cal, rms=0.468198Jy  sigma=0.001436
! Inverting map and beam 
! Estimated beam: bmin=2.237 mas, bmaj=4.087 mas, bpa=-7.816 degrees
! Estimated noise=814.305 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00128951 Jy
! Component: 100  -  total flux cleaned = -0.00215408 Jy
! Component: 150  -  total flux cleaned = -0.00259399 Jy
! Component: 200  -  total flux cleaned = -0.00292675 Jy
! Total flux subtracted in 200 components = -0.00292675 Jy
! Clean residual min=-0.004022 max=0.004290 Jy/beam
! Clean residual mean=0.000068 rms=0.001148 Jy/beam
! Combined flux in latest and established models = 0.987505 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 139 components and 0.987505 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.468120Jy  sigma=0.001435
! Fit after  self-cal, rms=0.468138Jy  sigma=0.001435
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000404359 Jy
! Component: 100  -  total flux cleaned = -0.000633834 Jy
! Component: 150  -  total flux cleaned = -0.000776518 Jy
! Component: 200  -  total flux cleaned = -0.000776012 Jy
! Total flux subtracted in 200 components = -0.000776012 Jy
! Clean residual min=-0.004008 max=0.004264 Jy/beam
! Clean residual mean=0.000071 rms=0.001137 Jy/beam
! Combined flux in latest and established models = 0.986729 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 147 components and 0.986728 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.468090Jy  sigma=0.001435
! Fit after  self-cal, rms=0.468096Jy  sigma=0.001435
! 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.468096Jy  sigma=0.001435
! Fit after  self-cal, rms=0.762114Jy  sigma=0.001435
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.977 mas, bmaj=3.445 mas, bpa=-5.562 degrees
! Estimated noise=1161.99 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.70307 Jy
! Component: 100  -  total flux cleaned = 0.856385 Jy
! Component: 150  -  total flux cleaned = 0.899765 Jy
! Component: 200  -  total flux cleaned = 0.923056 Jy
! Total flux subtracted in 200 components = 0.923056 Jy
! Clean residual min=-0.007476 max=0.012076 Jy/beam
! Clean residual mean=0.000110 rms=0.002076 Jy/beam
! Combined flux in latest and established models = 0.923056 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 21 model components to the UV plane model.
! The established model now contains 21 components and 0.923056 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.238 mas, bmaj=4.088 mas, bpa=-7.801 degrees
! Estimated noise=813.457 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.0200614 Jy
! Component: 100  -  total flux cleaned = 0.0327354 Jy
! Component: 150  -  total flux cleaned = 0.0417095 Jy
! Component: 200  -  total flux cleaned = 0.0482697 Jy
! Total flux subtracted in 200 components = 0.0482697 Jy
! Clean residual min=-0.005061 max=0.005034 Jy/beam
! Clean residual mean=0.000125 rms=0.001332 Jy/beam
! Combined flux in latest and established models = 0.971325 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 57 components and 0.971325 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.806 mas, bmaj=8.586 mas, bpa=-0.5763 degrees
! Estimated noise=1227.23 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0106551 Jy
! Component: 100  -  total flux cleaned = 0.0131141 Jy
! Component: 150  -  total flux cleaned = 0.0136034 Jy
! Component: 200  -  total flux cleaned = 0.0135019 Jy
! Total flux subtracted in 200 components = 0.0135019 Jy
! Clean residual min=-0.005195 max=0.005539 Jy/beam
! Clean residual mean=0.000243 rms=0.001581 Jy/beam
! Combined flux in latest and established models = 0.984827 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.99724e-06 Jy
! Component: 100  -  total flux cleaned = 7.94849e-05 Jy
! Component: 150  -  total flux cleaned = 0.000215919 Jy
! Component: 200  -  total flux cleaned = 0.000339347 Jy
! Total flux subtracted in 200 components = 0.000339347 Jy
! Clean residual min=-0.005138 max=0.005470 Jy/beam
! Clean residual mean=0.000237 rms=0.001542 Jy/beam
! Combined flux in latest and established models = 0.985167 Jy
! Adding 57 model components to the UV plane model.
! The established model now contains 102 components and 0.985167 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.238 mas, bmaj=4.088 mas, bpa=-7.801 degrees
! Estimated noise=813.457 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00251185 Jy
! Component: 100  -  total flux cleaned = 0.00201323 Jy
! Component: 150  -  total flux cleaned = 0.00156417 Jy
! Component: 200  -  total flux cleaned = 0.00155839 Jy
! Total flux subtracted in 200 components = 0.00155839 Jy
! Clean residual min=-0.004491 max=0.004527 Jy/beam
! Clean residual mean=0.000058 rms=0.001179 Jy/beam
! Combined flux in latest and established models = 0.986725 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 117 components and 0.986725 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.762167Jy  sigma=0.001436
! Fit after  self-cal, rms=0.762135Jy  sigma=0.001436
wmodel J0238+1636_S_2001_07_05_pus_map.mod
! Writing 117 model components to file: J0238+1636_S_2001_07_05_pus_map.mod
wobs J0238+1636_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0238+1636_S_2001_07_05_pus_uvs.fits
wwins J0238+1636_S_2001_07_05_pus_map.win
! wwins: Wrote 5 windows to J0238+1636_S_2001_07_05_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.00109824 Jy
! Component: 100  -  total flux cleaned = 0.00210116 Jy
! Component: 150  -  total flux cleaned = 0.00291121 Jy
! Component: 200  -  total flux cleaned = 0.00369531 Jy
! Component: 250  -  total flux cleaned = 0.00411158 Jy
! Component: 300  -  total flux cleaned = 0.00451798 Jy
! Component: 350  -  total flux cleaned = 0.00471793 Jy
! Component: 400  -  total flux cleaned = 0.00504492 Jy
! Component: 450  -  total flux cleaned = 0.00555827 Jy
! Component: 500  -  total flux cleaned = 0.00581103 Jy
! Component: 550  -  total flux cleaned = 0.00624831 Jy
! Component: 600  -  total flux cleaned = 0.00649434 Jy
! Component: 650  -  total flux cleaned = 0.0066164 Jy
! Component: 700  -  total flux cleaned = 0.00685842 Jy
! Component: 750  -  total flux cleaned = 0.007098 Jy
! Component: 800  -  total flux cleaned = 0.00751104 Jy
! Component: 850  -  total flux cleaned = 0.00762771 Jy
! Component: 900  -  total flux cleaned = 0.00797426 Jy
! Component: 950  -  total flux cleaned = 0.00803125 Jy
! Component: 1000  -  total flux cleaned = 0.00825846 Jy
! Component: 1050  -  total flux cleaned = 0.00853969 Jy
! Component: 1100  -  total flux cleaned = 0.00881797 Jy
! Component: 1150  -  total flux cleaned = 0.00898305 Jy
! Component: 1200  -  total flux cleaned = 0.00920164 Jy
! Component: 1250  -  total flux cleaned = 0.0093104 Jy
! Component: 1300  -  total flux cleaned = 0.00957936 Jy
! Component: 1350  -  total flux cleaned = 0.00973928 Jy
! Component: 1400  -  total flux cleaned = 0.00973935 Jy
! Component: 1450  -  total flux cleaned = 0.0100023 Jy
! Component: 1500  -  total flux cleaned = 0.0101582 Jy
! Component: 1550  -  total flux cleaned = 0.0101579 Jy
! Component: 1600  -  total flux cleaned = 0.0102611 Jy
! Component: 1650  -  total flux cleaned = 0.0103635 Jy
! Component: 1700  -  total flux cleaned = 0.010515 Jy
! Component: 1750  -  total flux cleaned = 0.0106153 Jy
! Component: 1800  -  total flux cleaned = 0.0107148 Jy
! Component: 1850  -  total flux cleaned = 0.0107642 Jy
! Component: 1900  -  total flux cleaned = 0.0110581 Jy
! Component: 1950  -  total flux cleaned = 0.0109604 Jy
! Component: 2000  -  total flux cleaned = 0.011057 Jy
! Total flux subtracted in 2048 components = 0.0111055 Jy
! Clean residual min=-0.003080 max=0.002875 Jy/beam
! Clean residual mean=0.000018 rms=0.000916 Jy/beam
! Combined flux in latest and established models = 0.997831 Jy
keep
! Adding 151 model components to the UV plane model.
! The established model now contains 268 components and 0.997831 Jy
wmap "J0238+1636_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.238 x 4.088 at -7.801 degrees (North through East)
! Clean map  min=-0.0037499  max=0.90755 Jy/beam
! Writing clean map to FITS file: J0238+1636_S_2001_07_05_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.907549 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000915628 
device "J0238+1636_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0238+1636_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.302671 0.302671 0.605341 1.21068 2.42136 4.84273 9.68546 19.3709 38.7418 77.4837
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0027 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.907 
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.238 x 4.088 at -7.801 degrees (North through East)
! Clean map  min=-0.0037499  max=0.90755 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0238+1636_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0238+1636_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0238+1636_S_2001_07_05_pus_uvs.log closed on Fri Aug 10 00:02:19 2007