! Started logfile: 0059+581_K.log on Mon May  5 11:11:54 2003
observe 0059+581_K.scd
! Reading UV FITS file: 0059+581_K.scd
! AN table 1: 43 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.690439 visibilities/baseline/integration-bin.
! Found source: 0059+581
! 
! There are 8 IFs, and a total of 8 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.42136e+10        8e+06          1        8e+06
!  02        2  2.42266e+10        8e+06          1        8e+06
!  03        3  2.42656e+10        8e+06          1        8e+06
!  04        4  2.43436e+10        8e+06          1        8e+06
!  05        5  2.44866e+10        8e+06          1        8e+06
!  06        6  2.45906e+10        8e+06          1        8e+06
!  07        7  2.46556e+10        8e+06          1        8e+06
!  08        8  2.46816e+10        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 871 lines of history.
! 
! Reading 10688 visibilities.
print "***********************************"
! *********************************** 
print "*** Using gonzo instruction set ***"
! *** Using gonzo instruction set *** 
print "***********************************"
! *********************************** 
float field_size
field_size = 1024
float field_cell
field_cell = 0.03
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 8.0
float win_mult
win_mult = 1.8
float solint
solint = 3.6/6.0
logical doflt
doflt = true
logical doamp
float new_peak
float flux_cutoff
mapsize field_size,field_cell
! Map grid = 1024x1024 pixels with 0.0300x0.0300 milli-arcsec cellsize.
select
! Selecting polarization: RR,  channels: 1..8
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
! Reading IF 5 channels: 5..5
! Reading IF 6 channels: 6..6
! Reading IF 7 channels: 7..7
! Reading IF 8 channels: 8..8
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 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 5.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 6.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 7.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 8.
!  A total of 93 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=1.749992Jy  sigma=14.988389
! Fit after  self-cal, rms=1.750038Jy  sigma=14.988201
! clrmod: Cleared the established, tentative and continuum models.
! Redundant starting model cleared.
uvweight 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.
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.242 mas, bmaj=0.5023 mas, bpa=-1.812 degrees
! Estimated noise=1.84509 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal doamp, doflt, solint
  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 = 2.07861 Jy
