! Started logfile: J1640+3946_X_2003_06_18_pus_uvs.log on Wed Jan 17 17:53:14 2007
obs J1640+3946_X_2003_06_18_pus_uva.fits
! Reading UV FITS file: J1640+3946_X_2003_06_18_pus_uva.fits
! AN table 1: 99 integrations on 153 of 153 possible baselines.
! AN table 2: Unused.
! AN table 3: Unused.
! AN table 4: Unused.
! AN table 5: Unused.
! AN table 6: Unused.
! AN table 7: Unused.
! AN table 8: Unused.
! AN table 9: Unused.
! Apparent sampling: 0.271209 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1640+3946
! 
! 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 2231 lines of history.
! 
! Reading 16432 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
float field_size
field_size = 256
float field_cell
field_cell = 0.2
float taper_size
taper_size = 70.
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 256x256 pixels with 0.200x0.200 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 1312 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 1193 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 1193 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 1193 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.912846Jy  sigma=0.009180
! Fit after  self-cal, rms=0.534879Jy  sigma=0.004106
! 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.6174 mas, bmaj=1.045 mas, bpa=15.24 degrees
! Estimated noise=1865.14 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.455944 Jy
! Component: 100  -  total flux cleaned = 0.589022 Jy
! Total flux subtracted in 100 components = 0.589022 Jy
! Clean residual min=-0.024460 max=0.051593 Jy/beam
! Clean residual mean=0.002283 rms=0.009728 Jy/beam
! Combined flux in latest and established models = 0.589022 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.589022 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325806Jy  sigma=0.002077
! Fit after  self-cal, rms=0.325296Jy  sigma=0.002076
! 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.7537 mas, bmaj=1.194 mas, bpa=13.92 degrees
! Estimated noise=857.631 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.0679819 Jy
! Component: 100  -  total flux cleaned = 0.0976146 Jy
! Component: 150  -  total flux cleaned = 0.112865 Jy
! Component: 200  -  total flux cleaned = 0.120902 Jy
! Total flux subtracted in 200 components = 0.120902 Jy
! Clean residual min=-0.008915 max=0.009758 Jy/beam
! Clean residual mean=0.000346 rms=0.002758 Jy/beam
! Combined flux in latest and established models = 0.709924 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 20 components and 0.709924 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.315005Jy  sigma=0.001819
! Fit after  self-cal, rms=0.314637Jy  sigma=0.001818
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.98     GG        1.00*    HN        0.96     
!   KK        1.00*    KP        1.04     LA        0.97     MA        1.00*    
!   MK        1.00*    NL        1.03     ON        1.02     OV        1.00*    
!   PT        1.00*    SC        1.01     TC        1.00*    TS        1.00*    
!   WF        1.02     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        0.97     GG        1.00*    HN        0.98     
!   KK        1.00*    KP        0.98     LA        0.98     MA        1.03     
!   MK        1.00*    NL        1.00     ON        1.00     OV        1.00*    
!   PT        1.00*    SC        0.95     TC        1.00*    TS        1.00*    
!   WF        1.10     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        0.99     GG        1.00*    HN        0.96     
!   KK        1.00*    KP        1.03     LA        0.99     MA        0.98     
!   MK        1.00*    NL        0.98     ON        1.00     OV        1.00*    
!   PT        1.00*    SC        0.96     TC        1.00*    TS        1.00*    
!   WF        1.10     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        0.94     GG        1.00*    HN        1.00     
!   KK        1.00*    KP        0.99     LA        0.96     MA        1.01     
!   MK        1.00*    NL        0.99     ON        0.99     OV        1.00*    
!   PT        1.00*    SC        1.05     TC        1.00*    TS        1.00*    
!   WF        1.10     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.314637Jy  sigma=0.001818
! Fit after  self-cal, rms=0.291169Jy  sigma=0.001797
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7586 mas, bmaj=1.192 mas, bpa=14.14 degrees
! Estimated noise=852.086 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.00210527 Jy
! Component: 100  -  total flux cleaned = 0.00233968 Jy
! Component: 150  -  total flux cleaned = 0.00233892 Jy
! Component: 200  -  total flux cleaned = 0.00239628 Jy
! Total flux subtracted in 200 components = 0.00239628 Jy
! Clean residual min=-0.006121 max=0.007377 Jy/beam
! Clean residual mean=0.000373 rms=0.001949 Jy/beam
! Combined flux in latest and established models = 0.71232 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 24 components and 0.71232 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.291133Jy  sigma=0.001796
! Fit after  self-cal, rms=0.291291Jy  sigma=0.001796
! 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.291291Jy  sigma=0.001796
! Fit after  self-cal, rms=0.290463Jy  sigma=0.001796
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7576 mas, bmaj=1.191 mas, bpa=14.11 degrees
! Estimated noise=851.95 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00176653 Jy
! Component: 100  -  total flux cleaned = 0.00187939 Jy
! Component: 150  -  total flux cleaned = 0.0019266 Jy
! Component: 200  -  total flux cleaned = 0.00200997 Jy
! Total flux subtracted in 200 components = 0.00200997 Jy
! Clean residual min=-0.006040 max=0.007111 Jy/beam
! Clean residual mean=0.000355 rms=0.001860 Jy/beam
! Combined flux in latest and established models = 0.71433 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 25 components and 0.71433 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290448Jy  sigma=0.001795
! Fit after  self-cal, rms=0.290419Jy  sigma=0.001795
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 5.01034e-05 Jy
! Component: 100  -  total flux cleaned = 8.84974e-05 Jy
! Component: 150  -  total flux cleaned = 0.000120749 Jy
! Component: 200  -  total flux cleaned = 0.000149032 Jy
! Total flux subtracted in 200 components = 0.000149032 Jy
! Clean residual min=-0.005991 max=0.007096 Jy/beam
! Clean residual mean=0.000350 rms=0.001830 Jy/beam
! Combined flux in latest and established models = 0.714479 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 25 components and 0.714479 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290413Jy  sigma=0.001795
! Fit after  self-cal, rms=0.290404Jy  sigma=0.001795
! 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.290404Jy  sigma=0.001795
! Fit after  self-cal, rms=0.290308Jy  sigma=0.001795
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7568 mas, bmaj=1.19 mas, bpa=14.09 degrees
! Estimated noise=852.404 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00168542 Jy
! Component: 100  -  total flux cleaned = 0.00214388 Jy
! Component: 150  -  total flux cleaned = 0.00227896 Jy
! Component: 200  -  total flux cleaned = 0.00237141 Jy
! Total flux subtracted in 200 components = 0.00237141 Jy
! Clean residual min=-0.005981 max=0.007195 Jy/beam
! Clean residual mean=0.000327 rms=0.001815 Jy/beam
! Combined flux in latest and established models = 0.716851 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 26 components and 0.716851 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290302Jy  sigma=0.001795
! Fit after  self-cal, rms=0.290285Jy  sigma=0.001795
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 = 3.47161e-05 Jy
! Component: 100  -  total flux cleaned = 5.49905e-05 Jy
! Component: 150  -  total flux cleaned = 7.3656e-05 Jy
! Component: 200  -  total flux cleaned = 9.1149e-05 Jy
! Total flux subtracted in 200 components = 9.1149e-05 Jy
! Clean residual min=-0.005952 max=0.007175 Jy/beam
! Clean residual mean=0.000324 rms=0.001808 Jy/beam
! Combined flux in latest and established models = 0.716942 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 26 components and 0.716942 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290282Jy  sigma=0.001795
! Fit after  self-cal, rms=0.290278Jy  sigma=0.001795
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
win_mult = win_mult * 1.2
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290278Jy  sigma=0.001795
! Fit after  self-cal, rms=0.289762Jy  sigma=0.001795
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.135 mas, bmaj=3.169 mas, bpa=84.82 degrees
! Estimated noise=1019.98 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00271618 Jy
! Component: 100  -  total flux cleaned = 0.00286283 Jy
! Component: 150  -  total flux cleaned = 0.00290908 Jy
! Component: 200  -  total flux cleaned = 0.0029915 Jy
! Total flux subtracted in 200 components = 0.0029915 Jy
! Clean residual min=-0.005081 max=0.005920 Jy/beam
! Clean residual mean=0.000727 rms=0.001864 Jy/beam
! Combined flux in latest and established models = 0.719933 Jy
selfcal
! Performing phase self-cal
! Adding 3 model components to the UV plane model.
! The established model now contains 27 components and 0.719933 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289793Jy  sigma=0.001795
! Fit after  self-cal, rms=0.289778Jy  sigma=0.001795
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.00041446 Jy
! Component: 100  -  total flux cleaned = 0.000415211 Jy
! Component: 150  -  total flux cleaned = 0.000376044 Jy
! Component: 200  -  total flux cleaned = 0.000374658 Jy
! Total flux subtracted in 200 components = 0.000374658 Jy
! Clean residual min=-0.005000 max=0.005941 Jy/beam
! Clean residual mean=0.000699 rms=0.001827 Jy/beam
! Combined flux in latest and established models = 0.720308 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 29 components and 0.720308 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289808Jy  sigma=0.001795
! Fit after  self-cal, rms=0.289813Jy  sigma=0.001795
! 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.7559 mas, bmaj=1.188 mas, bpa=14.06 degrees
! Estimated noise=852.753 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7559 x 1.188 at 14.06 degrees (North through East)
! Clean map  min=-0.0048322  max=0.60689 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.289813Jy  sigma=0.001795
! Fit after  self-cal, rms=0.325445Jy  sigma=0.001658
! Inverting map and beam 
! Estimated beam: bmin=0.7537 mas, bmaj=1.188 mas, bpa=14.07 degrees
! Estimated noise=851.417 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000694534 Jy
! Component: 100  -  total flux cleaned = 0.000831466 Jy
! Component: 150  -  total flux cleaned = 0.000867905 Jy
! Component: 200  -  total flux cleaned = 0.000867183 Jy
! Total flux subtracted in 200 components = 0.000867183 Jy
! Clean residual min=-0.005155 max=0.006468 Jy/beam
! Clean residual mean=0.000318 rms=0.001629 Jy/beam
! Combined flux in latest and established models = 0.721175 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 29 components and 0.721175 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325417Jy  sigma=0.001658
! Fit after  self-cal, rms=0.325416Jy  sigma=0.001658
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -6.72606e-07 Jy
! Component: 100  -  total flux cleaned = -4.31245e-07 Jy
! Component: 150  -  total flux cleaned = 2.83275e-05 Jy
! Component: 200  -  total flux cleaned = 2.81584e-05 Jy
! Total flux subtracted in 200 components = 2.81584e-05 Jy
! Clean residual min=-0.005137 max=0.006536 Jy/beam
! Clean residual mean=0.000317 rms=0.001636 Jy/beam
! Combined flux in latest and established models = 0.721203 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 30 components and 0.721203 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325403Jy  sigma=0.001658
! Fit after  self-cal, rms=0.325400Jy  sigma=0.001658
! 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.325400Jy  sigma=0.001658
! Fit after  self-cal, rms=0.325421Jy  sigma=0.001658
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.6162 mas, bmaj=1.041 mas, bpa=15.18 degrees
! Estimated noise=1807.12 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.454323 Jy
! Component: 100  -  total flux cleaned = 0.589278 Jy
! Component: 150  -  total flux cleaned = 0.642553 Jy
! Component: 200  -  total flux cleaned = 0.670407 Jy
! Total flux subtracted in 200 components = 0.670407 Jy
! Clean residual min=-0.012705 max=0.016066 Jy/beam
! Clean residual mean=0.001068 rms=0.004138 Jy/beam
! Combined flux in latest and established models = 0.670407 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 19 model components to the UV plane model.
! The established model now contains 19 components and 0.670407 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.7537 mas, bmaj=1.186 mas, bpa=14.06 degrees
! Estimated noise=851.571 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.0259538 Jy
! Component: 100  -  total flux cleaned = 0.0393341 Jy
! Component: 150  -  total flux cleaned = 0.0463353 Jy
! Component: 200  -  total flux cleaned = 0.0500001 Jy
! Total flux subtracted in 200 components = 0.0500001 Jy
! Clean residual min=-0.005196 max=0.006939 Jy/beam
! Clean residual mean=0.000377 rms=0.001716 Jy/beam
! Combined flux in latest and established models = 0.720407 Jy
! Adding 10 model components to the UV plane model.
! The established model now contains 22 components and 0.720407 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.132 mas, bmaj=3.17 mas, bpa=84.8 degrees
! Estimated noise=1022.72 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00291644 Jy
! Component: 100  -  total flux cleaned = 0.00285136 Jy
! Component: 150  -  total flux cleaned = 0.00284348 Jy
! Component: 200  -  total flux cleaned = 0.00284443 Jy
! Total flux subtracted in 200 components = 0.00284443 Jy
! Clean residual min=-0.004301 max=0.005250 Jy/beam
! Clean residual mean=0.000725 rms=0.001614 Jy/beam
! Combined flux in latest and established models = 0.723251 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 = -5.01328e-05 Jy
! Component: 100  -  total flux cleaned = -5.75485e-06 Jy
! Component: 150  -  total flux cleaned = -7.8146e-06 Jy
! Component: 200  -  total flux cleaned = 2.73946e-05 Jy
! Total flux subtracted in 200 components = 2.73946e-05 Jy
! Clean residual min=-0.004273 max=0.005179 Jy/beam
! Clean residual mean=0.000723 rms=0.001564 Jy/beam
! Combined flux in latest and established models = 0.723279 Jy
! Adding 5 model components to the UV plane model.
! The established model now contains 25 components and 0.723279 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.7537 mas, bmaj=1.186 mas, bpa=14.06 degrees
! Estimated noise=851.571 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000707192 Jy
! Component: 100  -  total flux cleaned = -0.000548017 Jy
! Component: 150  -  total flux cleaned = -0.000487478 Jy
! Component: 200  -  total flux cleaned = -0.000489848 Jy
! Total flux subtracted in 200 components = -0.000489848 Jy
! Clean residual min=-0.004875 max=0.006040 Jy/beam
! Clean residual mean=0.000307 rms=0.001601 Jy/beam
! Combined flux in latest and established models = 0.722789 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 27 components and 0.722789 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325422Jy  sigma=0.001658
! Fit after  self-cal, rms=0.325428Jy  sigma=0.001658
wmodel J1640+3946_X_2003_06_18_pus_map.mod
! Writing 27 model components to file: J1640+3946_X_2003_06_18_pus_map.mod
wobs J1640+3946_X_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J1640+3946_X_2003_06_18_pus_uvs.fits
wwins J1640+3946_X_2003_06_18_pus_map.win
! wwins: Wrote 1 windows to J1640+3946_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=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.00213481 Jy
! Component: 100  -  total flux cleaned = 0.00315134 Jy
! Component: 150  -  total flux cleaned = 0.00384367 Jy
! Component: 200  -  total flux cleaned = 0.00465769 Jy
! Component: 250  -  total flux cleaned = 0.00535248 Jy
! Component: 300  -  total flux cleaned = 0.00601899 Jy
! Component: 350  -  total flux cleaned = 0.00665809 Jy
! Component: 400  -  total flux cleaned = 0.00706853 Jy
! Component: 450  -  total flux cleaned = 0.00739866 Jy
! Component: 500  -  total flux cleaned = 0.0076532 Jy
! Component: 550  -  total flux cleaned = 0.00783777 Jy
! Component: 600  -  total flux cleaned = 0.00807494 Jy
! Component: 650  -  total flux cleaned = 0.00824626 Jy
! Component: 700  -  total flux cleaned = 0.00824597 Jy
! Component: 750  -  total flux cleaned = 0.00835462 Jy
! Component: 800  -  total flux cleaned = 0.00835408 Jy
! Component: 850  -  total flux cleaned = 0.00840523 Jy
! Component: 900  -  total flux cleaned = 0.00835464 Jy
! Component: 950  -  total flux cleaned = 0.00830628 Jy
! Component: 1000  -  total flux cleaned = 0.00830674 Jy
! Total flux subtracted in 1024 components = 0.00830706 Jy
! Clean residual min=-0.002714 max=0.002461 Jy/beam
! Clean residual mean=0.000127 rms=0.000880 Jy/beam
! Combined flux in latest and established models = 0.731096 Jy
keep
! Adding 50 model components to the UV plane model.
! The established model now contains 77 components and 0.731096 Jy
wmap "J1640+3946_X_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7537 x 1.186 at 14.06 degrees (North through East)
! Clean map  min=-0.0037973  max=0.60464 Jy/beam
! Writing clean map to FITS file: J1640+3946_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.604637 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000880239 
device "J1640+3946_X_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J1640+3946_X_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.436744 0.436744 0.873488 1.74698 3.49395 6.9879 13.9758 27.9516 55.9032
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0026 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.604 
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.7537 x 1.186 at 14.06 degrees (North through East)
! Clean map  min=-0.0037973  max=0.60464 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1640+3946_X_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J1640+3946_X_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1640+3946_X_2003_06_18_pus_uvs.log closed on Wed Jan 17 17:53:42 2007