! Started logfile: J0948+4039_X_2003_06_18_pus_uvs.log on Fri Jan 19 13:02:40 2007
obs J0948+4039_X_2003_06_18_pus_uva.fits
! Reading UV FITS file: J0948+4039_X_2003_06_18_pus_uva.fits
! AN table 1: 150 integrations on 153 of 153 possible baselines.
! AN table 2: 72 integrations on 153 of 153 possible baselines.
! AN table 3: 5 integrations on 153 of 153 possible baselines.
! AN table 4: 70 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0899628 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0948+4039
! 
! 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 2235 lines of history.
! 
! Reading 16352 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
float field_size
field_size = 512
float field_cell
field_cell = 0.16
float taper_size
taper_size = 90.
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.160x0.160 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 2354 telescope corrections were flagged in sub-array 1.
!  A total of 742 telescope corrections were flagged in sub-array 2.
!  A total of 78 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 2309 telescope corrections were flagged in sub-array 1.
!  A total of 742 telescope corrections were flagged in sub-array 2.
!  A total of 78 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 2354 telescope corrections were flagged in sub-array 1.
!  A total of 742 telescope corrections were flagged in sub-array 2.
!  A total of 78 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 2309 telescope corrections were flagged in sub-array 1.
!  A total of 742 telescope corrections were flagged in sub-array 2.
!  A total of 78 telescope corrections were flagged in sub-array 3.
!  A total of 1164 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.883915Jy  sigma=0.012415
! Fit after  self-cal, rms=0.515749Jy  sigma=0.006674
! 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.5619 mas, bmaj=0.884 mas, bpa=14.81 degrees
! Estimated noise=822.549 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.54949 Jy
! Component: 100  -  total flux cleaned = 0.763528 Jy
! Total flux subtracted in 100 components = 0.763528 Jy
! Clean residual min=-0.065721 max=0.197849 Jy/beam
! Clean residual mean=0.000789 rms=0.018763 Jy/beam
! Combined flux in latest and established models = 0.763528 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.763528 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.450355Jy  sigma=0.006610
! Fit after  self-cal, rms=0.445590Jy  sigma=0.006572
! Inverting map 
! Added new window around map position (0.8, -0.64).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.186674 Jy
! Component: 100  -  total flux cleaned = 0.290811 Jy
! Total flux subtracted in 100 components = 0.290811 Jy
! Clean residual min=-0.038759 max=0.063731 Jy/beam
! Clean residual mean=0.000367 rms=0.010850 Jy/beam
! Combined flux in latest and established models = 1.05434 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 27 components and 1.05434 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.324101Jy  sigma=0.004234
! Fit after  self-cal, rms=0.314269Jy  sigma=0.004114
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0858218 Jy
! Component: 100  -  total flux cleaned = 0.14363 Jy
! Total flux subtracted in 100 components = 0.14363 Jy
! Clean residual min=-0.026797 max=0.033393 Jy/beam
! Clean residual mean=0.000159 rms=0.007035 Jy/beam
! Combined flux in latest and established models = 1.19797 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 36 components and 1.19797 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273562Jy  sigma=0.003187
! Fit after  self-cal, rms=0.271178Jy  sigma=0.003159
! 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=0.7026 mas, bmaj=1.079 mas, bpa=11.98 degrees
! Estimated noise=437.53 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.0915474 Jy
! Component: 100  -  total flux cleaned = 0.141413 Jy
! Component: 150  -  total flux cleaned = 0.16992 Jy
! Component: 200  -  total flux cleaned = 0.186567 Jy
! Total flux subtracted in 200 components = 0.186567 Jy
! Clean residual min=-0.018756 max=0.026047 Jy/beam
! Clean residual mean=0.000046 rms=0.005901 Jy/beam
! Combined flux in latest and established models = 1.38454 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 59 components and 1.38454 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.246804Jy  sigma=0.002522
! Fit after  self-cal, rms=0.245522Jy  sigma=0.002506
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.99     GG        1.00*    HN        1.03     
!   KK        1.00*    KP        1.05     LA        0.97     MA        1.00*    
!   MK        1.00*    NL        1.04     ON        0.92     OV        1.03     
!   PT        0.99     SC        0.96     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.98     GG        1.00*    HN        0.95     
!   KK        0.99     KP        0.98     LA        0.97     MA        1.00*    
!   MK        0.96     NL        1.01     ON        1.03     OV        0.96     
!   PT        1.00*    SC        0.93     TC        1.00*    TS        1.10     
!   WF        1.27     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     GG        1.00*    HN        1.02     
!   KK        1.00*    KP        0.99     LA        0.97     MA        0.97     
!   MK        1.00*    NL        1.02     ON        0.96     OV        1.02     
!   PT        1.04     SC        0.94     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GG        1.00*    HN        0.96     
!   KK        1.03     KP        0.93     LA        0.97     MA        1.00*    
!   MK        0.97     NL        0.97     ON        1.03     OV        0.95     
!   PT        1.00*    SC        0.92     TC        1.00*    TS        1.08     
!   WF        1.36     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.99     GG        1.00*    HN        1.04     
!   KK        1.00*    KP        1.04     LA        0.99     MA        1.00*    
!   MK        1.00*    NL        1.00     ON        0.92     OV        1.06     
!   PT        1.06     SC        0.91     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.96     GG        1.00*    HN        0.94     
!   KK        1.06     KP        0.96     LA        0.98     MA        1.00*    
!   MK        0.95     NL        0.96     ON        1.02     OV        0.99     
!   PT        1.00*    SC        0.93     TC        1.00*    TS        1.08     
!   WF        1.29     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.97     GG        1.00*    HN        1.10     
!   KK        1.00*    KP        0.99     LA        0.96     MA        0.99     
!   MK        1.00*    NL        1.01     ON        1.00     OV        1.06     
!   PT        1.06     SC        0.91     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.94     GG        1.00*    HN        0.97     
!   KK        1.02     KP        0.92     LA        0.96     MA        1.00*    
!   MK        1.02     NL        2.95     ON        1.07     OV        0.98     
!   PT        1.00*    SC        2.32     TC        1.00*    TS        1.06     
!   WF        1.23     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
! 
! Fit before self-cal, rms=0.245522Jy  sigma=0.002506
! Fit after  self-cal, rms=0.248260Jy  sigma=0.002100
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7223 mas, bmaj=1.085 mas, bpa=11.29 degrees
! Estimated noise=435.914 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00283113 Jy
! Component: 100  -  total flux cleaned = 0.00283386 Jy
! Component: 150  -  total flux cleaned = 0.00282983 Jy
! Component: 200  -  total flux cleaned = 0.00283124 Jy
! Total flux subtracted in 200 components = 0.00283124 Jy
! Clean residual min=-0.009813 max=0.012364 Jy/beam
! Clean residual mean=0.000253 rms=0.002948 Jy/beam
! Combined flux in latest and established models = 1.38737 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 67 components and 1.38737 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.247835Jy  sigma=0.002089
! Fit after  self-cal, rms=0.247922Jy  sigma=0.002085
! 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.247922Jy  sigma=0.002085
! Fit after  self-cal, rms=0.247723Jy  sigma=0.002084
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7233 mas, bmaj=1.083 mas, bpa=11.26 degrees
! Estimated noise=434.806 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00097117 Jy
! Component: 100  -  total flux cleaned = 0.000969753 Jy
! Component: 150  -  total flux cleaned = 0.000969013 Jy
! Component: 200  -  total flux cleaned = 0.000979157 Jy
! Total flux subtracted in 200 components = 0.000979157 Jy
! Clean residual min=-0.009185 max=0.012136 Jy/beam
! Clean residual mean=0.000253 rms=0.002873 Jy/beam
! Combined flux in latest and established models = 1.38835 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 69 components and 1.38835 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.247492Jy  sigma=0.002078
! Fit after  self-cal, rms=0.247264Jy  sigma=0.002076
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 (11.68, 6.24).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0116978 Jy
! Component: 100  -  total flux cleaned = 0.0159855 Jy
! Component: 150  -  total flux cleaned = 0.0168543 Jy
! Component: 200  -  total flux cleaned = 0.0173028 Jy
! Total flux subtracted in 200 components = 0.0173028 Jy
! Clean residual min=-0.008819 max=0.011132 Jy/beam
! Clean residual mean=0.000192 rms=0.002618 Jy/beam
! Combined flux in latest and established models = 1.40565 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 84 components and 1.40565 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.246779Jy  sigma=0.002060
! Fit after  self-cal, rms=0.246676Jy  sigma=0.002059
! Inverting map 
! Added new window around map position (9.44, -3.84).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0116979 Jy
! Component: 100  -  total flux cleaned = 0.018405 Jy
! Component: 150  -  total flux cleaned = 0.0205415 Jy
! Component: 200  -  total flux cleaned = 0.0216715 Jy
! Total flux subtracted in 200 components = 0.0216715 Jy
! Clean residual min=-0.007917 max=0.008864 Jy/beam
! Clean residual mean=0.000104 rms=0.002183 Jy/beam
! Combined flux in latest and established models = 1.42732 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 116 components and 1.42732 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.245984Jy  sigma=0.002042
! Fit after  self-cal, rms=0.245934Jy  sigma=0.002041
! 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.245934Jy  sigma=0.002041
! Fit after  self-cal, rms=0.245077Jy  sigma=0.002038
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7246 mas, bmaj=1.083 mas, bpa=11.13 degrees
! Estimated noise=433.982 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00492378 Jy
! Component: 100  -  total flux cleaned = 0.00786663 Jy
! Component: 150  -  total flux cleaned = 0.00865735 Jy
! Component: 200  -  total flux cleaned = 0.00923325 Jy
! Total flux subtracted in 200 components = 0.00923325 Jy
! Clean residual min=-0.007015 max=0.008360 Jy/beam
! Clean residual mean=0.000083 rms=0.001936 Jy/beam
! Combined flux in latest and established models = 1.43655 Jy
selfcal
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 129 components and 1.43655 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.244828Jy  sigma=0.002032
! Fit after  self-cal, rms=0.244771Jy  sigma=0.002032
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 (6.4, -3.68).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00691851 Jy
! Component: 100  -  total flux cleaned = 0.00920486 Jy
! Component: 150  -  total flux cleaned = 0.00965141 Jy
! Component: 200  -  total flux cleaned = 0.00992705 Jy
! Total flux subtracted in 200 components = 0.00992705 Jy
! Clean residual min=-0.006428 max=0.006998 Jy/beam
! Clean residual mean=0.000043 rms=0.001726 Jy/beam
! Combined flux in latest and established models = 1.44648 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 145 components and 1.44648 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.244498Jy  sigma=0.002025
! Fit after  self-cal, rms=0.244460Jy  sigma=0.002024
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 90 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.244460Jy  sigma=0.002024
! Fit after  self-cal, rms=0.244442Jy  sigma=0.002023
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.02 mas, bmaj=2.388 mas, bpa=41.75 degrees
! Estimated noise=512.651 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00714005 Jy
! Component: 100  -  total flux cleaned = 0.00963312 Jy
! Component: 150  -  total flux cleaned = 0.0105392 Jy
! Component: 200  -  total flux cleaned = 0.011178 Jy
! Total flux subtracted in 200 components = 0.011178 Jy
! Clean residual min=-0.006429 max=0.007820 Jy/beam
! Clean residual mean=0.000098 rms=0.002189 Jy/beam
! Combined flux in latest and established models = 1.45766 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 159 components and 1.45766 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.244374Jy  sigma=0.002020
! Fit after  self-cal, rms=0.244310Jy  sigma=0.002019
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.000962773 Jy
! Component: 100  -  total flux cleaned = 0.00225098 Jy
! Component: 150  -  total flux cleaned = 0.00297897 Jy
! Component: 200  -  total flux cleaned = 0.00352717 Jy
! Total flux subtracted in 200 components = 0.00352717 Jy
! Clean residual min=-0.005891 max=0.007548 Jy/beam
! Clean residual mean=0.000067 rms=0.002094 Jy/beam
! Combined flux in latest and established models = 1.46119 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 164 components and 1.46119 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.244292Jy  sigma=0.002019
! Fit after  self-cal, rms=0.244229Jy  sigma=0.002018
! 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=0.7253 mas, bmaj=1.083 mas, bpa=11.07 degrees
! Estimated noise=433.478 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7253 x 1.083 at 11.07 degrees (North through East)
! Clean map  min=-0.0050036  max=0.73935 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.244229Jy  sigma=0.002018
! Fit after  self-cal, rms=0.257149Jy  sigma=0.001864
! Inverting map and beam 
! Estimated beam: bmin=0.7248 mas, bmaj=1.084 mas, bpa=11.01 degrees
! Estimated noise=433.332 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00113034 Jy
! Component: 100  -  total flux cleaned = -0.000588542 Jy
! Component: 150  -  total flux cleaned = -0.000227845 Jy
! Component: 200  -  total flux cleaned = 0.000105316 Jy
! Total flux subtracted in 200 components = 0.000105316 Jy
! Clean residual min=-0.005309 max=0.006313 Jy/beam
! Clean residual mean=0.000056 rms=0.001447 Jy/beam
! Combined flux in latest and established models = 1.46129 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 175 components and 1.46129 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256986Jy  sigma=0.001861
! Fit after  self-cal, rms=0.256960Jy  sigma=0.001861
! Inverting map 
! Added new window around map position (1.92, -0.64).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00318708 Jy
! Component: 100  -  total flux cleaned = 0.00217853 Jy
! Component: 150  -  total flux cleaned = 0.0020482 Jy
! Component: 200  -  total flux cleaned = 0.00216046 Jy
! Total flux subtracted in 200 components = 0.00216046 Jy
! Clean residual min=-0.005521 max=0.005577 Jy/beam
! Clean residual mean=0.000046 rms=0.001387 Jy/beam
! Combined flux in latest and established models = 1.46345 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 187 components and 1.46345 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256663Jy  sigma=0.001857
! Fit after  self-cal, rms=0.256639Jy  sigma=0.001856
! 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.256639Jy  sigma=0.001856
! Fit after  self-cal, rms=0.255909Jy  sigma=0.001856
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.5889 mas, bmaj=0.8844 mas, bpa=13.49 degrees
! Estimated noise=830.341 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.579467 Jy
! Component: 100  -  total flux cleaned = 0.845066 Jy
! Component: 150  -  total flux cleaned = 1.00702 Jy
! Component: 200  -  total flux cleaned = 1.11303 Jy
! Total flux subtracted in 200 components = 1.11303 Jy
! Clean residual min=-0.023919 max=0.057919 Jy/beam
! Clean residual mean=0.000446 rms=0.007841 Jy/beam
! Combined flux in latest and established models = 1.11303 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 20 model components to the UV plane model.
! The established model now contains 20 components and 1.11303 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.7251 mas, bmaj=1.084 mas, bpa=11 degrees
! Estimated noise=433.352 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.119196 Jy
! Component: 100  -  total flux cleaned = 0.18379 Jy
! Component: 150  -  total flux cleaned = 0.220363 Jy
! Component: 200  -  total flux cleaned = 0.24308 Jy
! Total flux subtracted in 200 components = 0.24308 Jy
! Clean residual min=-0.008805 max=0.014109 Jy/beam
! Clean residual mean=0.000474 rms=0.003583 Jy/beam
! Combined flux in latest and established models = 1.35611 Jy
! Adding 54 model components to the UV plane model.
! The established model now contains 63 components and 1.35611 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 90 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.019 mas, bmaj=2.386 mas, bpa=41.45 degrees
! Estimated noise=512.344 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.030281 Jy
! Component: 100  -  total flux cleaned = 0.050078 Jy
! Component: 150  -  total flux cleaned = 0.0645847 Jy
! Component: 200  -  total flux cleaned = 0.075559 Jy
! Total flux subtracted in 200 components = 0.075559 Jy
! Clean residual min=-0.006448 max=0.008071 Jy/beam
! Clean residual mean=0.000376 rms=0.002803 Jy/beam
! Combined flux in latest and established models = 1.43167 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.00846888 Jy
! Component: 100  -  total flux cleaned = 0.0150671 Jy
! Component: 150  -  total flux cleaned = 0.0202347 Jy
! Component: 200  -  total flux cleaned = 0.0238597 Jy
! Total flux subtracted in 200 components = 0.0238597 Jy
! Clean residual min=-0.005612 max=0.006564 Jy/beam
! Clean residual mean=0.000173 rms=0.001965 Jy/beam
! Combined flux in latest and established models = 1.45553 Jy
! Adding 98 model components to the UV plane model.
! The established model now contains 143 components and 1.45553 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.7251 mas, bmaj=1.084 mas, bpa=11 degrees
! Estimated noise=433.352 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00276209 Jy
! Component: 100  -  total flux cleaned = 0.00379163 Jy
! Component: 150  -  total flux cleaned = 0.00396528 Jy
! Component: 200  -  total flux cleaned = 0.00412242 Jy
! Total flux subtracted in 200 components = 0.00412242 Jy
! Clean residual min=-0.005577 max=0.006089 Jy/beam
! Clean residual mean=0.000066 rms=0.001466 Jy/beam
! Combined flux in latest and established models = 1.45965 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 163 components and 1.45965 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256379Jy  sigma=0.001861
! Fit after  self-cal, rms=0.256122Jy  sigma=0.001858
wmodel J0948+4039_X_2003_06_18_pus_map.mod
! Writing 163 model components to file: J0948+4039_X_2003_06_18_pus_map.mod
wobs J0948+4039_X_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J0948+4039_X_2003_06_18_pus_uvs.fits
wwins J0948+4039_X_2003_06_18_pus_map.win
! wwins: Wrote 6 windows to J0948+4039_X_2003_06_18_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.000938641 Jy
! Component: 100  -  total flux cleaned = 0.00180827 Jy
! Component: 150  -  total flux cleaned = 0.00262677 Jy
! Component: 200  -  total flux cleaned = 0.00314768 Jy
! Component: 250  -  total flux cleaned = 0.00364429 Jy
! Component: 300  -  total flux cleaned = 0.00412053 Jy
! Component: 350  -  total flux cleaned = 0.00427464 Jy
! Component: 400  -  total flux cleaned = 0.00442397 Jy
! Component: 450  -  total flux cleaned = 0.00464115 Jy
! Component: 500  -  total flux cleaned = 0.0046416 Jy
! Component: 550  -  total flux cleaned = 0.00477991 Jy
! Component: 600  -  total flux cleaned = 0.00491487 Jy
! Component: 650  -  total flux cleaned = 0.00511602 Jy
! Component: 700  -  total flux cleaned = 0.00544401 Jy
! Component: 750  -  total flux cleaned = 0.005637 Jy
! Component: 800  -  total flux cleaned = 0.00582766 Jy
! Component: 850  -  total flux cleaned = 0.00620326 Jy
! Component: 900  -  total flux cleaned = 0.00651029 Jy
! Component: 950  -  total flux cleaned = 0.0065712 Jy
! Component: 1000  -  total flux cleaned = 0.00699173 Jy
! Component: 1050  -  total flux cleaned = 0.00722919 Jy
! Component: 1100  -  total flux cleaned = 0.00746436 Jy
! Component: 1150  -  total flux cleaned = 0.00763743 Jy
! Component: 1200  -  total flux cleaned = 0.00792207 Jy
! Component: 1250  -  total flux cleaned = 0.00809135 Jy
! Component: 1300  -  total flux cleaned = 0.00837013 Jy
! Component: 1350  -  total flux cleaned = 0.00875583 Jy
! Component: 1400  -  total flux cleaned = 0.00897362 Jy
! Component: 1450  -  total flux cleaned = 0.00935026 Jy
! Component: 1500  -  total flux cleaned = 0.0095635 Jy
! Component: 1550  -  total flux cleaned = 0.0099321 Jy
! Component: 1600  -  total flux cleaned = 0.0101412 Jy
! Component: 1650  -  total flux cleaned = 0.0103491 Jy
! Component: 1700  -  total flux cleaned = 0.0106564 Jy
! Component: 1750  -  total flux cleaned = 0.0109093 Jy
! Component: 1800  -  total flux cleaned = 0.0112096 Jy
! Component: 1850  -  total flux cleaned = 0.0114081 Jy
! Component: 1900  -  total flux cleaned = 0.0117028 Jy
! Component: 1950  -  total flux cleaned = 0.0118491 Jy
! Component: 2000  -  total flux cleaned = 0.0119453 Jy
! Total flux subtracted in 2048 components = 0.0121372 Jy
! Clean residual min=-0.002463 max=0.002507 Jy/beam
! Clean residual mean=0.000046 rms=0.000848 Jy/beam
! Combined flux in latest and established models = 1.47179 Jy
keep
! Adding 155 model components to the UV plane model.
! The established model now contains 317 components and 1.47179 Jy
wmap "J0948+4039_X_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7251 x 1.084 at 11 degrees (North through East)
! Clean map  min=-0.0041165  max=0.74013 Jy/beam
! Writing clean map to FITS file: J0948+4039_X_2003_06_18_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.74013 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000853829 
device "J0948+4039_X_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J0948+4039_X_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.346086 0.346086 0.692173 1.38435 2.76869 5.53738 11.0748 22.1495 44.299 88.5981
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0025 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.74 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7251 x 1.084 at 11 degrees (North through East)
! Clean map  min=-0.0041165  max=0.74013 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0948+4039_X_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J0948+4039_X_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0948+4039_X_2003_06_18_pus_uvs.log closed on Fri Jan 19 13:04:23 2007