! Started logfile: J0806+8126_S_2006_02_16_yyk_uvs.log on Wed Jul  5 11:43:48 2006
obs J0806+8126_S_2006_02_16_yyk_uva.fits
! Reading UV FITS file: J0806+8126_S_2006_02_16_yyk_uva.fits
! AN table 1: 859 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.325288 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0806+8126
! 
! 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 2421 lines of history.
! 
! Reading 50296 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
![@muppet J0806+8126_S_2006_02_16_yyk]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.04
float dynam
dynam = 6.0
float amp_soltime1
amp_soltime1 = 10
float amp_soltime2
amp_soltime2 = 1
float phase_soltime1
phase_soltime1=10
float phase_soltime2
phase_soltime2=0.5
float phase_soltime
phase_soltime=phase_soltime1
float ampcor_selflim
ampcor_selflim=1.20
float thresh
thresh = 0.10
float win_mult
win_mult = 1.8
float time_av
time_av = 30
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.
uvav time_av, true
! Averaging into 30 second bins.
! 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
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 0.102579 Jy 
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=7.936 mas, bmaj=23.82 mas, bpa=53.43 degrees
! Estimated noise=2.33968 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0558642 Jy
! Component: 100  -  total flux cleaned = 0.0769477 Jy
! Total flux subtracted in 100 components = 0.0769477 Jy
! Clean residual min=-0.008583 max=0.008802 Jy/beam
! Clean residual mean=0.000102 rms=0.003777 Jy/beam
! Combined flux in latest and established models = 0.0769477 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 24 model components to the UV plane model.
! The established model now contains 24 components and 0.0769477 Jy
! 
! Correcting IF 1.
!  A total of 70 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 70 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 70 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 70 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.072437Jy  sigma=1.167790
! Fit after  self-cal, rms=0.072409Jy  sigma=1.162116
! Inverting map and beam 
! Estimated beam: bmin=7.936 mas, bmaj=23.82 mas, bpa=53.43 degrees
! Estimated noise=2.33968 mJy/beam.
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! 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=8.789 mas, bmaj=23.26 mas, bpa=54.36 degrees
! Estimated noise=1.09348 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00930291 Jy
! Component: 100  -  total flux cleaned = 0.0126356 Jy
! Component: 150  -  total flux cleaned = 0.0123145 Jy
! Component: 200  -  total flux cleaned = 0.0134838 Jy
! Total flux subtracted in 200 components = 0.0134838 Jy
! Clean residual min=-0.002676 max=0.002654 Jy/beam
! Clean residual mean=0.000047 rms=0.001294 Jy/beam
! Combined flux in latest and established models = 0.0904315 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 115 model components to the UV plane model.
! The established model now contains 134 components and 0.0904315 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.068517Jy  sigma=1.074862
! Fit after  self-cal, rms=0.068490Jy  sigma=1.073755
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 8.789 x 23.26 at 54.36 degrees (North through East)
! Clean map  min=-0.0071701  max=0.061638 Jy/beam
if(peak(flux) < thresh*2)
  selflims ampcor_selflim
  end if
