! Started logfile: J1656+1826_X_1996_01_02_yyk_uvs.log on Mon Jan  8 07:14:33 2007
obs J1656+1826_X_1996_01_02_yyk_uva.fits
! Reading UV FITS file: J1656+1826_X_1996_01_02_yyk_uva.fits
! AN table 1: 121 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.588613 visibilities/baseline/integration-bin.
! Found source: J1656+1826
! 
! 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.15049e+09        4e+06          1        4e+06
!  02        2  8.23236e+09        4e+06          1        4e+06
!  03        3  8.41236e+09        4e+06          1        4e+06
!  04        4  8.55236e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 628 lines of history.
! 
! Reading 12820 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 J1656+1826_X_1996_01_02_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.200x0.200 milli-arcsec cellsize.
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 0.863598 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=0.6877 mas, bmaj=1.748 mas, bpa=3.17 degrees
! Estimated noise=1355.16 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.0651464 Jy
! Component: 100  -  total flux cleaned = 0.0841786 Jy
! Total flux subtracted in 100 components = 0.0841786 Jy
! Clean residual min=-0.031539 max=0.031624 Jy/beam
! Clean residual mean=0.000001 rms=0.013256 Jy/beam
! Combined flux in latest and established models = 0.0841786 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 38 model components to the UV plane model.
! The established model now contains 38 components and 0.0841786 Jy
! 
! Correcting IF 1.
!  A total of 284 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 423 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 284 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 333 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.857421Jy  sigma=0.006118
! Fit after  self-cal, rms=0.857625Jy  sigma=0.006121
! Inverting map and beam 
! Estimated beam: bmin=0.6877 mas, bmaj=1.748 mas, bpa=3.171 degrees
! Estimated noise=1355.76 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=0.8371 mas, bmaj=2.074 mas, bpa=1.294 degrees
! Estimated noise=978.974 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.0613192 Jy
! Component: 100  -  total flux cleaned = 0.0759576 Jy
! Component: 150  -  total flux cleaned = 0.0742322 Jy
! Component: 200  -  total flux cleaned = 0.0711141 Jy
! Total flux subtracted in 200 components = 0.0711141 Jy
! Clean residual min=-0.018359 max=0.018350 Jy/beam
! Clean residual mean=0.000010 rms=0.008515 Jy/beam
! Combined flux in latest and established models = 0.155293 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 88 model components to the UV plane model.
! The established model now contains 118 components and 0.155293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.853101Jy  sigma=0.006088
! Fit after  self-cal, rms=0.853037Jy  sigma=0.006088
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8371 x 2.074 at 1.294 degrees (North through East)
! Clean map  min=-0.021071  max=0.068544 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.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  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 2.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  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.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.02055
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.00*    HN        1.14     KP        0.87     
!   LA        0.98     MK        1.02     NL        0.94     OV        0.89     
!   PT        1.10     SC        0.91     
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  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*    
! 
! 
! Fit before self-cal, rms=0.853037Jy  sigma=0.006088
! Fit after  self-cal, rms=0.854003Jy  sigma=0.006095
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.854003Jy  sigma=0.006095
! Fit after  self-cal, rms=0.854007Jy  sigma=0.006095
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.8423 mas, bmaj=2.068 mas, bpa=1.995 degrees
! Estimated noise=962.235 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.00671667 Jy
! Component: 100  -  total flux cleaned = -0.0157423 Jy
! Component: 150  -  total flux cleaned = -0.0181443 Jy
! Component: 200  -  total flux cleaned = -0.022964 Jy
! Total flux subtracted in 200 components = -0.022964 Jy
! Clean residual min=-0.014674 max=0.014667 Jy/beam
! Clean residual mean=0.000021 rms=0.007460 Jy/beam
! Combined flux in latest and established models = 0.132329 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 103 model components to the UV plane model.
! The established model now contains 179 components and 0.132329 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.851948Jy  sigma=0.006080
! Fit after  self-cal, rms=0.851938Jy  sigma=0.006080
! 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.851938Jy  sigma=0.006080
! Fit after  self-cal, rms=0.850113Jy  sigma=0.006067
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.00788345 Jy
! Component: 100  -  total flux cleaned = -0.0107845 Jy
! Component: 150  -  total flux cleaned = -0.0121521 Jy
! Component: 200  -  total flux cleaned = -0.0148676 Jy
! Total flux subtracted in 200 components = -0.0148676 Jy
! Clean residual min=-0.016725 max=0.016680 Jy/beam
! Clean residual mean=0.000021 rms=0.008906 Jy/beam
! Combined flux in latest and established models = 0.117461 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 115 model components to the UV plane model.
! The established model now contains 247 components and 0.117461 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.847551Jy  sigma=0.006048
! Fit after  self-cal, rms=0.847134Jy  sigma=0.006045
! 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: 0.8423 x 2.068 at 1.995 degrees (North through East)
! Clean map  min=-0.024876  max=0.061381 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 = 70 mega-wavelengths.
win_mult = win_mult * 1.4
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=1.957 mas, bmaj=3.289 mas, bpa=-8.325 degrees
! Estimated noise=1278.67 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.00639698 Jy
! Component: 100  -  total flux cleaned = -0.00892935 Jy
! Component: 150  -  total flux cleaned = -0.00941779 Jy
! Component: 200  -  total flux cleaned = -0.00964517 Jy
! Total flux subtracted in 200 components = -0.00964517 Jy
! Clean residual min=-0.002850 max=0.002846 Jy/beam
! Clean residual mean=0.000026 rms=0.001123 Jy/beam
! Combined flux in latest and established models = 0.107816 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 50 model components to the UV plane model.
! The established model now contains 297 components and 0.107816 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.846982Jy  sigma=0.006044
! Fit after  self-cal, rms=0.846866Jy  sigma=0.006043
! 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=0.689 mas, bmaj=1.745 mas, bpa=3.548 degrees
! Estimated noise=1346.5 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.091789 Jy
! Component: 100  -  total flux cleaned = 0.107909 Jy
! Component: 150  -  total flux cleaned = 0.107978 Jy
! Component: 200  -  total flux cleaned = 0.108095 Jy
! Total flux subtracted in 200 components = 0.108095 Jy
! Clean residual min=-0.032269 max=0.032037 Jy/beam
! Clean residual mean=0.000002 rms=0.015128 Jy/beam
! Combined flux in latest and established models = 0.108095 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 77 model components to the UV plane model.
! The established model now contains 77 components and 0.108095 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.8423 mas, bmaj=2.068 mas, bpa=1.995 degrees
! Estimated noise=962.235 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.0144745 Jy
! Component: 100  -  total flux cleaned = 0.0181562 Jy
! Component: 150  -  total flux cleaned = 0.0130413 Jy
! Component: 200  -  total flux cleaned = 0.0114127 Jy
! Total flux subtracted in 200 components = 0.0114127 Jy
! Clean residual min=-0.019869 max=0.019773 Jy/beam
! Clean residual mean=0.000003 rms=0.009869 Jy/beam
! Combined flux in latest and established models = 0.119508 Jy
! Adding 105 model components to the UV plane model.
! The established model now contains 161 components and 0.119508 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=1.957 mas, bmaj=3.289 mas, bpa=-8.325 degrees
! Estimated noise=1278.67 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.0124192 Jy
! Component: 100  -  total flux cleaned = 0.0168861 Jy
! Component: 150  -  total flux cleaned = 0.0181795 Jy
! Component: 200  -  total flux cleaned = 0.0189396 Jy
! Total flux subtracted in 200 components = 0.0189396 Jy
! Clean residual min=-0.004508 max=0.004498 Jy/beam
! Clean residual mean=0.000015 rms=0.001828 Jy/beam
! Combined flux in latest and established models = 0.138448 Jy
! Adding 70 model components to the UV plane model.
! The established model now contains 231 components and 0.138448 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.8423 mas, bmaj=2.068 mas, bpa=1.995 degrees
! Estimated noise=962.235 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -0.00446257 Jy
! Component: 100  -  total flux cleaned = -0.00445807 Jy
! Component: 150  -  total flux cleaned = -0.00445768 Jy
! Component: 200  -  total flux cleaned = -0.00449641 Jy
! Total flux subtracted in 200 components = -0.00449641 Jy
! Clean residual min=-0.016708 max=0.016705 Jy/beam
! Clean residual mean=0.000015 rms=0.009084 Jy/beam
! Combined flux in latest and established models = 0.133951 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 124 model components to the UV plane model.
! The established model now contains 303 components and 0.133951 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.845918Jy  sigma=0.006037
! Fit after  self-cal, rms=0.845831Jy  sigma=0.006036
wmodel J1656+1826_X_1996_01_02_yyk\_map.mod
! Writing 303 model components to file: J1656+1826_X_1996_01_02_yyk_map.mod
wobs J1656+1826_X_1996_01_02_yyk\_uvs.fits
! Writing UV FITS file: J1656+1826_X_1996_01_02_yyk_uvs.fits
wwins J1656+1826_X_1996_01_02_yyk\_map.win
! wwins: No CLEAN windows to write.
! Error occured in command: wwins
![Exited script file: muppet]
! 
wmap "J1656+1826_X_1996_01_02_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8423 x 2.068 at 1.995 degrees (North through East)
! Clean map  min=-0.025712  max=0.058445 Jy/beam
! Writing clean map to FITS file: J1656+1826_X_1996_01_02_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.0584451 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00912771 
device "J1656+1826_X_1996_01_02_yyk\_map.eps/VPS"
! Attempting to open device: 'J1656+1826_X_1996_01_02_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -46.8527 46.8527 93.7054
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0273 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.058 
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.8423 x 2.068 at 1.995 degrees (North through East)
! Clean map  min=-0.025712  max=0.058445 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1656+1826_X_1996_01_02_yyk\_map.gif/gif"
! Attempting to open device: 'J1656+1826_X_1996_01_02_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1656+1826_X_1996_01_02_yyk_uvs.log closed on Mon Jan  8 07:14:40 2007