! Started logfile: J1849+6705_S_2003_06_18_pus_uvs.log on Wed Jan 24 18:54:13 2007
obs J1849+6705_S_2003_06_18_pus_uva.fits
! Reading UV FITS file: J1849+6705_S_2003_06_18_pus_uva.fits
! AN table 1: 47 integrations on 153 of 153 possible baselines.
! AN table 2: 11 integrations on 153 of 153 possible baselines.
! AN table 3: 246 integrations on 153 of 153 possible baselines.
! AN table 4: 138 integrations on 153 of 153 possible baselines.
! AN table 5: 39 integrations on 153 of 153 possible baselines.
! AN table 6: 154 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0961556 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1849+6705
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.23697e+09        8e+06          1        8e+06
!  02        2  2.26697e+09        8e+06          1        8e+06
!  03        3  2.35697e+09        8e+06          1        8e+06
!  04        4  2.37697e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2429 lines of history.
! 
! Reading 37368 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
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 575 telescope corrections were flagged in sub-array 1.
!  A total of 198 telescope corrections were flagged in sub-array 2.
!  A total of 3263 telescope corrections were flagged in sub-array 3.
!  A total of 1931 telescope corrections were flagged in sub-array 4.
!  A total of 442 telescope corrections were flagged in sub-array 5.
!  A total of 2421 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 2.
!  A total of 575 telescope corrections were flagged in sub-array 1.
!  A total of 198 telescope corrections were flagged in sub-array 2.
!  A total of 3263 telescope corrections were flagged in sub-array 3.
!  A total of 1930 telescope corrections were flagged in sub-array 4.
!  A total of 442 telescope corrections were flagged in sub-array 5.
!  A total of 2421 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 3.
!  A total of 575 telescope corrections were flagged in sub-array 1.
!  A total of 198 telescope corrections were flagged in sub-array 2.
!  A total of 3336 telescope corrections were flagged in sub-array 3.
!  A total of 1931 telescope corrections were flagged in sub-array 4.
!  A total of 442 telescope corrections were flagged in sub-array 5.
!  A total of 2421 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 4.
!  A total of 575 telescope corrections were flagged in sub-array 1.
!  A total of 198 telescope corrections were flagged in sub-array 2.
!  A total of 3324 telescope corrections were flagged in sub-array 3.
!  A total of 1931 telescope corrections were flagged in sub-array 4.
!  A total of 442 telescope corrections were flagged in sub-array 5.
!  A total of 2421 telescope corrections were flagged in sub-array 6.
! 
! Fit before self-cal, rms=0.882585Jy  sigma=0.010054
! Fit after  self-cal, rms=0.608992Jy  sigma=0.007025
! 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.022 mas, bmaj=2.964 mas, bpa=65.25 degrees
! Estimated noise=593.934 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.31662 Jy
! Component: 100  -  total flux cleaned = 0.401705 Jy
! Total flux subtracted in 100 components = 0.401705 Jy
! Clean residual min=-0.014344 max=0.038318 Jy/beam
! Clean residual mean=0.000134 rms=0.003952 Jy/beam
! Combined flux in latest and established models = 0.401705 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 0.401705 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287672Jy  sigma=0.002660
! Fit after  self-cal, rms=0.287519Jy  sigma=0.002659
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0406425 Jy
! Component: 100  -  total flux cleaned = 0.065722 Jy
! Total flux subtracted in 100 components = 0.065722 Jy
! Clean residual min=-0.013872 max=0.035830 Jy/beam
! Clean residual mean=0.000075 rms=0.003485 Jy/beam
! Combined flux in latest and established models = 0.467427 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 17 components and 0.467427 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.275720Jy  sigma=0.002500
! Fit after  self-cal, rms=0.275643Jy  sigma=0.002499
! Inverting map 
! Added new window around map position (-4.5, 3).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0330814 Jy
! Component: 100  -  total flux cleaned = 0.0525745 Jy
! Total flux subtracted in 100 components = 0.0525745 Jy
! Clean residual min=-0.012069 max=0.017752 Jy/beam
! Clean residual mean=0.000043 rms=0.003097 Jy/beam
! Combined flux in latest and established models = 0.520002 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 32 components and 0.520002 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.268978Jy  sigma=0.002409
! Fit after  self-cal, rms=0.268187Jy  sigma=0.002400
! 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.549 mas, bmaj=4.183 mas, bpa=62.83 degrees
! Estimated noise=338.716 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.027506 Jy
! Component: 100  -  total flux cleaned = 0.042113 Jy
! Component: 150  -  total flux cleaned = 0.0507378 Jy
! Component: 200  -  total flux cleaned = 0.0560268 Jy
! Total flux subtracted in 200 components = 0.0560268 Jy
! Clean residual min=-0.012029 max=0.011442 Jy/beam
! Clean residual mean=0.000291 rms=0.003328 Jy/beam
! Combined flux in latest and established models = 0.576028 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 44 components and 0.576028 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265183Jy  sigma=0.002362
! Fit after  self-cal, rms=0.264762Jy  sigma=0.002357
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.07     FD        1.01     GG        1.00*    HN        0.76     
!   KK        1.09     KP        0.94     LA        0.97     MA        1.00*    
!   MK        1.06     NL        1.11     ON        1.00*    OV        1.97     
!   PT        1.04     SC        0.99     TC        1.00*    TS        1.00*    
!   WF        0.99     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   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 123 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.06     FD        1.01     GG        1.00*    HN        0.90     
!   KK        0.98     KP        0.95     LA        1.01     MA        1.00*    
!   MK        1.05     NL        1.06     ON        1.12     OV        0.98     
!   PT        1.01     SC        0.92     TC        1.00*    TS        1.01     
!   WF        1.10     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        0.99     GG        1.00*    HN        1.03     
!   KK        0.92     KP        0.79     LA        0.97     MA        1.00*    
!   MK        1.01     NL        1.02     ON        1.00*    OV        1.08     
!   PT        0.95     SC        1.05     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.08     FD        1.01     GG        1.00*    HN        1.00*    
!   KK        1.11     KP        0.90     LA        0.97     MA        1.00*    
!   MK        1.05     NL        1.00     ON        1.00*    OV        0.85     
!   PT        1.00     SC        1.00*    TC        1.00*    TS        1.11     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.99     FD        0.87     GG        1.00*    HN        1.03     
!   KK        1.01     KP        1.01     LA        0.95     MA        1.00*    
!   MK        1.01     NL        1.00*    ON        1.00*    OV        1.05     
!   PT        0.97     SC        1.00*    TC        1.00*    TS        1.23     
!   WF        1.00     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.03     GG        1.00*    HN        1.02     
!   KK        1.01     KP        1.09     LA        1.00     MA        1.00*    
!   MK        1.13     NL        1.02     ON        1.00*    OV        1.12     
!   PT        1.04     SC        1.01     TC        1.00*    TS        1.00*    
!   WF        0.95     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   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 123 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.00     GG        1.00*    HN        0.98     
!   KK        1.00     KP        1.02     LA        1.01     MA        1.00*    
!   MK        1.08     NL        0.98     ON        1.03     OV        0.99     
!   PT        0.99     SC        0.96     TC        1.00*    TS        1.02     
!   WF        1.07     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.97     GG        1.00*    HN        1.08     
!   KK        0.93     KP        0.87     LA        0.97     MA        1.00*    
!   MK        1.04     NL        0.99     ON        1.00*    OV        0.95     
!   PT        0.97     SC        1.02     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.03     FD        1.00     GG        1.00*    HN        1.00*    
!   KK        1.06     KP        1.03     LA        0.96     MA        1.00*    
!   MK        1.11     NL        0.96     ON        1.00*    OV        0.90     
!   PT        0.99     SC        1.00*    TC        1.00*    TS        1.08     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.95     FD        0.97     GG        1.00*    HN        1.07     
!   KK        0.97     KP        1.10     LA        1.02     MA        1.00*    
!   MK        1.04     NL        1.00*    ON        1.00*    OV        0.97     
!   PT        1.07     SC        1.00*    TC        1.00*    TS        1.04     
!   WF        1.14     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.01     GG        1.00*    HN        1.00     
!   KK        0.99     KP        1.10     LA        0.94     MA        1.00*    
!   MK        1.07     NL        1.02     ON        1.00*    OV        1.72     
!   PT        1.05     SC        1.09     TC        1.00*    TS        1.00*    
!   WF        1.03     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   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 117 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.01     GG        1.00*    HN        0.94     
!   KK        1.03     KP        1.01     LA        0.96     MA        1.00*    
!   MK        1.09     NL        0.97     ON        1.00*    OV        1.34     
!   PT        1.00     SC        1.07     TC        1.00*    TS        1.01     
!   WF        1.06     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.97     GG        1.00*    HN        1.08     
!   KK        0.94     KP        0.92     LA        0.95     MA        1.00*    
!   MK        0.98     NL        0.94     ON        1.00*    OV        0.84     
!   PT        0.96     SC        1.22     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.98     FD        1.00     GG        1.00*    HN        1.00*    
!   KK        0.97     KP        0.96     LA        0.94     MA        1.00*    
!   MK        1.02     NL        0.94     ON        1.00*    OV        0.89     
!   PT        0.97     SC        1.00*    TC        1.00*    TS        1.11     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.93     FD        1.01     GG        1.00*    HN        1.04     
!   KK        1.04     KP        1.07     LA        0.98     MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        1.06     
!   PT        0.98     SC        1.00*    TC        1.00*    TS        1.13     
!   WF        1.13     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.01     GG        1.00*    HN        0.50     
!   KK        0.96     KP        1.08     LA        0.95     MA        1.00*    
!   MK        0.95     NL        1.10     ON        1.00*    OV        2.97     
!   PT        1.10     SC        1.10     TC        1.00*    TS        1.00*    
!   WF        1.27     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   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 117 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        0.98     GG        1.00*    HN        0.80     
!   KK        1.05     KP        1.01     LA        0.97     MA        1.00*    
!   MK        1.05     NL        1.02     ON        1.00*    OV        1.85     
!   PT        1.04     SC        1.13     TC        1.00*    TS        1.03     
!   WF        1.05     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.94     FD        0.99     GG        1.00*    HN        0.95     
!   KK        0.95     KP        0.85     LA        0.97     MA        1.00*    
!   MK        0.96     NL        1.00     ON        1.00*    OV        1.01     
!   PT        1.02     SC        1.21     TC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.01     FD        0.98     GG        1.00*    HN        1.00*    
!   KK        0.86     KP        0.99     LA        0.96     MA        1.00*    
!   MK        1.00     NL        1.00     ON        1.00*    OV        0.68     
!   PT        1.02     SC        1.00*    TC        1.00*    TS        1.06     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   BR        0.94     FD        0.93     GG        1.00*    HN        1.01     
!   KK        1.02     KP        1.07     LA        0.96     MA        1.00*    
!   MK        0.97     NL        1.00*    ON        1.00*    OV        0.87     
!   PT        1.05     SC        1.00*    TC        1.00*    TS        1.14     
!   WF        0.90     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.264762Jy  sigma=0.002357
! Fit after  self-cal, rms=0.281851Jy  sigma=0.002260
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.591 mas, bmaj=4.368 mas, bpa=63.64 degrees
! Estimated noise=343.888 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.00324091 Jy
! Component: 100  -  total flux cleaned = 0.00425627 Jy
! Component: 150  -  total flux cleaned = 0.00488667 Jy
! Component: 200  -  total flux cleaned = 0.00508151 Jy
! Total flux subtracted in 200 components = 0.00508151 Jy
! Clean residual min=-0.011513 max=0.010581 Jy/beam
! Clean residual mean=0.000198 rms=0.002863 Jy/beam
! Combined flux in latest and established models = 0.58111 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 54 components and 0.58111 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281571Jy  sigma=0.002257
! Fit after  self-cal, rms=0.282094Jy  sigma=0.002255
! 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.282094Jy  sigma=0.002255
! Fit after  self-cal, rms=0.304057Jy  sigma=0.002095
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.589 mas, bmaj=4.386 mas, bpa=63.5 degrees
! Estimated noise=343.942 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00333291 Jy
! Component: 100  -  total flux cleaned = 0.00415512 Jy
! Component: 150  -  total flux cleaned = 0.00455028 Jy
! Component: 200  -  total flux cleaned = 0.00467623 Jy
! Total flux subtracted in 200 components = 0.00467623 Jy
! Clean residual min=-0.003271 max=0.004512 Jy/beam
! Clean residual mean=0.000043 rms=0.000917 Jy/beam
! Combined flux in latest and established models = 0.585786 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 62 components and 0.585786 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.303951Jy  sigma=0.002094
! Fit after  self-cal, rms=0.304631Jy  sigma=0.002092
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, 6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00439217 Jy
! Component: 100  -  total flux cleaned = 0.00500424 Jy
! Component: 150  -  total flux cleaned = 0.00523293 Jy
! Component: 200  -  total flux cleaned = 0.00523578 Jy
! Total flux subtracted in 200 components = 0.00523578 Jy
! Clean residual min=-0.003434 max=0.003860 Jy/beam
! Clean residual mean=0.000021 rms=0.000879 Jy/beam
! Combined flux in latest and established models = 0.591022 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 78 components and 0.591022 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304542Jy  sigma=0.002090
! Fit after  self-cal, rms=0.304541Jy  sigma=0.002090
! 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.304541Jy  sigma=0.002090
! Fit after  self-cal, rms=0.308184Jy  sigma=0.002087
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.592 mas, bmaj=4.39 mas, bpa=63.46 degrees
! Estimated noise=344.64 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00342746 Jy
! Component: 100  -  total flux cleaned = 0.00462645 Jy
! Component: 150  -  total flux cleaned = 0.00487758 Jy
! Component: 200  -  total flux cleaned = 0.00499134 Jy
! Total flux subtracted in 200 components = 0.00499134 Jy
! Clean residual min=-0.003162 max=0.003455 Jy/beam
! Clean residual mean=-0.000007 rms=0.000809 Jy/beam
! Combined flux in latest and established models = 0.596013 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 84 components and 0.596013 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.308131Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308171Jy  sigma=0.002086
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.000638669 Jy
! Component: 100  -  total flux cleaned = 0.000859743 Jy
! Component: 150  -  total flux cleaned = 0.000910039 Jy
! Component: 200  -  total flux cleaned = 0.000957009 Jy
! Total flux subtracted in 200 components = 0.000957009 Jy
! Clean residual min=-0.003080 max=0.003391 Jy/beam
! Clean residual mean=-0.000011 rms=0.000803 Jy/beam
! Combined flux in latest and established models = 0.59697 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 88 components and 0.59697 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.308146Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308147Jy  sigma=0.002086
! 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.308147Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308462Jy  sigma=0.002086
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.639 mas, bmaj=10.34 mas, bpa=24.58 degrees
! Estimated noise=470.063 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00198057 Jy
! Component: 100  -  total flux cleaned = 0.00229808 Jy
! Component: 150  -  total flux cleaned = 0.00252373 Jy
! Component: 200  -  total flux cleaned = 0.00271928 Jy
! Total flux subtracted in 200 components = 0.00271928 Jy
! Clean residual min=-0.003547 max=0.004418 Jy/beam
! Clean residual mean=-0.000039 rms=0.001147 Jy/beam
! Combined flux in latest and established models = 0.59969 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 99 components and 0.59969 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.308433Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308430Jy  sigma=0.002086
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 = 6.55809e-05 Jy
! Component: 100  -  total flux cleaned = 0.000275345 Jy
! Component: 150  -  total flux cleaned = 0.000428535 Jy
! Component: 200  -  total flux cleaned = 0.000542666 Jy
! Total flux subtracted in 200 components = 0.000542666 Jy
! Clean residual min=-0.003464 max=0.004254 Jy/beam
! Clean residual mean=-0.000045 rms=0.001136 Jy/beam
! Combined flux in latest and established models = 0.600232 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 104 components and 0.600232 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.308417Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308416Jy  sigma=0.002086
! 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.595 mas, bmaj=4.392 mas, bpa=63.47 degrees
! Estimated noise=345.358 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.595 x 4.392 at 63.47 degrees (North through East)
! Clean map  min=-0.0028932  max=0.42759 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
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.062 mas, bmaj=3.178 mas, bpa=66.15 degrees
! Estimated noise=625.397 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.324338 Jy
! Component: 100  -  total flux cleaned = 0.411324 Jy
! Component: 150  -  total flux cleaned = 0.458947 Jy
! Component: 200  -  total flux cleaned = 0.490574 Jy
! Total flux subtracted in 200 components = 0.490574 Jy
! Clean residual min=-0.006569 max=0.017525 Jy/beam
! Clean residual mean=0.000076 rms=0.002001 Jy/beam
! Combined flux in latest and established models = 0.490574 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.490574 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.595 mas, bmaj=4.392 mas, bpa=63.47 degrees
! Estimated noise=345.358 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.0434029 Jy
! Component: 100  -  total flux cleaned = 0.067783 Jy
! Component: 150  -  total flux cleaned = 0.0824588 Jy
! Component: 200  -  total flux cleaned = 0.0917343 Jy
! Total flux subtracted in 200 components = 0.0917343 Jy
! Clean residual min=-0.003046 max=0.005063 Jy/beam
! Clean residual mean=0.000105 rms=0.001029 Jy/beam
! Combined flux in latest and established models = 0.582308 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 64 components and 0.582308 Jy
! Inverting map 
! Added new window around map position (-4.5, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00625833 Jy
! Component: 100  -  total flux cleaned = 0.0106465 Jy
! Component: 150  -  total flux cleaned = 0.0136673 Jy
! Component: 200  -  total flux cleaned = 0.0146555 Jy
! Total flux subtracted in 200 components = 0.0146555 Jy
! Clean residual min=-0.003018 max=0.003188 Jy/beam
! Clean residual mean=0.000003 rms=0.000820 Jy/beam
! Combined flux in latest and established models = 0.596963 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 87 components and 0.596963 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.639 mas, bmaj=10.34 mas, bpa=24.58 degrees
! Estimated noise=470.063 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00274038 Jy
! Component: 100  -  total flux cleaned = 0.00306061 Jy
! Component: 150  -  total flux cleaned = 0.00333475 Jy
! Component: 200  -  total flux cleaned = 0.00337153 Jy
! Total flux subtracted in 200 components = 0.00337153 Jy
! Clean residual min=-0.003375 max=0.004193 Jy/beam
! Clean residual mean=-0.000047 rms=0.001146 Jy/beam
! Combined flux in latest and established models = 0.600335 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 = -2.48238e-06 Jy
! Component: 100  -  total flux cleaned = -3.29712e-05 Jy
! Component: 150  -  total flux cleaned = -3.38726e-05 Jy
! Component: 200  -  total flux cleaned = -5.88495e-05 Jy
! Total flux subtracted in 200 components = -5.88495e-05 Jy
! Clean residual min=-0.003401 max=0.004145 Jy/beam
! Clean residual mean=-0.000046 rms=0.001138 Jy/beam
! Combined flux in latest and established models = 0.600276 Jy
! Adding 25 model components to the UV plane model.
! The established model now contains 105 components and 0.600276 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.595 mas, bmaj=4.392 mas, bpa=63.47 degrees
! Estimated noise=345.358 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000847097 Jy
! Component: 100  -  total flux cleaned = 0.000850673 Jy
! Component: 150  -  total flux cleaned = 0.000731948 Jy
! Component: 200  -  total flux cleaned = 0.000624107 Jy
! Total flux subtracted in 200 components = 0.000624107 Jy
! Clean residual min=-0.002972 max=0.003156 Jy/beam
! Clean residual mean=-0.000024 rms=0.000788 Jy/beam
! Combined flux in latest and established models = 0.6009 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 116 components and 0.6009 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.308427Jy  sigma=0.002086
! Fit after  self-cal, rms=0.308422Jy  sigma=0.002085
wmodel J1849+6705_S_2003_06_18_pus_map.mod
! Writing 116 model components to file: J1849+6705_S_2003_06_18_pus_map.mod
wobs J1849+6705_S_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J1849+6705_S_2003_06_18_pus_uvs.fits
wwins J1849+6705_S_2003_06_18_pus_map.win
! wwins: Wrote 4 windows to J1849+6705_S_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.000196838 Jy
! Component: 100  -  total flux cleaned = 9.22526e-05 Jy
! Component: 150  -  total flux cleaned = -5.37065e-05 Jy
! Component: 200  -  total flux cleaned = -0.000146441 Jy
! Component: 250  -  total flux cleaned = -0.000327998 Jy
! Component: 300  -  total flux cleaned = -0.000594488 Jy
! Component: 350  -  total flux cleaned = -0.000725461 Jy
! Component: 400  -  total flux cleaned = -0.000938658 Jy
! Component: 450  -  total flux cleaned = -0.00106422 Jy
! Component: 500  -  total flux cleaned = -0.00114658 Jy
! Component: 550  -  total flux cleaned = -0.00138956 Jy
! Component: 600  -  total flux cleaned = -0.00150902 Jy
! Component: 650  -  total flux cleaned = -0.00150915 Jy
! Component: 700  -  total flux cleaned = -0.00154887 Jy
! Component: 750  -  total flux cleaned = -0.00170214 Jy
! Component: 800  -  total flux cleaned = -0.00166419 Jy
! Component: 850  -  total flux cleaned = -0.00170199 Jy
! Component: 900  -  total flux cleaned = -0.00185004 Jy
! Component: 950  -  total flux cleaned = -0.00188647 Jy
! Component: 1000  -  total flux cleaned = -0.00206659 Jy
! Component: 1050  -  total flux cleaned = -0.00213727 Jy
! Component: 1100  -  total flux cleaned = -0.00213712 Jy
! Component: 1150  -  total flux cleaned = -0.00227692 Jy
! Component: 1200  -  total flux cleaned = -0.00234621 Jy
! Component: 1250  -  total flux cleaned = -0.0024489 Jy
! Component: 1300  -  total flux cleaned = -0.00248295 Jy
! Component: 1350  -  total flux cleaned = -0.00258374 Jy
! Component: 1400  -  total flux cleaned = -0.00268334 Jy
! Component: 1450  -  total flux cleaned = -0.00278174 Jy
! Component: 1500  -  total flux cleaned = -0.00281451 Jy
! Component: 1550  -  total flux cleaned = -0.00294368 Jy
! Component: 1600  -  total flux cleaned = -0.00294381 Jy
! Component: 1650  -  total flux cleaned = -0.00300754 Jy
! Component: 1700  -  total flux cleaned = -0.00322789 Jy
! Component: 1750  -  total flux cleaned = -0.00322769 Jy
! Component: 1800  -  total flux cleaned = -0.00328958 Jy
! Component: 1850  -  total flux cleaned = -0.00338169 Jy
! Component: 1900  -  total flux cleaned = -0.00341199 Jy
! Component: 1950  -  total flux cleaned = -0.00341242 Jy
! Component: 2000  -  total flux cleaned = -0.00353238 Jy
! Total flux subtracted in 2048 components = -0.00362157 Jy
! Clean residual min=-0.001896 max=0.001482 Jy/beam
! Clean residual mean=-0.000009 rms=0.000579 Jy/beam
! Combined flux in latest and established models = 0.597279 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 263 components and 0.597279 Jy
wmap "J1849+6705_S_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.595 x 4.392 at 63.47 degrees (North through East)
! Clean map  min=-0.002778  max=0.42744 Jy/beam
! Writing clean map to FITS file: J1849+6705_S_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.427443 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000579938 
device "J1849+6705_S_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J1849+6705_S_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.407028 0.407028 0.814056 1.62811 3.25622 6.51244 13.0249 26.0498 52.0996
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.427 
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.595 x 4.392 at 63.47 degrees (North through East)
! Clean map  min=-0.002778  max=0.42744 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1849+6705_S_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J1849+6705_S_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1849+6705_S_2003_06_18_pus_uvs.log closed on Wed Jan 24 18:59:10 2007