! Selfcal amplitude corrections will be limited to 0.833333 -> 1.2.
! Selfcal phase corrections will not be limited.
gscale
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Amplitude normalization factor in sub-array 1: 1.02581
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.87     HN        1.00*    KP        0.97     
!   LA        0.98     MK        1.00*    NL        1.00*    OV        0.98     
!   PT        1.00     SC        1.00*    
! 
! 
! Correcting IF 2.
!  Amplitude normalization factor in sub-array 1: 1
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    
! 
! 
! Correcting IF 3.
!  Amplitude normalization factor in sub-array 1: 1
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    
! 
! 
! Correcting IF 4.
!  Amplitude normalization factor in sub-array 1: 1.04894
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.86     HN        1.00*    KP        0.91     
!   LA        0.87     MK        1.00*    NL        1.00*    OV        0.98     
!   PT        0.91     SC        1.00*    
! 
! 
! Fit before self-cal, rms=0.068490Jy  sigma=1.073755
! Fit after  self-cal, rms=0.066060Jy  sigma=1.065982
selfcal false, false, phase_soltime
! Performing phase self-cal over 10 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.066060Jy  sigma=1.065982
! Fit after  self-cal, rms=0.066049Jy  sigma=1.065781
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=8.78 mas, bmaj=23.43 mas, bpa=54.1 degrees
! Estimated noise=1.07059 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 2.35521e-05 Jy
! Component: 100  -  total flux cleaned = 0.0014522 Jy
! Component: 150  -  total flux cleaned = 0.00324768 Jy
! Component: 200  -  total flux cleaned = 0.00503983 Jy
! Total flux subtracted in 200 components = 0.00503983 Jy
! Clean residual min=-0.001167 max=0.001186 Jy/beam
! Clean residual mean=0.000010 rms=0.000599 Jy/beam
! Combined flux in latest and established models = 0.0954713 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 86 model components to the UV plane model.
! The established model now contains 216 components and 0.0954713 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.065731Jy  sigma=1.057226
! Fit after  self-cal, rms=0.065720Jy  sigma=1.056939
! Inverting map 
print "************** FINISHED AMPLITUDE GSCALE SELF-CAL **************"
! ************** FINISHED AMPLITUDE GSCALE SELF-CAL ************** 
! 
phase_soltime=phase_soltime2
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.065720Jy  sigma=1.056939
! Fit after  self-cal, rms=0.060898Jy  sigma=0.957561
dynam = dynam - 0.5
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 false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00198797 Jy
! Component: 100  -  total flux cleaned = 0.00157774 Jy
! Component: 150  -  total flux cleaned = 0.00204039 Jy
! Component: 200  -  total flux cleaned = 0.00318524 Jy
! Total flux subtracted in 200 components = 0.00318523 Jy
! Clean residual min=-0.000961 max=0.000973 Jy/beam
! Clean residual mean=0.000029 rms=0.000449 Jy/beam
! Combined flux in latest and established models = 0.0986565 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 86 model components to the UV plane model.
! The established model now contains 298 components and 0.0986566 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.060572Jy  sigma=0.949018
! Fit after  self-cal, rms=0.059295Jy  sigma=0.940762
! Inverting map 
print "*** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime ***"
! *** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime *** 
! 
dynam = dynam - 0.25
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 8.78 x 23.43 at 54.1 degrees (North through East)
! Clean map  min=-0.0058414  max=0.06342 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true, amp_soltime1
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true, amp_soltime2
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  print "************** FINISHED AMPLITUDE SELF-CAL **************"
  end if
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
win_mult = win_mult * 1.4
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=9.758 mas, bmaj=23.32 mas, bpa=52.81 degrees
! Estimated noise=1.08945 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.000454192 Jy
! Component: 100  -  total flux cleaned = 0.000855193 Jy
! Component: 150  -  total flux cleaned = 0.001164 Jy
! Component: 200  -  total flux cleaned = 0.00171687 Jy
! Total flux subtracted in 200 components = 0.00171687 Jy
! Clean residual min=-0.000658 max=0.000669 Jy/beam
! Clean residual mean=0.000031 rms=0.000320 Jy/beam
! Combined flux in latest and established models = 0.100373 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 89 model components to the UV plane model.
! The established model now contains 384 components and 0.100373 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.059184Jy  sigma=0.938128
! Fit after  self-cal, rms=0.058546Jy  sigma=0.936396
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
win_mult = win_mult / 1.4
print "************** FINISHED TAPERING SELF-CAL CLEAN **************"
! ************** FINISHED TAPERING SELF-CAL CLEAN ************** 
! 
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true,true,true
! clrmod: Cleared the established, tentative and continuum 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=7.912 mas, bmaj=23.88 mas, bpa=53.23 degrees
! Estimated noise=2.27599 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0579217 Jy
! Component: 100  -  total flux cleaned = 0.0806291 Jy
! Component: 150  -  total flux cleaned = 0.083375 Jy
! Component: 200  -  total flux cleaned = 0.0841715 Jy
! Total flux subtracted in 200 components = 0.0841715 Jy
! Clean residual min=-0.004207 max=0.004239 Jy/beam
! Clean residual mean=0.000035 rms=0.002059 Jy/beam
! Combined flux in latest and established models = 0.0841715 Jy
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 74 model components to the UV plane model.
! The established model now contains 74 components and 0.0841715 Jy
! Inverting map and beam 
! Estimated beam: bmin=8.78 mas, bmaj=23.43 mas, bpa=54.1 degrees
! Estimated noise=1.07059 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.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00310806 Jy
! Component: 100  -  total flux cleaned = 0.00491536 Jy
! Component: 150  -  total flux cleaned = 0.00512213 Jy
! Component: 200  -  total flux cleaned = 0.00543284 Jy
! Total flux subtracted in 200 components = 0.00543284 Jy
! Clean residual min=-0.001867 max=0.001868 Jy/beam
! Clean residual mean=0.000020 rms=0.000868 Jy/beam
! Combined flux in latest and established models = 0.0896044 Jy
! Adding 93 model components to the UV plane model.
! The established model now contains 165 components and 0.0896044 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=9.758 mas, bmaj=23.32 mas, bpa=52.81 degrees
! Estimated noise=1.08945 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.04  cutoff=0
! Component: 050  -  total flux cleaned = -0.000354955 Jy
! Component: 100  -  total flux cleaned = 0.000211184 Jy
! Component: 150  -  total flux cleaned = 0.000595376 Jy
! Component: 200  -  total flux cleaned = 0.00118008 Jy
! Total flux subtracted in 200 components = 0.00118008 Jy
! Clean residual min=-0.000986 max=0.000969 Jy/beam
! Clean residual mean=0.000022 rms=0.000491 Jy/beam
! Combined flux in latest and established models = 0.0907845 Jy
! Adding 89 model components to the UV plane model.
! The established model now contains 251 components and 0.0907845 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=8.78 mas, bmaj=23.43 mas, bpa=54.1 degrees
! Estimated noise=1.07059 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.000495107 Jy
! Component: 100  -  total flux cleaned = 0.000752868 Jy
! Component: 150  -  total flux cleaned = 0.000871737 Jy
! Component: 200  -  total flux cleaned = 0.000931125 Jy
! Total flux subtracted in 200 components = 0.000931125 Jy
! Clean residual min=-0.000731 max=0.000730 Jy/beam
! Clean residual mean=0.000020 rms=0.000329 Jy/beam
! Combined flux in latest and established models = 0.0917156 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 60 model components to the UV plane model.
! The established model now contains 308 components and 0.0917156 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.058567Jy  sigma=0.936499
! Fit after  self-cal, rms=0.058240Jy  sigma=0.935742
wmodel J0806+8126_S_2006_02_16_yyk\_map.mod
! Writing 308 model components to file: J0806+8126_S_2006_02_16_yyk_map.mod
wobs J0806+8126_S_2006_02_16_yyk\_uvs.fits
! Writing UV FITS file: J0806+8126_S_2006_02_16_yyk_uvs.fits
wwins J0806+8126_S_2006_02_16_yyk\_map.win
! wwins: No CLEAN windows to write.
! Error occured in command: wwins
![Exited script file: muppet]
! 
wmap "J0806+8126_S_2006_02_16_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 8.78 x 23.43 at 54.1 degrees (North through East)
! Clean map  min=-0.0071635  max=0.063061 Jy/beam
! Writing clean map to FITS file: J0806+8126_S_2006_02_16_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.0630612 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000329243 
device "J0806+8126_S_2006_02_16_yyk\_map.eps/VPS"
! Attempting to open device: 'J0806+8126_S_2006_02_16_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -1.5663 1.5663 3.1326 6.26521 12.5304 25.0608 50.1216
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0009 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.063 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 8.78 x 23.43 at 54.1 degrees (North through East)
! Clean map  min=-0.0071635  max=0.063061 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0806+8126_S_2006_02_16_yyk\_map.gif/gif"
! Attempting to open device: 'J0806+8126_S_2006_02_16_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J0806+8126_S_2006_02_16_yyk_uvs.log closed on Wed Jul  5 11:44:05 2006