! Started logfile: OJ287_S.log on Mon Oct  5 14:07:35 1998
observe OJ287_S.edt
! Reading UV FITS file: OJ287_S.edt
! AN table 1: 18 integrations on 66 of 66 possible baselines.
! AN table 2: 94 integrations on 132 of 136 possible baselines.
! AN table 3: 68 integrations on 91 of 91 possible baselines.
! AN table 4: 12 integrations on 10 of 10 possible baselines.
! Apparent sampling: 0.3229 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: OJ287
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 748 lines of history.
! 
! Reading 25708 visibilities.
print "***********************************"
! *********************************** 
print "*** Using gonzo instruction set ***"
! *** Using gonzo instruction set *** 
print "***********************************"
! *********************************** 
float field_size
field_size = 1024
float field_cell
field_cell = 0.4
integer clean_niter
clean_niter = 50
float clean_gain
clean_gain = 0.03
float dynam
dynam = 7.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.400x0.400 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 125 telescope corrections were flagged in sub-array 1.
!  A total of 969 telescope corrections were flagged in sub-array 2.
!  A total of 641 telescope corrections were flagged in sub-array 3.
!  A total of 23 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 125 telescope corrections were flagged in sub-array 1.
!  A total of 969 telescope corrections were flagged in sub-array 2.
!  A total of 641 telescope corrections were flagged in sub-array 3.
!  A total of 23 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 125 telescope corrections were flagged in sub-array 1.
!  A total of 969 telescope corrections were flagged in sub-array 2.
!  A total of 641 telescope corrections were flagged in sub-array 3.
!  A total of 23 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 125 telescope corrections were flagged in sub-array 1.
!  A total of 969 telescope corrections were flagged in sub-array 2.
!  A total of 641 telescope corrections were flagged in sub-array 3.
!  A total of 23 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.363748Jy  sigma=1.759758
! Fit after  self-cal, rms=0.362575Jy  sigma=1.754389
! 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=2.332 mas, bmaj=3.919 mas, bpa=-2.543 degrees
! Estimated noise=1.78284 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.80056 Jy
! Total flux subtracted in 50 components = 0.80056 Jy
! Clean residual min=-0.038835 max=0.243697 Jy/beam
! Clean residual mean=0.000174 rms=0.011651 Jy/beam
! Combined flux in latest and established models = 0.80056 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.80056 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.458153Jy  sigma=2.216639
! Fit after  self-cal, rms=0.458148Jy  sigma=2.216617
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.25423 Jy
! Total flux subtracted in 50 components = 0.25423 Jy
! Clean residual min=-0.031857 max=0.111743 Jy/beam
! Clean residual mean=0.000110 rms=0.007694 Jy/beam
! Combined flux in latest and established models = 1.05479 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 4 model components to the UV plane model.
! The established model now contains 7 components and 1.05479 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320996Jy  sigma=1.550067
! Fit after  self-cal, rms=0.320933Jy  sigma=1.549787
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.119627 Jy
! Total flux subtracted in 50 components = 0.119627 Jy
! Clean residual min=-0.028226 max=0.053353 Jy/beam
! Clean residual mean=0.000080 rms=0.006519 Jy/beam
! Combined flux in latest and established models = 1.17442 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 10 components and 1.17442 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.283717Jy  sigma=1.370827
! Fit after  self-cal, rms=0.283639Jy  sigma=1.370487
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0600491 Jy
! Total flux subtracted in 50 components = 0.0600491 Jy
! Clean residual min=-0.027871 max=0.040315 Jy/beam
! Clean residual mean=0.000065 rms=0.006190 Jy/beam
! Combined flux in latest and established models = 1.23447 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 17 components and 1.23447 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.274771Jy  sigma=1.328965
! Fit after  self-cal, rms=0.274747Jy  sigma=1.328864
! 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=2.974 mas, bmaj=5.094 mas, bpa=6.071 degrees
! Estimated noise=1.04543 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 (-4, -2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0324197 Jy
! Component: 100  -  total flux cleaned = 0.041485 Jy
! Total flux subtracted in 100 components = 0.041485 Jy
! Clean residual min=-0.029144 max=0.029167 Jy/beam
! Clean residual mean=0.000448 rms=0.006423 Jy/beam
! Combined flux in latest and established models = 1.27595 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 16 model components to the UV plane model.
! The established model now contains 33 components and 1.27595 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.267744Jy  sigma=1.295066
! Fit after  self-cal, rms=0.267503Jy  sigma=1.293909
! 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 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.04     GC        1.52     GN        0.93     
!   HN        1.01     KP        1.03     LA        0.76     NL        0.97     
!   ON        0.93     PT        1.03     SC        0.95     WF        1.07     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.98     GC        0.99     GN        0.92     
!   HN        0.89     KK        1.08     KP        0.98     LA        0.90     
!   MC        1.02     MK        1.07     NL        0.74     NY        1.20     
!   ON        1.07     OV        0.95     PT        0.96     SC        0.87     
!   WF        1.11     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.02     GC        0.99     HN        1.03     
!   KK        1.02     KP        1.05     LA        0.97     MK        0.99     
!   NL        0.99     ON        1.00*    OV        1.02     PT        1.03     
!   SC        0.95     WF        0.98     
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     GC        0.96     KK        1.03     MK        0.98     
!   OV        1.08     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.02     GC        1.52     GN        0.97     
!   HN        1.03     KP        1.04     LA        0.97     NL        1.01     
!   ON        0.93     PT        1.00     SC        0.98     WF        1.03     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.99     GC        1.01     GN        0.95     
!   HN        0.90     KK        0.97     KP        0.98     LA        0.95     
!   MC        1.50     MK        1.07     NL        0.93     NY        1.22     
!   ON        1.00     OV        0.96     PT        0.96     SC        0.84     
!   WF        0.99     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.03     GC        1.02     HN        1.03     
!   KK        1.00     KP        1.05     LA        1.01     MK        1.00     
!   NL        1.05     ON        1.00*    OV        1.02     PT        1.01     
!   SC        0.94     WF        1.06     
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     GC        0.99     KK        1.03     MK        0.97     
!   OV        1.05     
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        1.02     GC        1.42     GN        0.98     
!   HN        0.99     KP        1.00     LA        1.98     NL        0.99     
!   ON        0.89     PT        1.02     SC        0.96     WF        1.02     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.98     GC        0.97     GN        0.94     
!   HN        0.87     KK        1.01     KP        0.95     LA        0.98     
!   MC        1.99     MK        1.05     NL        0.91     NY        1.23     
!   ON        1.04     OV        0.96     PT        0.96     SC        0.83     
!   WF        0.95     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.00     GC        0.99     HN        1.02     
!   KK        1.00     KP        1.02     LA        1.01     MK        0.98     
!   NL        1.04     ON        1.00*    OV        1.02     PT        1.01     
!   SC        0.91     WF        1.07     
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     GC        0.96     KK        0.98     MK        1.01     
!   OV        1.07     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.00     GC        1.39     GN        0.97     
!   HN        1.01     KP        1.04     LA        1.05     NL        0.99     
!   ON        1.18     PT        1.01     SC        0.92     WF        1.02     
! 
!  A total of 42 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.99     GC        0.99     GN        0.93     
!   HN        0.90     KK        1.07     KP        0.97     LA        0.96     
!   MC        1.07     MK        1.06     NL        0.90     NY        1.27     
!   ON        0.94     OV        0.96     PT        0.99     SC        0.85     
!   WF        0.98     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.01     GC        1.00     HN        1.02     
!   KK        1.01     KP        1.03     LA        1.00     MK        0.98     
!   NL        1.03     ON        1.00*    OV        1.02     PT        1.01     
!   SC        0.88     WF        1.11     
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.07     GC        1.00     KK        1.02     MK        0.97     
!   OV        1.04     
! 
! 
! Fit before self-cal, rms=0.267503Jy  sigma=1.293909
! Fit after  self-cal, rms=0.231264Jy  sigma=1.133726
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.04 mas, bmaj=5.227 mas, bpa=6.035 degrees
! Estimated noise=1.05026 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.0114507 Jy
! Component: 100  -  total flux cleaned = -0.0170481 Jy
! Total flux subtracted in 100 components = -0.0170481 Jy
! Clean residual min=-0.022611 max=0.024694 Jy/beam
! Clean residual mean=0.000718 rms=0.005640 Jy/beam
! Combined flux in latest and established models = 1.2589 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 11 model components to the UV plane model.
! The established model now contains 44 components and 1.2589 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.229160Jy  sigma=1.123845
! Fit after  self-cal, rms=0.229160Jy  sigma=1.123543
! 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.0026339 Jy
! Component: 100  -  total flux cleaned = -0.00483135 Jy
! Total flux subtracted in 100 components = -0.00483135 Jy
! Clean residual min=-0.022269 max=0.024774 Jy/beam
! Clean residual mean=0.000737 rms=0.005593 Jy/beam
! Combined flux in latest and established models = 1.25407 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 51 components and 1.25407 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228303Jy  sigma=1.119400
! Fit after  self-cal, rms=0.145791Jy  sigma=0.635504
! Inverting map and beam 
! Estimated beam: bmin=3.08 mas, bmaj=5.213 mas, bpa=4.852 degrees
! Estimated noise=1.05041 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=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0104809 Jy
! Component: 100  -  total flux cleaned = 0.0136348 Jy
! Total flux subtracted in 100 components = 0.0136348 Jy
! Clean residual min=-0.005568 max=0.007941 Jy/beam
! Clean residual mean=0.000418 rms=0.001142 Jy/beam
! Combined flux in latest and established models = 1.26771 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 15 model components to the UV plane model.
! The established model now contains 60 components and 1.26771 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.144353Jy  sigma=0.626786
! Fit after  self-cal, rms=0.144265Jy  sigma=0.626129
! Inverting map 
! Added new window around map position (-17.6, -13.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00389435 Jy
! Component: 100  -  total flux cleaned = 0.00711504 Jy
! Total flux subtracted in 100 components = 0.00711504 Jy
! Clean residual min=-0.004242 max=0.005244 Jy/beam
! Clean residual mean=0.000385 rms=0.001036 Jy/beam
! Combined flux in latest and established models = 1.27482 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 16 model components to the UV plane model.
! The established model now contains 69 components and 1.27482 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.143733Jy  sigma=0.623202
! Fit after  self-cal, rms=0.143706Jy  sigma=0.622982
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save OJ287_S
! Writing UV FITS file: OJ287_S.uvf
! Writing 69 model components to file: OJ287_S.mod
! wwins: Wrote 3 windows to OJ287_S.win
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.08 x 5.213 at 4.852 degrees (North through East)
! Clean map  min=-0.0044997  max=1.0767 Jy/beam
! Writing clean map to FITS file: OJ287_S.fits
! Writing difmap environment to: OJ287_S.par
print "****************************"
! **************************** 
print "*** Now, make some plots ***"
! *** Now, make some plots *** 
print "****************************"
! **************************** 
device OJ287_Suv.ps/vps,1,2
! Attempting to open device: 'OJ287_Suv.ps/vps'
radplot
! Using default options string "m1"
uvplot
device OJ287_Sim.ps/vps
! Attempting to open device: 'OJ287_Sim.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=3.08 mas, bmaj=5.213 mas, bpa=4.852 degrees
! Estimated noise=1.05041 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.08 x 5.213 at 4.852 degrees (North through East)
! Clean map  min=-0.0044997  max=1.0767 Jy/beam
quit
! Quitting program
! Log file OJ287_S.log closed on Mon Oct  5 14:16:23 1998