! Started logfile: J0238+1636_S_1999_05_10_pus_uvs.log on Mon Jan 21 17:25:22 2008
obs J0238+1636_S_1999_05_10_pus_uva.fits
! Reading UV FITS file: J0238+1636_S_1999_05_10_pus_uva.fits
! AN table 1: 56 integrations on 153 of 153 possible baselines.
! AN table 2: 57 integrations on 153 of 153 possible baselines.
! AN table 3: 110 integrations on 153 of 153 possible baselines.
! AN table 4: 67 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.185057 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0238+1636
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1998 lines of history.
! 
! Reading 32844 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J0238+1636_S_1999_05_10_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 866 telescope corrections were flagged in sub-array 1.
!  A total of 315 telescope corrections were flagged in sub-array 2.
!  A total of 1547 telescope corrections were flagged in sub-array 3.
!  A total of 658 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 866 telescope corrections were flagged in sub-array 1.
!  A total of 315 telescope corrections were flagged in sub-array 2.
!  A total of 1547 telescope corrections were flagged in sub-array 3.
!  A total of 658 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 866 telescope corrections were flagged in sub-array 1.
!  A total of 315 telescope corrections were flagged in sub-array 2.
!  A total of 1547 telescope corrections were flagged in sub-array 3.
!  A total of 658 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1000 telescope corrections were flagged in sub-array 1.
!  A total of 315 telescope corrections were flagged in sub-array 2.
!  A total of 1647 telescope corrections were flagged in sub-array 3.
!  A total of 658 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.082360Jy  sigma=0.007590
! Fit after  self-cal, rms=0.404194Jy  sigma=0.002088
! clrmod: Cleared the established, tentative and continuum models.
! Redundant starting model cleared.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.189 mas, bmaj=3.88 mas, bpa=-13.35 degrees
! Estimated noise=1202.88 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.654488 Jy
! Component: 100  -  total flux cleaned = 0.801029 Jy
! Total flux subtracted in 100 components = 0.801029 Jy
! Clean residual min=-0.017436 max=0.052111 Jy/beam
! Clean residual mean=-0.000075 rms=0.005941 Jy/beam
! Combined flux in latest and established models = 0.801029 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.801029 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.367961Jy  sigma=0.001992
! Fit after  self-cal, rms=0.367948Jy  sigma=0.001992
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0589109 Jy
! Component: 100  -  total flux cleaned = 0.0961164 Jy
! Total flux subtracted in 100 components = 0.0961164 Jy
! Clean residual min=-0.017087 max=0.021407 Jy/beam
! Clean residual mean=-0.000130 rms=0.004525 Jy/beam
! Combined flux in latest and established models = 0.897146 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 22 components and 0.897146 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.361250Jy  sigma=0.001813
! Fit after  self-cal, rms=0.361289Jy  sigma=0.001813
! 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.456 mas, bmaj=5.472 mas, bpa=-15.09 degrees
! Estimated noise=533.029 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.0281087 Jy
! Component: 100  -  total flux cleaned = 0.0453449 Jy
! Component: 150  -  total flux cleaned = 0.0567092 Jy
! Component: 200  -  total flux cleaned = 0.0642364 Jy
! Total flux subtracted in 200 components = 0.0642364 Jy
! Clean residual min=-0.015489 max=0.017939 Jy/beam
! Clean residual mean=-0.001241 rms=0.004252 Jy/beam
! Combined flux in latest and established models = 0.961382 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 36 components and 0.961382 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.360288Jy  sigma=0.001770
! Fit after  self-cal, rms=0.360292Jy  sigma=0.001770
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.78     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        0.94     MK        1.00*    NL        1.00*    NY        0.90     
!   ON        0.96     OV        1.00*    PT        1.00*    SC        1.00*    
!   WF        1.00*    WZ        1.01     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.98     GC        1.03     HH        1.00*    
!   HN        1.02     KK        1.04     KP        0.98     LA        1.00     
!   MC        1.01     MK        0.95     NL        0.97     NY        0.96     
!   ON        1.03     OV        1.01     PT        1.01     SC        0.98     
!   WF        1.74     WZ        1.00*    
! 
!  A total of 99 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.05     FD        1.00*    GC        1.14     HH        1.00*    
!   HN        1.10     KK        0.97     KP        1.00*    LA        1.00*    
!   MC        1.05     MK        0.92     NL        1.01     NY        1.01     
!   ON        1.12     OV        1.00     PT        1.00*    SC        1.05     
!   WF        1.07     WZ        1.13     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.96     GC        1.05     HH        1.00*    
!   HN        0.98     KK        0.95     KP        0.98     LA        0.96     
!   MC        1.00*    MK        0.92     NL        0.96     NY        0.99     
!   ON        1.00*    OV        0.99     PT        0.98     SC        0.97     
!   WF        0.96     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.86     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        0.72     MK        1.00*    NL        1.00*    NY        1.20     
!   ON        1.04     OV        1.00*    PT        1.00*    SC        1.00*    
!   WF        1.00*    WZ        1.00     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.03     GC        1.02     HH        1.00*    
!   HN        1.00     KK        1.03     KP        0.99     LA        0.97     
!   MC        1.02     MK        1.01     NL        0.99     NY        0.97     
!   ON        1.05     OV        0.97     PT        0.97     SC        1.02     
!   WF        1.79     WZ        1.00*    
! 
!  A total of 99 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.00*    GC        1.10     HH        1.00*    
!   HN        1.06     KK        1.07     KP        1.00*    LA        1.00*    
!   MC        1.08     MK        1.02     NL        1.04     NY        1.04     
!   ON        1.08     OV        0.98     PT        1.00*    SC        1.07     
!   WF        1.13     WZ        1.16     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.92     GC        1.02     HH        1.00*    
!   HN        0.97     KK        0.92     KP        0.99     LA        0.93     
!   MC        1.00*    MK        0.98     NL        0.94     NY        0.98     
!   ON        1.00*    OV        0.96     PT        0.91     SC        1.00     
!   WF        0.97     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 132 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        1.52     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        1.30     MK        1.00*    NL        1.00*    NY        0.79     
!   ON        1.19     OV        1.00*    PT        1.00*    SC        1.00*    
!   WF        1.00*    WZ        1.05     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.01     GC        1.01     HH        1.00*    
!   HN        1.01     KK        1.03     KP        0.98     LA        1.00     
!   MC        1.15     MK        0.95     NL        1.02     NY        1.02     
!   ON        1.04     OV        0.98     PT        0.97     SC        1.01     
!   WF        1.77     WZ        1.00*    
! 
!  A total of 99 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00*    GC        1.10     HH        1.00*    
!   HN        1.05     KK        0.95     KP        1.00*    LA        1.00*    
!   MC        0.80     MK        0.94     NL        1.08     NY        1.01     
!   ON        1.41     OV        1.03     PT        1.00*    SC        1.06     
!   WF        1.12     WZ        2.28     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.90     FD        0.90     GC        1.01     HH        1.00*    
!   HN        0.99     KK        0.92     KP        0.97     LA        0.96     
!   MC        1.00*    MK        0.93     NL        0.97     NY        1.04     
!   ON        1.00*    OV        0.97     PT        0.94     SC        0.99     
!   WF        1.02     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.71     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        0.81     MK        1.00*    NL        1.00*    NY        1.23     
!   ON        1.29     OV        1.00*    PT        1.00*    SC        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.98     GC        1.00     HH        1.00*    
!   HN        1.00     KK        1.02     KP        1.01     LA        0.99     
!   MC        1.22     MK        0.98     NL        1.03     NY        1.04     
!   ON        1.06     OV        0.88     PT        0.91     SC        1.02     
!   WF        1.70     WZ        1.00*    
! 
!  A total of 84 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.00*    GC        1.10     HH        1.00*    
!   HN        1.07     KK        0.83     KP        1.00*    LA        1.00*    
!   MC        0.81     MK        0.96     NL        1.04     NY        1.10     
!   ON        1.19     OV        1.02     PT        1.00*    SC        1.03     
!   WF        1.07     WZ        1.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.80     FD        0.90     GC        1.03     HH        1.00*    
!   HN        0.98     KK        0.92     KP        0.99     LA        0.97     
!   MC        1.00*    MK        0.95     NL        0.98     NY        1.05     
!   ON        1.00*    OV        0.94     PT        1.19     SC        1.02     
!   WF        0.97     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.360292Jy  sigma=0.001770
! Fit after  self-cal, rms=0.409536Jy  sigma=0.001591
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.463 mas, bmaj=5.491 mas, bpa=-15.14 degrees
! Estimated noise=534.014 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (4, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000579716 Jy
! Component: 100  -  total flux cleaned = -0.00139023 Jy
! Component: 150  -  total flux cleaned = -0.00159933 Jy
! Component: 200  -  total flux cleaned = -0.00193638 Jy
! Total flux subtracted in 200 components = -0.00193638 Jy
! Clean residual min=-0.004346 max=0.004727 Jy/beam
! Clean residual mean=0.000392 rms=0.001080 Jy/beam
! Combined flux in latest and established models = 0.959446 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 49 components and 0.959446 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.409217Jy  sigma=0.001587
! Fit after  self-cal, rms=0.410768Jy  sigma=0.001587
! 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.410768Jy  sigma=0.001587
! Fit after  self-cal, rms=0.413080Jy  sigma=0.001585
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.467 mas, bmaj=5.498 mas, bpa=-15.18 degrees
! Estimated noise=532.95 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00233645 Jy
! Component: 100  -  total flux cleaned = -0.00265323 Jy
! Component: 150  -  total flux cleaned = -0.00293205 Jy
! Component: 200  -  total flux cleaned = -0.00258635 Jy
! Total flux subtracted in 200 components = -0.00258635 Jy
! Clean residual min=-0.003496 max=0.004186 Jy/beam
! Clean residual mean=0.000379 rms=0.000989 Jy/beam
! Combined flux in latest and established models = 0.956859 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 62 components and 0.956859 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.412958Jy  sigma=0.001584
! Fit after  self-cal, rms=0.413492Jy  sigma=0.001584
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.000727505 Jy
! Component: 100  -  total flux cleaned = 0.00103511 Jy
! Component: 150  -  total flux cleaned = 0.00140927 Jy
! Component: 200  -  total flux cleaned = 0.00175257 Jy
! Total flux subtracted in 200 components = 0.00175257 Jy
! Clean residual min=-0.003281 max=0.003940 Jy/beam
! Clean residual mean=0.000373 rms=0.000960 Jy/beam
! Combined flux in latest and established models = 0.958612 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 66 components and 0.958612 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.413442Jy  sigma=0.001583
! Fit after  self-cal, rms=0.413446Jy  sigma=0.001583
! 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.413446Jy  sigma=0.001583
! Fit after  self-cal, rms=0.413886Jy  sigma=0.001583
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.472 mas, bmaj=5.503 mas, bpa=-15.21 degrees
! Estimated noise=532.458 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00296729 Jy
! Component: 100  -  total flux cleaned = -0.00297155 Jy
! Component: 150  -  total flux cleaned = -0.00272732 Jy
! Component: 200  -  total flux cleaned = -0.00257651 Jy
! Total flux subtracted in 200 components = -0.00257651 Jy
! Clean residual min=-0.003013 max=0.003830 Jy/beam
! Clean residual mean=0.000364 rms=0.000921 Jy/beam
! Combined flux in latest and established models = 0.956035 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 69 components and 0.956035 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.413836Jy  sigma=0.001582
! Fit after  self-cal, rms=0.413902Jy  sigma=0.001582
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.000535502 Jy
! Component: 100  -  total flux cleaned = 0.000733975 Jy
! Component: 150  -  total flux cleaned = 0.000976875 Jy
! Component: 200  -  total flux cleaned = 0.00109004 Jy
! Total flux subtracted in 200 components = 0.00109004 Jy
! Clean residual min=-0.002979 max=0.003792 Jy/beam
! Clean residual mean=0.000360 rms=0.000910 Jy/beam
! Combined flux in latest and established models = 0.957125 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 74 components and 0.957125 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.413879Jy  sigma=0.001582
! Fit after  self-cal, rms=0.413880Jy  sigma=0.001582
! 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.413880Jy  sigma=0.001582
! Fit after  self-cal, rms=0.414065Jy  sigma=0.001582
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.881 mas, bmaj=8.817 mas, bpa=-8.372 degrees
! Estimated noise=707.097 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00130083 Jy
! Component: 100  -  total flux cleaned = 0.00161125 Jy
! Component: 150  -  total flux cleaned = 0.0018865 Jy
! Component: 200  -  total flux cleaned = 0.00202718 Jy
! Total flux subtracted in 200 components = 0.00202718 Jy
! Clean residual min=-0.003469 max=0.005347 Jy/beam
! Clean residual mean=0.001087 rms=0.001398 Jy/beam
! Combined flux in latest and established models = 0.959153 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 83 components and 0.959153 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.414062Jy  sigma=0.001582
! Fit after  self-cal, rms=0.414082Jy  sigma=0.001582
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.000285068 Jy
! Component: 100  -  total flux cleaned = 0.000489661 Jy
! Component: 150  -  total flux cleaned = 0.000602887 Jy
! Component: 200  -  total flux cleaned = 0.000677481 Jy
! Total flux subtracted in 200 components = 0.000677481 Jy
! Clean residual min=-0.003506 max=0.005308 Jy/beam
! Clean residual mean=0.001078 rms=0.001405 Jy/beam
! Combined flux in latest and established models = 0.95983 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 95 components and 0.95983 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.414084Jy  sigma=0.001582
! Fit after  self-cal, rms=0.414086Jy  sigma=0.001582
! 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.476 mas, bmaj=5.505 mas, bpa=-15.22 degrees
! Estimated noise=532.164 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.476 x 5.505 at -15.22 degrees (North through East)
! Clean map  min=-0.0033735  max=0.84678 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.414086Jy  sigma=0.001582
! Fit after  self-cal, rms=1.254991Jy  sigma=0.001293
! Inverting map and beam 
! Estimated beam: bmin=2.475 mas, bmaj=5.504 mas, bpa=-15.18 degrees
! Estimated noise=531.099 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00227519 Jy
! Component: 100  -  total flux cleaned = -0.00274504 Jy
! Component: 150  -  total flux cleaned = -0.00294058 Jy
! Component: 200  -  total flux cleaned = -0.00288364 Jy
! Total flux subtracted in 200 components = -0.00288364 Jy
! Clean residual min=-0.002477 max=0.003444 Jy/beam
! Clean residual mean=0.000312 rms=0.000811 Jy/beam
! Combined flux in latest and established models = 0.956946 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 102 components and 0.956946 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254985Jy  sigma=0.001293
! Fit after  self-cal, rms=1.254985Jy  sigma=0.001293
! Inverting map 
! Added new window around map position (11, 37).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00328341 Jy
! Component: 100  -  total flux cleaned = 0.00541272 Jy
! Component: 150  -  total flux cleaned = 0.00662823 Jy
! Component: 200  -  total flux cleaned = 0.00741358 Jy
! Total flux subtracted in 200 components = 0.00741358 Jy
! Clean residual min=-0.002485 max=0.003360 Jy/beam
! Clean residual mean=0.000285 rms=0.000774 Jy/beam
! Combined flux in latest and established models = 0.96436 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 118 components and 0.96436 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254968Jy  sigma=0.001292
! Fit after  self-cal, rms=1.254963Jy  sigma=0.001292
! Inverting map 
! Added new window around map position (11.5, 7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00296405 Jy
! Component: 100  -  total flux cleaned = 0.00414556 Jy
! Component: 150  -  total flux cleaned = 0.00492714 Jy
! Component: 200  -  total flux cleaned = 0.00576031 Jy
! Total flux subtracted in 200 components = 0.00576031 Jy
! Clean residual min=-0.002592 max=0.003232 Jy/beam
! Clean residual mean=0.000261 rms=0.000737 Jy/beam
! Combined flux in latest and established models = 0.97012 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 135 components and 0.97012 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254952Jy  sigma=0.001292
! Fit after  self-cal, rms=1.254992Jy  sigma=0.001292
! Inverting map 
! Added new window around map position (0, 13.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00276407 Jy
! Component: 100  -  total flux cleaned = 0.00377071 Jy
! Component: 150  -  total flux cleaned = 0.00442472 Jy
! Component: 200  -  total flux cleaned = 0.00480775 Jy
! Total flux subtracted in 200 components = 0.00480775 Jy
! Clean residual min=-0.002500 max=0.003203 Jy/beam
! Clean residual mean=0.000244 rms=0.000707 Jy/beam
! Combined flux in latest and established models = 0.974928 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 151 components and 0.974928 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254964Jy  sigma=0.001291
! Fit after  self-cal, rms=1.254971Jy  sigma=0.001291
! Inverting map 
! Added new window around map position (-32, 18.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00281426 Jy
! Component: 100  -  total flux cleaned = 0.00401928 Jy
! Component: 150  -  total flux cleaned = 0.00469776 Jy
! Component: 200  -  total flux cleaned = 0.00521855 Jy
! Total flux subtracted in 200 components = 0.00521855 Jy
! Clean residual min=-0.002385 max=0.002815 Jy/beam
! Clean residual mean=0.000228 rms=0.000689 Jy/beam
! Combined flux in latest and established models = 0.980146 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 175 components and 0.980146 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254937Jy  sigma=0.001291
! Fit after  self-cal, rms=1.254953Jy  sigma=0.001291
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.254953Jy  sigma=0.001291
! Fit after  self-cal, rms=1.356392Jy  sigma=0.001291
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.226 mas, bmaj=3.909 mas, bpa=-13.34 degrees
! Estimated noise=1234.75 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.649071 Jy
! Component: 100  -  total flux cleaned = 0.791206 Jy
! Component: 150  -  total flux cleaned = 0.837939 Jy
! Component: 200  -  total flux cleaned = 0.864593 Jy
! Total flux subtracted in 200 components = 0.864593 Jy
! Clean residual min=-0.008131 max=0.014150 Jy/beam
! Clean residual mean=0.000078 rms=0.002153 Jy/beam
! Combined flux in latest and established models = 0.864593 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.864593 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.476 mas, bmaj=5.505 mas, bpa=-15.18 degrees
! Estimated noise=530.773 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.0279987 Jy
! Component: 100  -  total flux cleaned = 0.0457314 Jy
! Component: 150  -  total flux cleaned = 0.0579232 Jy
! Component: 200  -  total flux cleaned = 0.066582 Jy
! Total flux subtracted in 200 components = 0.066582 Jy
! Clean residual min=-0.002931 max=0.005337 Jy/beam
! Clean residual mean=0.000411 rms=0.001129 Jy/beam
! Combined flux in latest and established models = 0.931175 Jy
! Adding 50 model components to the UV plane model.
! The established model now contains 64 components and 0.931175 Jy
! Inverting map 
! Added new window around map position (-3.5, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00658934 Jy
! Component: 100  -  total flux cleaned = 0.0118037 Jy
! Component: 150  -  total flux cleaned = 0.0162158 Jy
! Component: 200  -  total flux cleaned = 0.0200571 Jy
! Total flux subtracted in 200 components = 0.0200571 Jy
! Clean residual min=-0.002304 max=0.003410 Jy/beam
! Clean residual mean=0.000332 rms=0.000839 Jy/beam
! Combined flux in latest and established models = 0.951232 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 97 components and 0.951232 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=6.877 mas, bmaj=8.813 mas, bpa=-8.31 degrees
! Estimated noise=706.108 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00670578 Jy
! Component: 100  -  total flux cleaned = 0.0112078 Jy
! Component: 150  -  total flux cleaned = 0.0148949 Jy
! Component: 200  -  total flux cleaned = 0.0180705 Jy
! Total flux subtracted in 200 components = 0.0180705 Jy
! Clean residual min=-0.002331 max=0.003741 Jy/beam
! Clean residual mean=0.000838 rms=0.001008 Jy/beam
! Combined flux in latest and established models = 0.969303 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.00279821 Jy
! Component: 100  -  total flux cleaned = 0.00528094 Jy
! Component: 150  -  total flux cleaned = 0.00749991 Jy
! Component: 200  -  total flux cleaned = 0.00949015 Jy
! Total flux subtracted in 200 components = 0.00949015 Jy
! Clean residual min=-0.002251 max=0.003632 Jy/beam
! Clean residual mean=0.000724 rms=0.000879 Jy/beam
! Combined flux in latest and established models = 0.978793 Jy
! Adding 121 model components to the UV plane model.
! The established model now contains 209 components and 0.978793 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.476 mas, bmaj=5.505 mas, bpa=-15.18 degrees
! Estimated noise=530.773 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00132352 Jy
! Component: 100  -  total flux cleaned = 0.00205263 Jy
! Component: 150  -  total flux cleaned = 0.00272446 Jy
! Component: 200  -  total flux cleaned = 0.00341668 Jy
! Total flux subtracted in 200 components = 0.00341668 Jy
! Clean residual min=-0.002646 max=0.003079 Jy/beam
! Clean residual mean=0.000215 rms=0.000693 Jy/beam
! Combined flux in latest and established models = 0.98221 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 235 components and 0.98221 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.356413Jy  sigma=0.001291
! Fit after  self-cal, rms=1.356439Jy  sigma=0.001291
wmodel J0238+1636_S_1999_05_10_pus_map.mod
! Writing 235 model components to file: J0238+1636_S_1999_05_10_pus_map.mod
wobs J0238+1636_S_1999_05_10_pus_uvs.fits
! Writing UV FITS file: J0238+1636_S_1999_05_10_pus_uvs.fits
wwins J0238+1636_S_1999_05_10_pus_map.win
! wwins: Wrote 7 windows to J0238+1636_S_1999_05_10_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.00118674 Jy
! Component: 100  -  total flux cleaned = 0.00216963 Jy
! Component: 150  -  total flux cleaned = 0.00315694 Jy
! Component: 200  -  total flux cleaned = 0.00401724 Jy
! Component: 250  -  total flux cleaned = 0.00484892 Jy
! Component: 300  -  total flux cleaned = 0.00552921 Jy
! Component: 350  -  total flux cleaned = 0.00627495 Jy
! Component: 400  -  total flux cleaned = 0.00704356 Jy
! Component: 450  -  total flux cleaned = 0.00771703 Jy
! Component: 500  -  total flux cleaned = 0.00841601 Jy
! Component: 550  -  total flux cleaned = 0.00906393 Jy
! Component: 600  -  total flux cleaned = 0.00981279 Jy
! Component: 650  -  total flux cleaned = 0.0105131 Jy
! Component: 700  -  total flux cleaned = 0.0112393 Jy
! Component: 750  -  total flux cleaned = 0.0118482 Jy
! Component: 800  -  total flux cleaned = 0.0124845 Jy
! Component: 850  -  total flux cleaned = 0.0129384 Jy
! Component: 900  -  total flux cleaned = 0.0135255 Jy
! Component: 950  -  total flux cleaned = 0.0141053 Jy
! Component: 1000  -  total flux cleaned = 0.0145775 Jy
! Component: 1050  -  total flux cleaned = 0.0151112 Jy
! Component: 1100  -  total flux cleaned = 0.0155732 Jy
! Component: 1150  -  total flux cleaned = 0.0161607 Jy
! Component: 1200  -  total flux cleaned = 0.0165806 Jy
! Component: 1250  -  total flux cleaned = 0.0170608 Jy
! Component: 1300  -  total flux cleaned = 0.0175045 Jy
! Component: 1350  -  total flux cleaned = 0.0178816 Jy
! Component: 1400  -  total flux cleaned = 0.0182869 Jy
! Component: 1450  -  total flux cleaned = 0.0187808 Jy
! Component: 1500  -  total flux cleaned = 0.019148 Jy
! Component: 1550  -  total flux cleaned = 0.0195424 Jy
! Component: 1600  -  total flux cleaned = 0.0199037 Jy
! Component: 1650  -  total flux cleaned = 0.0202918 Jy
! Component: 1700  -  total flux cleaned = 0.0206772 Jy
! Component: 1750  -  total flux cleaned = 0.0210591 Jy
! Component: 1800  -  total flux cleaned = 0.02138 Jy
! Component: 1850  -  total flux cleaned = 0.0216408 Jy
! Component: 1900  -  total flux cleaned = 0.0220145 Jy
! Component: 1950  -  total flux cleaned = 0.0222149 Jy
! Component: 2000  -  total flux cleaned = 0.0225273 Jy
! Total flux subtracted in 2048 components = 0.0227813 Jy
! Clean residual min=-0.001659 max=0.001630 Jy/beam
! Clean residual mean=0.000127 rms=0.000541 Jy/beam
! Combined flux in latest and established models = 1.00499 Jy
keep
! Adding 150 model components to the UV plane model.
! The established model now contains 385 components and 1.00499 Jy
![Exited script file: muppet]
wmap "J0238+1636_S_1999_05_10_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.476 x 5.505 at -15.18 degrees (North through East)
! Clean map  min=-0.0024505  max=0.84601 Jy/beam
! Writing clean map to FITS file: J0238+1636_S_1999_05_10_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.846013 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000540426 
device "J0238+1636_S_1999_05_10_pus\_map.eps/VPS"
! Attempting to open device: 'J0238+1636_S_1999_05_10_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.191637 0.191637 0.383275 0.766549 1.5331 3.0662 6.13239 12.2648 24.5296 49.0591 98.1183
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0016 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.846 
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.476 x 5.505 at -15.18 degrees (North through East)
! Clean map  min=-0.0024505  max=0.84601 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0238+1636_S_1999_05_10_pus\_map.gif/vgif"
! Attempting to open device: 'J0238+1636_S_1999_05_10_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0238+1636_S_1999_05_10_pus_uvs.log closed on Mon Jan 21 17:25:37 2008