! Component: 100  -  total flux cleaned = 2.54597 Jy
! Total flux subtracted in 100 components = 2.54597 Jy
! Clean residual min=-0.058270 max=0.164872 Jy/beam
! Clean residual mean=-0.000648 rms=0.017070 Jy/beam
! Combined flux in latest and established models = 2.54597 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 2.54598 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.352285Jy  sigma=2.832397
! Fit after  self-cal, rms=0.352170Jy  sigma=2.831454
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.17231 Jy
! Component: 100  -  total flux cleaned = 0.257927 Jy
! Total flux subtracted in 100 components = 0.257927 Jy
! Clean residual min=-0.026694 max=0.041361 Jy/beam
! Clean residual mean=-0.000155 rms=0.006718 Jy/beam
! Combined flux in latest and established models = 2.8039 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 13 model components to the UV plane model.
! The established model now contains 19 components and 2.8039 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.245481Jy  sigma=1.846075
! Fit after  self-cal, rms=0.245325Jy  sigma=1.844770
! Inverting map 
print "****************************************"
! **************************************** 
print "*** Finished Uniform Weighting CLEAN ***"
! *** Finished Uniform Weighting CLEAN *** 
print "****************************************"
! **************************************** 
uvweight 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
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.2852 mas, bmaj=0.5597 mas, bpa=-3.055 degrees
! Estimated noise=0.85118 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal doamp, doflt, solint
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.058889 Jy
! Component: 100  -  total flux cleaned = 0.0890743 Jy
! Component: 150  -  total flux cleaned = 0.105314 Jy
! Component: 200  -  total flux cleaned = 0.113336 Jy
! Total flux subtracted in 200 components = 0.113336 Jy
! Clean residual min=-0.016217 max=0.016954 Jy/beam
! Clean residual mean=0.000015 rms=0.003830 Jy/beam
! Combined flux in latest and established models = 2.91724 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 18 model components to the UV plane model.
! The established model now contains 30 components and 2.91724 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.231820Jy  sigma=1.710592
! Fit after  self-cal, rms=0.231775Jy  sigma=1.710281
! Inverting map 
print "****************************************"
! **************************************** 
print "*** Finished Natural Weighting CLEAN ***"
! *** Finished Natural Weighting CLEAN *** 
print "****************************************"
! **************************************** 
gscale false
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Amplitude normalization factor in sub-array 1: 0.999418
!  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: 0.999401
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 3.
!  Amplitude normalization factor in sub-array 1: 0.999396
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 4.
!  Amplitude normalization factor in sub-array 1: 0.999367
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 5.
!  Amplitude normalization factor in sub-array 1: 0.999279
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 6.
!  Amplitude normalization factor in sub-array 1: 0.999182
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 7.
!  Amplitude normalization factor in sub-array 1: 0.999223
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Correcting IF 8.
!  Amplitude normalization factor in sub-array 1: 0.999151
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00     HN        1.00     KP        1.00     
!   LA        1.00     MK        1.01     NL        1.00     OV        1.00     
!   PT        1.00     SC        1.00     
! 
! 
! Fit before self-cal, rms=0.231775Jy  sigma=1.710281
! Fit after  self-cal, rms=0.231667Jy  sigma=1.708729
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.2856 mas, bmaj=0.5603 mas, bpa=-3.049 degrees
! Estimated noise=0.851123 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal doamp, doflt, solint
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00613582 Jy
! Component: 100  -  total flux cleaned = -0.00655213 Jy
! Component: 150  -  total flux cleaned = -0.00672833 Jy
! Component: 200  -  total flux cleaned = -0.00688744 Jy
! Total flux subtracted in 200 components = -0.00688744 Jy
! Clean residual min=-0.016297 max=0.015214 Jy/beam
! Clean residual mean=0.000005 rms=0.003713 Jy/beam
! Combined flux in latest and established models = 2.91035 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 13 model components to the UV plane model.
! The established model now contains 38 components and 2.91035 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.231398Jy  sigma=1.705153
! Fit after  self-cal, rms=0.231384Jy  sigma=1.705024
! Inverting map 
dynam = dynam - 1.0
doamp = true
solint = solint * (6.0/3.6)
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 doamp, doflt, solint
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000402104 Jy
! Component: 100  -  total flux cleaned = -0.000400057 Jy
! Component: 150  -  total flux cleaned = -0.000526501 Jy
! Component: 200  -  total flux cleaned = -0.000524126 Jy
! Total flux subtracted in 200 components = -0.000524126 Jy
! Clean residual min=-0.016084 max=0.014618 Jy/beam
! Clean residual mean=0.000004 rms=0.003677 Jy/beam
! Combined flux in latest and established models = 2.90983 Jy
! Performing amp+phase self-cal over 1 minute time intervals
! Adding 14 model components to the UV plane model.
! The established model now contains 42 components and 2.90983 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.231273Jy  sigma=1.703563
! Fit after  self-cal, rms=0.223321Jy  sigma=1.633627
! Inverting map and beam 
! Estimated beam: bmin=0.2856 mas, bmaj=0.5607 mas, bpa=-2.993 degrees
! Estimated noise=0.85181 mJy/beam.
doamp = false
solint = solint / (6.0/3.6)
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 doamp, doflt, solint
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00287638 Jy
! Component: 100  -  total flux cleaned = 0.00317658 Jy
! Component: 150  -  total flux cleaned = 0.00345192 Jy
! Component: 200  -  total flux cleaned = 0.00370201 Jy
! Total flux subtracted in 200 components = 0.00370201 Jy
! Clean residual min=-0.008540 max=0.008795 Jy/beam
! Clean residual mean=0.000000 rms=0.002129 Jy/beam
! Combined flux in latest and established models = 2.91353 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 13 model components to the UV plane model.
! The established model now contains 55 components and 2.91353 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Correcting IF 5.
! 
! Correcting IF 6.
! 
! Correcting IF 7.
! 
! Correcting IF 8.
! 
! Fit before self-cal, rms=0.223115Jy  sigma=1.631461
! Fit after  self-cal, rms=0.223116Jy  sigma=1.631449
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save 0059+581_K
! Writing UV FITS file: 0059+581_K.uvf
! Writing 55 model components to file: 0059+581_K.mod
! wwins: Wrote 1 windows to 0059+581_K.win
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.2856 x 0.5607 at -2.993 degrees (North through East)
! Clean map  min=-0.0082175  max=2.7082 Jy/beam
! Writing clean map to FITS file: 0059+581_K.fits
! Writing difmap environment to: 0059+581_K.par
print "****************************"
! **************************** 
print "*** Now, make some plots ***"
! *** Now, make some plots *** 
print "****************************"
! **************************** 
device 0059+581_Kuv.ps/vps,1,2
! Attempting to open device: '0059+581_Kuv.ps/vps'
radplot
! Using default options string "m1"
uvplot
! Using default options string ""
device 0059+581_Kim.ps/vps
! Attempting to open device: '0059+581_Kim.ps/vps'
uvweight 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.
loglevs -1,2048,2
! The new contour levels are:
!  -1 1 2 4 8 16 32 64 128 256 512 1024 2048
cmul = imstat(rms)*3
! Inverting map and beam 
! Estimated beam: bmin=0.2856 mas, bmaj=0.5607 mas, bpa=-2.993 degrees
! Estimated noise=0.85181 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.2856 x 0.5607 at -2.993 degrees (North through East)
! Clean map  min=-0.0082175  max=2.7082 Jy/beam
quit
! Quitting program
! Log file 0059+581_K.log closed on Mon May  5 11:12:32 2003