! Started logfile: 0059+581_X.log on Mon Jul  2 16:51:48 2001
observe 0059+581_X.edt
! Reading UV FITS file: 0059+581_X.edt
! AN table 1: 63 integrations on 120 of 120 possible baselines.
! AN table 2: 77 integrations on 120 of 120 possible baselines.
! AN table 3: 140 integrations on 120 of 120 possible baselines.
! AN table 4: 47 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.264246 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: 0059+581
! 
! 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.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 8437 lines of history.
! 
! Reading 41476 visibilities.
print "***********************************"
! *********************************** 
print "*** Using gonzo instruction set ***"
! *** Using gonzo instruction set *** 
print "***********************************"
! *********************************** 
float field_size
field_size = 1024
float field_cell
field_cell = 0.1
integer clean_niter
clean_niter = 50
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.100x0.100 milli-arcsec cellsize.
select
! 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
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 752 telescope corrections were flagged in sub-array 1.
!  A total of 972 telescope corrections were flagged in sub-array 2.
!  A total of 1164 telescope corrections were flagged in sub-array 3.
!  A total of 482 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 752 telescope corrections were flagged in sub-array 1.
!  A total of 972 telescope corrections were flagged in sub-array 2.
!  A total of 1164 telescope corrections were flagged in sub-array 3.
!  A total of 482 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 752 telescope corrections were flagged in sub-array 1.
!  A total of 972 telescope corrections were flagged in sub-array 2.
!  A total of 1445 telescope corrections were flagged in sub-array 3.
!  A total of 482 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 752 telescope corrections were flagged in sub-array 1.
!  A total of 976 telescope corrections were flagged in sub-array 2.
!  A total of 1164 telescope corrections were flagged in sub-array 3.
!  A total of 487 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.280038Jy  sigma=1.981474
! Fit after  self-cal, rms=0.279577Jy  sigma=1.978679
! 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.6412 mas, bmaj=0.7301 mas, bpa=5.826 degrees
! Estimated noise=0.988548 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=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.830813 Jy
! Total flux subtracted in 50 components = 0.830813 Jy
! Clean residual min=-0.020430 max=0.231922 Jy/beam
! Clean residual mean=0.000198 rms=0.006709 Jy/beam
! Combined flux in latest and established models = 0.830813 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 0.830813 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.400986Jy  sigma=2.841837
! Fit after  self-cal, rms=0.400986Jy  sigma=2.841838
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.20302 Jy
! Total flux subtracted in 50 components = 0.20302 Jy
! Clean residual min=-0.014431 max=0.081002 Jy/beam
! Clean residual mean=0.000117 rms=0.004065 Jy/beam
! Combined flux in latest and established models = 1.03383 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.03383 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.259619Jy  sigma=1.836875
! Fit after  self-cal, rms=0.259586Jy  sigma=1.836613
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0923036 Jy
! Total flux subtracted in 50 components = 0.0923036 Jy
! Clean residual min=-0.014206 max=0.046891 Jy/beam
! Clean residual mean=0.000081 rms=0.003334 Jy/beam
! Combined flux in latest and established models = 1.12614 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 1.12614 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.214913Jy  sigma=1.517986
! Fit after  self-cal, rms=0.214864Jy  sigma=1.517648
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0577382 Jy
! Total flux subtracted in 50 components = 0.0577382 Jy
! Clean residual min=-0.013951 max=0.031015 Jy/beam
! Clean residual mean=0.000059 rms=0.002998 Jy/beam
! Combined flux in latest and established models = 1.18387 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 12 model components to the UV plane model.
! The established model now contains 26 components and 1.18387 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.193929Jy  sigma=1.367810
! Fit after  self-cal, rms=0.193887Jy  sigma=1.367524
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0391392 Jy
! Total flux subtracted in 50 components = 0.0391392 Jy
! Clean residual min=-0.013675 max=0.021371 Jy/beam
! Clean residual mean=0.000044 rms=0.002830 Jy/beam
! Combined flux in latest and established models = 1.22301 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 12 model components to the UV plane model.
! The established model now contains 31 components and 1.22301 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183113Jy  sigma=1.290161
! Fit after  self-cal, rms=0.183065Jy  sigma=1.289833
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0275806 Jy
! Total flux subtracted in 50 components = 0.0275806 Jy
! Clean residual min=-0.013231 max=0.015893 Jy/beam
! Clean residual mean=0.000033 rms=0.002740 Jy/beam
! Combined flux in latest and established models = 1.25059 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 12 model components to the UV plane model.
! The established model now contains 34 components and 1.25059 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.177301Jy  sigma=1.248306
! Fit after  self-cal, rms=0.177269Jy  sigma=1.248094
! 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.8336 mas, bmaj=0.9484 mas, bpa=28.68 degrees
! Estimated noise=0.56341 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.6, -0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.03716 Jy
! Component: 100  -  total flux cleaned = 0.0584381 Jy
! Total flux subtracted in 100 components = 0.0584381 Jy
! Clean residual min=-0.009454 max=0.013021 Jy/beam
! Clean residual mean=0.000497 rms=0.002904 Jy/beam
! Combined flux in latest and established models = 1.30903 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 30 model components to the UV plane model.
! The established model now contains 56 components and 1.30903 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.170180Jy  sigma=1.196762
! Fit after  self-cal, rms=0.169941Jy  sigma=1.195084
! Inverting map 
print "****************************************"
! **************************************** 
print "*** Finished Natural Weighting CLEAN ***"
! *** Finished Natural Weighting CLEAN *** 
print "****************************************"
! **************************************** 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.01     GC        1.05     HN        0.95     
!   KK        1.00     KP        1.00     LA        0.99     MC        1.16     
!   MK        1.02     NL        1.04     NY        1.01     OV        1.00     
!   PT        1.02     SC        1.04     WF        0.93     GN        0.89     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.00*    GC        1.03     HN        0.96     
!   KK        1.00*    KP        1.08     LA        1.03     MC        0.97     
!   MK        1.00*    NL        1.02     NY        1.01     OV        1.02     
!   PT        1.05     SC        1.11     WF        0.95     GN        0.95     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00     GC        1.02     HN        1.02     
!   KK        0.99     KP        1.00     LA        0.98     MC        0.98     
!   MK        1.03     NL        1.02     NY        1.02     OV        1.01     
!   PT        1.00     SC        1.01     WF        0.98     GN        0.99     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.01     GC        1.01     HN        0.94     
!   KK        1.00*    KP        1.01     LA        1.01     MC        0.92     
!   MK        1.00*    NL        1.02     NY        1.02     OV        1.05     
!   PT        1.01     SC        1.03     WF        1.00*    GN        0.90     
! 
! 
! Correcting IF 2.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.00     GC        1.05     HN        0.94     
!   KK        1.01     KP        1.01     LA        0.99     MC        1.19     
!   MK        1.02     NL        1.04     NY        1.00     OV        1.00     
!   PT        1.02     SC        1.01     WF        0.94     GN        0.91     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.00*    GC        1.02     HN        0.93     
!   KK        1.00*    KP        1.09     LA        1.03     MC        0.96     
!   MK        1.00*    NL        1.03     NY        1.01     OV        1.05     
!   PT        1.03     SC        1.10     WF        0.95     GN        0.98     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        0.99     GC        1.02     HN        1.02     
!   KK        0.99     KP        1.00     LA        0.98     MC        0.99     
!   MK        1.02     NL        1.01     NY        1.03     OV        1.01     
!   PT        1.00     SC        1.01     WF        0.99     GN        1.02     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.02     GC        1.02     HN        0.95     
!   KK        1.00*    KP        1.01     LA        1.01     MC        0.94     
!   MK        1.00*    NL        1.01     NY        1.02     OV        1.05     
!   PT        1.02     SC        1.02     WF        1.00*    GN        0.93     
! 
! 
! Correcting IF 3.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.01     GC        1.07     HN        0.96     
!   KK        1.00     KP        1.00     LA        0.99     MC        1.16     
!   MK        1.04     NL        1.02     NY        1.02     OV        1.00     
!   PT        1.02     SC        1.02     WF        0.95     GN        0.77     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GC        1.04     HN        0.94     
!   KK        1.00*    KP        1.07     LA        1.04     MC        0.96     
!   MK        1.00*    NL        1.01     NY        1.01     OV        1.05     
!   PT        1.05     SC        1.10     WF        0.96     GN        0.82     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        0.99     GC        1.02     HN        1.03     
!   KK        0.99     KP        1.00     LA        0.98     MC        0.97     
!   MK        1.02     NL        1.00     NY        1.03     OV        1.01     
!   PT        1.00     SC        1.04     WF        1.03     GN        0.92     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.00     GC        1.03     HN        0.93     
!   KK        1.00*    KP        1.01     LA        1.02     MC        0.91     
!   MK        1.00*    NL        0.98     NY        1.01     OV        1.04     
!   PT        1.01     SC        1.04     WF        1.00*    GN        0.79     
! 
! 
! Correcting IF 4.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.00     GC        1.05     HN        0.93     
!   KK        1.00     KP        1.01     LA        0.99     MC        1.13     
!   MK        1.03     NL        1.03     NY        1.01     OV        1.00     
!   PT        1.02     SC        1.04     WF        0.95     GN        0.73     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.00*    GC        1.00*    HN        0.93     
!   KK        1.00*    KP        1.08     LA        1.03     MC        0.91     
!   MK        1.00*    NL        1.01     NY        1.03     OV        1.03     
!   PT        1.05     SC        1.12     WF        0.94     GN        0.76     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        0.99     GC        1.03     HN        1.02     
!   KK        0.99     KP        1.00     LA        0.97     MC        0.98     
!   MK        1.02     NL        1.01     NY        1.02     OV        1.01     
!   PT        1.00     SC        1.03     WF        1.00     GN        0.80     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.02     GC        1.03     HN        0.94     
!   KK        1.00*    KP        1.00     LA        1.01     MC        1.00*    
!   MK        1.00*    NL        0.98     NY        1.02     OV        1.04     
!   PT        1.03     SC        1.04     WF        1.00*    GN        0.74     
! 
! 
! Fit before self-cal, rms=0.169941Jy  sigma=1.195084
! Fit after  self-cal, rms=0.139953Jy  sigma=1.006066
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.8364 mas, bmaj=0.9583 mas, bpa=29.63 degrees
! Estimated noise=0.561685 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=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00861505 Jy
! Component: 100  -  total flux cleaned = 0.0095628 Jy
! Total flux subtracted in 100 components = 0.0095628 Jy
! Clean residual min=-0.007192 max=0.008767 Jy/beam
! Clean residual mean=0.000257 rms=0.002017 Jy/beam
! Combined flux in latest and established models = 1.3186 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 14 model components to the UV plane model.
! The established model now contains 68 components and 1.3186 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.138987Jy  sigma=0.998930
! Fit after  self-cal, rms=0.138955Jy  sigma=0.998557
! 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=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00235847 Jy
! Component: 100  -  total flux cleaned = 0.00366997 Jy
! Total flux subtracted in 100 components = 0.00366997 Jy
! Clean residual min=-0.006910 max=0.008814 Jy/beam
! Clean residual mean=0.000222 rms=0.001995 Jy/beam
! Combined flux in latest and established models = 1.32227 Jy
! Performing amp+phase self-cal over 1 minute time intervals
! Adding 19 model components to the UV plane model.
! The established model now contains 74 components and 1.32227 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.138599Jy  sigma=0.995827
! Fit after  self-cal, rms=0.112390Jy  sigma=0.767112
! Inverting map and beam 
! Estimated beam: bmin=0.8374 mas, bmaj=0.9576 mas, bpa=29.23 degrees
! Estimated noise=0.562412 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)
! Added new window around map position (-2.6, -0.8).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00735229 Jy
! Component: 100  -  total flux cleaned = 0.0105876 Jy
! Total flux subtracted in 100 components = 0.0105876 Jy
! Clean residual min=-0.003304 max=0.003497 Jy/beam
! Clean residual mean=0.000248 rms=0.000576 Jy/beam
! Combined flux in latest and established models = 1.33285 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 23 model components to the UV plane model.
! The established model now contains 96 components and 1.33285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.111922Jy  sigma=0.763613
! Fit after  self-cal, rms=0.111899Jy  sigma=0.763361
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save 0059+581_X
! Writing UV FITS file: 0059+581_X.uvf
! Writing 96 model components to file: 0059+581_X.mod
! wwins: Wrote 3 windows to 0059+581_X.win
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8374 x 0.9576 at 29.23 degrees (North through East)
! Clean map  min=-0.0019966  max=1.1308 Jy/beam
! Writing clean map to FITS file: 0059+581_X.fits
! Writing difmap environment to: 0059+581_X.par
print "****************************"
! **************************** 
print "*** Now, make some plots ***"
! *** Now, make some plots *** 
print "****************************"
! **************************** 
device 0059+581_Xuv.ps/vps,1,2
! Attempting to open device: '0059+581_Xuv.ps/vps'
radplot
! Using default options string "m1"
uvplot
! Using default options string ""
device 0059+581_Xim.ps/vps
! Attempting to open device: '0059+581_Xim.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.8374 mas, bmaj=0.9576 mas, bpa=29.23 degrees
! Estimated noise=0.562412 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8374 x 0.9576 at 29.23 degrees (North through East)
! Clean map  min=-0.0019966  max=1.1308 Jy/beam
quit
! Quitting program
! Log file 0059+581_X.log closed on Mon Jul  2 16:53:04 2001