! Started logfile: J1422+7704_S_2006_02_16_yyk_uvs.log on Wed Jul  5 12:36:41 2006
obs J1422+7704_S_2006_02_16_yyk_uva.fits
! Reading UV FITS file: J1422+7704_S_2006_02_16_yyk_uva.fits
! AN table 1: 877 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.465349 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1422+7704
! 
! 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 2424 lines of history.
! 
! Reading 73460 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 J1422+7704_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.157699 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.163 mas, bmaj=10.55 mas, bpa=10.69 degrees
! Estimated noise=1.54515 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.0780124 Jy
! Component: 100  -  total flux cleaned = 0.115331 Jy
! Total flux subtracted in 100 components = 0.115331 Jy
! Clean residual min=-0.014945 max=0.015084 Jy/beam
! Clean residual mean=0.000082 rms=0.006036 Jy/beam
! Combined flux in latest and established models = 0.115331 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 31 model components to the UV plane model.
! The established model now contains 31 components and 0.115331 Jy
! 
! Correcting IF 1.
!  A total of 51 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 170 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 52 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 51 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.115995Jy  sigma=1.973661
! Fit after  self-cal, rms=0.114883Jy  sigma=1.943130
! Inverting map and beam 
! Estimated beam: bmin=7.163 mas, bmaj=10.55 mas, bpa=10.69 degrees
! Estimated noise=1.54515 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.261 mas, bmaj=11.34 mas, bpa=10.82 degrees
! Estimated noise=1.04275 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.0427469 Jy
! Component: 100  -  total flux cleaned = 0.0637989 Jy
! Component: 150  -  total flux cleaned = 0.0658161 Jy
! Component: 200  -  total flux cleaned = 0.0642519 Jy
! Total flux subtracted in 200 components = 0.0642519 Jy
! Clean residual min=-0.008819 max=0.008847 Jy/beam
! Clean residual mean=0.000355 rms=0.004421 Jy/beam
! Combined flux in latest and established models = 0.179583 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 107 model components to the UV plane model.
! The established model now contains 135 components and 0.179583 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.095414Jy  sigma=1.486784
! Fit after  self-cal, rms=0.094226Jy  sigma=1.455693
! 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.261 x 11.34 at 10.82 degrees (North through East)
! Clean map  min=-0.013792  max=0.069498 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
!  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.
!  Amplitude normalization factor in sub-array 1: 1
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.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
!  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.094226Jy  sigma=1.455693
! Fit after  self-cal, rms=0.094226Jy  sigma=1.455693
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.094226Jy  sigma=1.455693
! Fit after  self-cal, rms=0.094226Jy  sigma=1.455693
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=8.261 mas, bmaj=11.34 mas, bpa=10.82 degrees
! Estimated noise=1.04275 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.00595032 Jy
! Component: 100  -  total flux cleaned = 0.00650417 Jy
! Component: 150  -  total flux cleaned = 0.00551645 Jy
! Component: 200  -  total flux cleaned = 0.0050593 Jy
! Total flux subtracted in 200 components = 0.0050593 Jy
! Clean residual min=-0.004956 max=0.004955 Jy/beam
! Clean residual mean=0.000237 rms=0.002655 Jy/beam
! Combined flux in latest and established models = 0.184642 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 107 model components to the UV plane model.
! The established model now contains 239 components and 0.184642 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.089414Jy  sigma=1.333545
! Fit after  self-cal, rms=0.089240Jy  sigma=1.329983
! 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.089240Jy  sigma=1.329983
! Fit after  self-cal, rms=0.084391Jy  sigma=1.218502
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.00465755 Jy
! Component: 100  -  total flux cleaned = 0.0065725 Jy
! Component: 150  -  total flux cleaned = 0.00468727 Jy
! Component: 200  -  total flux cleaned = 0.00358871 Jy
! Total flux subtracted in 200 components = 0.00358871 Jy
! Clean residual min=-0.003191 max=0.003186 Jy/beam
! Clean residual mean=0.000150 rms=0.001605 Jy/beam
! Combined flux in latest and established models = 0.188231 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 92 model components to the UV plane model.
! The established model now contains 329 components and 0.188231 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.081756Jy  sigma=1.152599
! Fit after  self-cal, rms=0.081469Jy  sigma=1.129370
! 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.261 x 11.34 at 10.82 degrees (North through East)
! Clean map  min=-0.011644  max=0.065706 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.478 mas, bmaj=12.42 mas, bpa=15.54 degrees
! Estimated noise=1.07804 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.00083432 Jy
! Component: 100  -  total flux cleaned = 0.00259217 Jy
! Component: 150  -  total flux cleaned = 0.00326069 Jy
! Component: 200  -  total flux cleaned = 0.00423725 Jy
! Total flux subtracted in 200 components = 0.00423725 Jy
! Clean residual min=-0.002269 max=0.002285 Jy/beam
! Clean residual mean=0.000095 rms=0.001083 Jy/beam
! Combined flux in latest and established models = 0.192468 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 110 model components to the UV plane model.
! The established model now contains 421 components and 0.192468 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.080418Jy  sigma=1.101371
! Fit after  self-cal, rms=0.080607Jy  sigma=1.095318
! 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.163 mas, bmaj=10.55 mas, bpa=10.69 degrees
! Estimated noise=1.54515 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0829536 Jy
! Component: 100  -  total flux cleaned = 0.123483 Jy
! Component: 150  -  total flux cleaned = 0.148375 Jy
! Component: 200  -  total flux cleaned = 0.167146 Jy
! Total flux subtracted in 200 components = 0.167146 Jy
! Clean residual min=-0.011509 max=0.011541 Jy/beam
! Clean residual mean=0.000156 rms=0.004922 Jy/beam
! Combined flux in latest and established models = 0.167146 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 79 model components to the UV plane model.
! The established model now contains 79 components and 0.167146 Jy
! Inverting map and beam 
! Estimated beam: bmin=8.261 mas, bmaj=11.34 mas, bpa=10.82 degrees
! Estimated noise=1.04275 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.0214247 Jy
! Component: 100  -  total flux cleaned = 0.025207 Jy
! Component: 150  -  total flux cleaned = 0.0274468 Jy
! Component: 200  -  total flux cleaned = 0.0287126 Jy
! Total flux subtracted in 200 components = 0.0287126 Jy
! Clean residual min=-0.006931 max=0.006993 Jy/beam
! Clean residual mean=0.000304 rms=0.003635 Jy/beam
! Combined flux in latest and established models = 0.195858 Jy
! Adding 112 model components to the UV plane model.
! The established model now contains 184 components and 0.195858 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.478 mas, bmaj=12.42 mas, bpa=15.54 degrees
! Estimated noise=1.07804 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.000362329 Jy
! Component: 100  -  total flux cleaned = 0.00133525 Jy
! Component: 150  -  total flux cleaned = 0.00221052 Jy
! Component: 200  -  total flux cleaned = 0.00358145 Jy
! Total flux subtracted in 200 components = 0.00358145 Jy
! Clean residual min=-0.004140 max=0.004149 Jy/beam
! Clean residual mean=0.000223 rms=0.002289 Jy/beam
! Combined flux in latest and established models = 0.19944 Jy
! Adding 125 model components to the UV plane model.
! The established model now contains 302 components and 0.19944 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=8.261 mas, bmaj=11.34 mas, bpa=10.82 degrees
! Estimated noise=1.04275 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = -0.0025632 Jy
! Component: 100  -  total flux cleaned = -0.00258997 Jy
! Component: 150  -  total flux cleaned = -0.00278417 Jy
! Component: 200  -  total flux cleaned = -0.00335241 Jy
! Total flux subtracted in 200 components = -0.00335241 Jy
! Clean residual min=-0.002357 max=0.002350 Jy/beam
! Clean residual mean=0.000108 rms=0.001193 Jy/beam
! Combined flux in latest and established models = 0.196087 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 86 model components to the UV plane model.
! The established model now contains 383 components and 0.196087 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.080640Jy  sigma=1.086763
! Fit after  self-cal, rms=0.081121Jy  sigma=1.079940
wmodel J1422+7704_S_2006_02_16_yyk\_map.mod
! Writing 383 model components to file: J1422+7704_S_2006_02_16_yyk_map.mod
wobs J1422+7704_S_2006_02_16_yyk\_uvs.fits
! Writing UV FITS file: J1422+7704_S_2006_02_16_yyk_uvs.fits
wwins J1422+7704_S_2006_02_16_yyk\_map.win
! wwins: No CLEAN windows to write.
! Error occured in command: wwins
![Exited script file: muppet]
! 
wmap "J1422+7704_S_2006_02_16_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 8.261 x 11.34 at 10.82 degrees (North through East)
! Clean map  min=-0.010511  max=0.065409 Jy/beam
! Writing clean map to FITS file: J1422+7704_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.0654092 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00120181 
device "J1422+7704_S_2006_02_16_yyk\_map.eps/VPS"
! Attempting to open device: 'J1422+7704_S_2006_02_16_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -5.51212 5.51212 11.0242 22.0485 44.097 88.1939
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0036 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.065 
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.261 x 11.34 at 10.82 degrees (North through East)
! Clean map  min=-0.010511  max=0.065409 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1422+7704_S_2006_02_16_yyk\_map.gif/gif"
! Attempting to open device: 'J1422+7704_S_2006_02_16_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J1422+7704_S_2006_02_16_yyk_uvs.log closed on Wed Jul  5 12:36:56 2006