! Started logfile: J2301+8200_S_2006_02_14_yyk_uvs.log on Wed Jul  5 14:07:23 2006
obs J2301+8200_S_2006_02_14_yyk_uva.fits
! Reading UV FITS file: J2301+8200_S_2006_02_14_yyk_uva.fits
! AN table 1: 876 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.332141 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2301+8200
! 
! 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 2683 lines of history.
! 
! Reading 52372 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 J2301+8200_S_2006_02_14_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.106815 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.877 mas, bmaj=22.31 mas, bpa=44.95 degrees
! Estimated noise=1.7635 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.0643707 Jy
! Component: 100  -  total flux cleaned = 0.0879737 Jy
! Total flux subtracted in 100 components = 0.0879737 Jy
! Clean residual min=-0.007799 max=0.008461 Jy/beam
! Clean residual mean=0.000015 rms=0.003173 Jy/beam
! Combined flux in latest and established models = 0.0879737 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 26 model components to the UV plane model.
! The established model now contains 26 components and 0.0879737 Jy
! 
! Correcting IF 1.
!  A total of 64 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 64 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 64 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 64 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.062428Jy  sigma=1.154332
! Fit after  self-cal, rms=0.062287Jy  sigma=1.151604
! Inverting map and beam 
! Estimated beam: bmin=7.877 mas, bmaj=22.31 mas, bpa=44.95 degrees
! Estimated noise=1.7635 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.898 mas, bmaj=23.76 mas, bpa=43.3 degrees
! Estimated noise=1.14237 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.0118364 Jy
! Component: 100  -  total flux cleaned = 0.0146527 Jy
! Component: 150  -  total flux cleaned = 0.0158958 Jy
! Component: 200  -  total flux cleaned = 0.0161198 Jy
! Total flux subtracted in 200 components = 0.0161198 Jy
! Clean residual min=-0.002895 max=0.002869 Jy/beam
! Clean residual mean=0.000020 rms=0.001365 Jy/beam
! Combined flux in latest and established models = 0.104093 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 109 model components to the UV plane model.
! The established model now contains 133 components and 0.104093 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.057793Jy  sigma=1.063767
! Fit after  self-cal, rms=0.057718Jy  sigma=1.062153
! 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.898 x 23.76 at 43.3 degrees (North through East)
! Clean map  min=-0.0068077  max=0.078689 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.0275
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.89     HN        1.00*    KP        0.97     
!   LA        1.08     MK        1.00*    NL        1.00*    OV        0.93     
!   PT        0.86     SC        1.00*    
! 
! 
! Correcting IF 2.
!  Amplitude normalization factor in sub-array 1: 0.999969
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.94     HN        1.00*    KP        1.07     
!   LA        1.07     MK        1.00*    NL        1.00*    OV        1.00     
!   PT        0.91     SC        1.00*    
! 
! 
! Correcting IF 3.
!  Amplitude normalization factor in sub-array 1: 0.966145
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.18     FD        1.01     HN        1.00*    KP        0.99     
!   LA        0.98     MK        1.00*    NL        1.00*    OV        1.05     
!   PT        1.14     SC        1.00*    
! 
! 
! Correcting IF 4.
!  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.057718Jy  sigma=1.062153
! Fit after  self-cal, rms=0.056960Jy  sigma=1.047407
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.056960Jy  sigma=1.047407
! Fit after  self-cal, rms=0.056943Jy  sigma=1.046883
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=9.052 mas, bmaj=24.03 mas, bpa=42.26 degrees
! Estimated noise=1.13529 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.00193498 Jy
! Component: 100  -  total flux cleaned = 0.00315195 Jy
! Component: 150  -  total flux cleaned = 0.00407925 Jy
! Component: 200  -  total flux cleaned = 0.00448737 Jy
! Total flux subtracted in 200 components = 0.00448737 Jy
! Clean residual min=-0.001230 max=0.001232 Jy/beam
! Clean residual mean=0.000019 rms=0.000604 Jy/beam
! Combined flux in latest and established models = 0.108581 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 61 model components to the UV plane model.
! The established model now contains 193 components and 0.108581 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.056490Jy  sigma=1.037548
! Fit after  self-cal, rms=0.056465Jy  sigma=1.037132
! 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.056465Jy  sigma=1.037132
! Fit after  self-cal, rms=0.052815Jy  sigma=0.959155
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.00321264 Jy
! Component: 100  -  total flux cleaned = 0.00402024 Jy
! Component: 150  -  total flux cleaned = 0.00402463 Jy
! Component: 200  -  total flux cleaned = 0.00395123 Jy
! Total flux subtracted in 200 components = 0.00395123 Jy
! Clean residual min=-0.000904 max=0.000896 Jy/beam
! Clean residual mean=0.000017 rms=0.000436 Jy/beam
! Combined flux in latest and established models = 0.112532 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 78 model components to the UV plane model.
! The established model now contains 263 components and 0.112532 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.052433Jy  sigma=0.953270
! Fit after  self-cal, rms=0.052294Jy  sigma=0.949221
! 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: 9.052 x 24.03 at 42.26 degrees (North through East)
! Clean map  min=-0.006732  max=0.079856 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=10.01 mas, bmaj=24.23 mas, bpa=40.37 degrees
! Estimated noise=1.15374 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.000231426 Jy
! Component: 100  -  total flux cleaned = -0.000428126 Jy
! Component: 150  -  total flux cleaned = -0.000613711 Jy
! Component: 200  -  total flux cleaned = -0.000846353 Jy
! Total flux subtracted in 200 components = -0.000846353 Jy
! Clean residual min=-0.000733 max=0.000724 Jy/beam
! Clean residual mean=0.000026 rms=0.000335 Jy/beam
! Combined flux in latest and established models = 0.111686 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 54 model components to the UV plane model.
! The established model now contains 310 components and 0.111686 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.052148Jy  sigma=0.947103
! Fit after  self-cal, rms=0.052141Jy  sigma=0.946737
! 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.908 mas, bmaj=22.44 mas, bpa=44.66 degrees
! Estimated noise=1.75711 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0659302 Jy
! Component: 100  -  total flux cleaned = 0.0898185 Jy
! Component: 150  -  total flux cleaned = 0.100207 Jy
! Component: 200  -  total flux cleaned = 0.105797 Jy
! Total flux subtracted in 200 components = 0.105797 Jy
! Clean residual min=-0.003931 max=0.003958 Jy/beam
! Clean residual mean=0.000009 rms=0.001740 Jy/beam
! Combined flux in latest and established models = 0.105797 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 69 model components to the UV plane model.
! The established model now contains 69 components and 0.105797 Jy
! Inverting map and beam 
! Estimated beam: bmin=9.052 mas, bmaj=24.03 mas, bpa=42.26 degrees
! Estimated noise=1.13529 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.000351504 Jy
! Component: 100  -  total flux cleaned = -0.000446356 Jy
! Component: 150  -  total flux cleaned = -3.77185e-05 Jy
! Component: 200  -  total flux cleaned = 0.000303662 Jy
! Total flux subtracted in 200 components = 0.000303662 Jy
! Clean residual min=-0.001855 max=0.001856 Jy/beam
! Clean residual mean=0.000022 rms=0.000880 Jy/beam
! Combined flux in latest and established models = 0.106101 Jy
! Adding 81 model components to the UV plane model.
! The established model now contains 150 components and 0.106101 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=10.01 mas, bmaj=24.23 mas, bpa=40.37 degrees
! Estimated noise=1.15374 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.000130386 Jy
! Component: 100  -  total flux cleaned = 0.000127227 Jy
! Component: 150  -  total flux cleaned = -6.67505e-05 Jy
! Component: 200  -  total flux cleaned = -0.000230303 Jy
! Total flux subtracted in 200 components = -0.000230303 Jy
! Clean residual min=-0.001016 max=0.001033 Jy/beam
! Clean residual mean=0.000016 rms=0.000482 Jy/beam
! Combined flux in latest and established models = 0.105871 Jy
! Adding 71 model components to the UV plane model.
! The established model now contains 216 components and 0.105871 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=9.052 mas, bmaj=24.03 mas, bpa=42.26 degrees
! Estimated noise=1.13529 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 2.19042e-05 Jy
! Component: 100  -  total flux cleaned = -0.000265474 Jy
! Component: 150  -  total flux cleaned = -0.000334706 Jy
! Component: 200  -  total flux cleaned = -0.000269713 Jy
! Total flux subtracted in 200 components = -0.000269713 Jy
! Clean residual min=-0.000776 max=0.000784 Jy/beam
! Clean residual mean=0.000004 rms=0.000360 Jy/beam
! Combined flux in latest and established models = 0.105601 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 55 model components to the UV plane model.
! The established model now contains 265 components and 0.105601 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.052192Jy  sigma=0.947805
! Fit after  self-cal, rms=0.052183Jy  sigma=0.947677
wmodel J2301+8200_S_2006_02_14_yyk\_map.mod
! Writing 265 model components to file: J2301+8200_S_2006_02_14_yyk_map.mod
wobs J2301+8200_S_2006_02_14_yyk\_uvs.fits
! Writing UV FITS file: J2301+8200_S_2006_02_14_yyk_uvs.fits
wwins J2301+8200_S_2006_02_14_yyk\_map.win
! wwins: No CLEAN windows to write.
! Error occured in command: wwins
![Exited script file: muppet]
! 
wmap "J2301+8200_S_2006_02_14_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 9.052 x 24.03 at 42.26 degrees (North through East)
! Clean map  min=-0.0070646  max=0.080096 Jy/beam
! Writing clean map to FITS file: J2301+8200_S_2006_02_14_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.080096 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000358949 
device "J2301+8200_S_2006_02_14_yyk\_map.eps/VPS"
! Attempting to open device: 'J2301+8200_S_2006_02_14_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -1.34445 1.34445 2.68889 5.37778 10.7556 21.5111 43.0223 86.0445
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.08 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 9.052 x 24.03 at 42.26 degrees (North through East)
! Clean map  min=-0.0070646  max=0.080096 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2301+8200_S_2006_02_14_yyk\_map.gif/gif"
! Attempting to open device: 'J2301+8200_S_2006_02_14_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J2301+8200_S_2006_02_14_yyk_uvs.log closed on Wed Jul  5 14:07:45 2006