! Started logfile: OJ287_X.log on Tue Mar  6 11:11:52 2001
observe OJ287_X.edt
! Reading UV FITS file: OJ287_X.edt
! AN table 1: 45 integrations on 120 of 120 possible baselines.
! AN table 2: 55 integrations on 108 of 136 possible baselines.
! AN table 3: 32 integrations on 91 of 91 possible baselines.
! AN table 4: 6 integrations on 3 of 3 possible baselines.
! Apparent sampling: 0.388928 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  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 5578 lines of history.
! 
! Reading 22200 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 = 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.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 420 telescope corrections were flagged in sub-array 1.
!  A total of 640 telescope corrections were flagged in sub-array 2.
!  A total of 178 telescope corrections were flagged in sub-array 3.
!  A total of 6 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 436 telescope corrections were flagged in sub-array 1.
!  A total of 655 telescope corrections were flagged in sub-array 2.
!  A total of 205 telescope corrections were flagged in sub-array 3.
!  A total of 6 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 436 telescope corrections were flagged in sub-array 1.
!  A total of 655 telescope corrections were flagged in sub-array 2.
!  A total of 205 telescope corrections were flagged in sub-array 3.
!  A total of 6 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 436 telescope corrections were flagged in sub-array 1.
!  A total of 655 telescope corrections were flagged in sub-array 2.
!  A total of 204 telescope corrections were flagged in sub-array 3.
!  A total of 6 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.386581Jy  sigma=2.699292
! Fit after  self-cal, rms=0.385821Jy  sigma=2.698363
! 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.5955 mas, bmaj=0.9954 mas, bpa=-9.174 degrees
! Estimated noise=1.28556 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.961281 Jy
! Total flux subtracted in 50 components = 0.961281 Jy
! Clean residual min=-0.034388 max=0.268215 Jy/beam
! Clean residual mean=0.000085 rms=0.010441 Jy/beam
! Combined flux in latest and established models = 0.961281 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.961281 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.414916Jy  sigma=2.902385
! Fit after  self-cal, rms=0.414916Jy  sigma=2.902382
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.218433 Jy
! Total flux subtracted in 50 components = 0.218433 Jy
! Clean residual min=-0.023764 max=0.112030 Jy/beam
! Clean residual mean=0.000113 rms=0.006673 Jy/beam
! Combined flux in latest and established models = 1.17971 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 1.17971 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280445Jy  sigma=1.957627
! Fit after  self-cal, rms=0.280344Jy  sigma=1.956897
! Inverting map 
! Added new window around map position (-1, -0.3).
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.111747 Jy
! Total flux subtracted in 50 components = 0.111747 Jy
! Clean residual min=-0.020711 max=0.055584 Jy/beam
! Clean residual mean=0.000123 rms=0.005417 Jy/beam
! Combined flux in latest and established models = 1.29146 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 11 components and 1.29146 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.229799Jy  sigma=1.599187
! Fit after  self-cal, rms=0.228436Jy  sigma=1.589910
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0743969 Jy
! Total flux subtracted in 50 components = 0.0743969 Jy
! Clean residual min=-0.018259 max=0.039778 Jy/beam
! Clean residual mean=0.000128 rms=0.004696 Jy/beam
! Combined flux in latest and established models = 1.36586 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 13 components and 1.36586 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201461Jy  sigma=1.398446
! Fit after  self-cal, rms=0.200769Jy  sigma=1.393699
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0525006 Jy
! Total flux subtracted in 50 components = 0.0525006 Jy
! Clean residual min=-0.018065 max=0.029788 Jy/beam
! Clean residual mean=0.000132 rms=0.004295 Jy/beam
! Combined flux in latest and established models = 1.41836 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 13 components and 1.41836 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.185507Jy  sigma=1.285130
! Fit after  self-cal, rms=0.185160Jy  sigma=1.282752
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0371277 Jy
! Total flux subtracted in 50 components = 0.0371277 Jy
! Clean residual min=-0.017998 max=0.025240 Jy/beam
! Clean residual mean=0.000135 rms=0.004079 Jy/beam
! Combined flux in latest and established models = 1.45549 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 14 components and 1.45549 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.176713Jy  sigma=1.222549
! Fit after  self-cal, rms=0.176518Jy  sigma=1.221224
! 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.7135 mas, bmaj=1.245 mas, bpa=-10.1 degrees
! Estimated noise=0.77922 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.0417277 Jy
! Component: 100  -  total flux cleaned = 0.0655841 Jy
! Total flux subtracted in 100 components = 0.0655841 Jy
! Clean residual min=-0.013654 max=0.021190 Jy/beam
! Clean residual mean=0.001206 rms=0.004189 Jy/beam
! Combined flux in latest and established models = 1.52107 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 25 components and 1.52107 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.167475Jy  sigma=1.156707
! Fit after  self-cal, rms=0.167143Jy  sigma=1.154380
! 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 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.97     GC        1.03     HN        0.98     
!   KK        1.00     KP        0.95     LA        0.96     MK        1.00     
!   NL        0.99     NY        1.26     ON        1.04     OV        0.98     
!   PT        1.07     SC        0.97     WF        1.00     GN        1.14     
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.97     GC        1.01     HN        0.98     
!   KK        0.96     KP        0.96     LA        0.98     MC        1.00*    
!   MK        0.99     NL        1.00     NY        1.07     ON        1.00*    
!   OV        0.99     PT        1.22     SC        0.99     WF        0.98     
!   GN        1.20     
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.96     GC        0.98     HN        1.00     
!   KP        0.96     LA        0.97     MC        1.07     NL        0.98     
!   ON        1.01     OV        0.99     PT        1.20     SC        0.94     
!   WF        1.02     GN        1.15     
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   GC        0.00*    KK        0.00*    MK        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.96     GC        1.01     HN        0.98     
!   KK        1.00     KP        0.95     LA        0.95     MK        0.99     
!   NL        0.99     NY        1.24     ON        1.06     OV        0.97     
!   PT        1.05     SC        0.97     WF        0.96     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.96     GC        1.00     HN        0.97     
!   KK        0.96     KP        0.96     LA        0.97     MC        1.00*    
!   MK        0.98     NL        0.99     NY        1.06     ON        1.00*    
!   OV        0.98     PT        1.21     SC        0.99     WF        0.95     
!   GN        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.95     GC        0.97     HN        1.00     
!   KP        0.95     LA        0.96     MC        1.06     NL        0.99     
!   ON        1.01     OV        0.98     PT        1.18     SC        0.93     
!   WF        0.98     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   GC        0.00*    KK        0.00*    MK        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.95     GC        0.98     HN        0.97     
!   KK        0.99     KP        0.94     LA        0.94     MK        0.98     
!   NL        0.98     NY        1.25     ON        1.00     OV        0.97     
!   PT        1.05     SC        0.96     WF        1.00     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.95     GC        0.96     HN        0.96     
!   KK        0.95     KP        0.95     LA        0.96     MC        1.00*    
!   MK        0.97     NL        0.98     NY        1.05     ON        1.00*    
!   OV        0.97     PT        1.21     SC        0.98     WF        0.98     
!   GN        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.95     GC        0.94     HN        0.98     
!   KP        0.95     LA        0.96     MC        1.06     NL        0.98     
!   ON        0.99     OV        0.97     PT        1.19     SC        0.90     
!   WF        0.99     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   GC        0.00*    KK        0.00*    MK        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.95     GC        0.99     HN        0.97     
!   KK        0.98     KP        0.93     LA        0.94     MK        0.97     
!   NL        0.97     NY        1.22     ON        0.99     OV        0.96     
!   PT        1.05     SC        0.96     WF        1.00     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.95     GC        0.98     HN        0.96     
!   KK        0.96     KP        0.94     LA        0.96     MC        1.00*    
!   MK        0.96     NL        0.97     NY        1.04     ON        1.00*    
!   OV        0.97     PT        1.21     SC        0.97     WF        0.98     
!   GN        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        0.94     GC        0.95     HN        0.99     
!   KP        0.94     LA        0.95     MC        1.06     NL        0.98     
!   ON        0.97     OV        0.97     PT        1.19     SC        0.91     
!   WF        1.00     GN        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   GC        0.00*    KK        0.00*    MK        0.00*    
! 
! 
! Fit before self-cal, rms=0.167143Jy  sigma=1.154380
! Fit after  self-cal, rms=0.125562Jy  sigma=0.813910
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7244 mas, bmaj=1.264 mas, bpa=-8.233 degrees
! Estimated noise=0.780026 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 (-2.1, -0.1).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0164278 Jy
! Component: 100  -  total flux cleaned = 0.0201097 Jy
! Total flux subtracted in 100 components = 0.0201097 Jy
! Clean residual min=-0.005923 max=0.007827 Jy/beam
! Clean residual mean=0.000477 rms=0.001742 Jy/beam
! Combined flux in latest and established models = 1.54118 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 37 components and 1.54118 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.123532Jy  sigma=0.798818
! Fit after  self-cal, rms=0.123424Jy  sigma=0.797805
! 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.00324048 Jy
! Component: 100  -  total flux cleaned = 0.00510677 Jy
! Total flux subtracted in 100 components = 0.00510677 Jy
! Clean residual min=-0.005844 max=0.007616 Jy/beam
! Clean residual mean=0.000444 rms=0.001683 Jy/beam
! Combined flux in latest and established models = 1.54629 Jy
! Performing amp+phase self-cal over 1 minute time intervals
! Adding 18 model components to the UV plane model.
! The established model now contains 45 components and 1.54629 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.122770Jy  sigma=0.793121
! Fit after  self-cal, rms=0.108548Jy  sigma=0.698028
! Inverting map and beam 
! Estimated beam: bmin=0.7238 mas, bmaj=1.263 mas, bpa=-8.215 degrees
! Estimated noise=0.780321 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.00758586 Jy
! Component: 100  -  total flux cleaned = 0.010897 Jy
! Total flux subtracted in 100 components = 0.010897 Jy
! Clean residual min=-0.003143 max=0.003612 Jy/beam
! Clean residual mean=0.000230 rms=0.000784 Jy/beam
! Combined flux in latest and established models = 1.55718 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 26 model components to the UV plane model.
! The established model now contains 66 components and 1.55718 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.108015Jy  sigma=0.693925
! Fit after  self-cal, rms=0.107996Jy  sigma=0.693710
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save OJ287_X
! Writing UV FITS file: OJ287_X.uvf
! Writing 66 model components to file: OJ287_X.mod
! wwins: Wrote 3 windows to OJ287_X.win
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7238 x 1.263 at -8.215 degrees (North through East)
! Clean map  min=-0.0025092  max=1.2425 Jy/beam
! Writing clean map to FITS file: OJ287_X.fits
! Writing difmap environment to: OJ287_X.par
print "****************************"
! **************************** 
print "*** Now, make some plots ***"
! *** Now, make some plots *** 
print "****************************"
! **************************** 
device OJ287_Xuv.ps/vps,1,2
! Attempting to open device: 'OJ287_Xuv.ps/vps'
radplot
! Using default options string "m1"
uvplot
device OJ287_Xim.ps/vps
! Attempting to open device: 'OJ287_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.7238 mas, bmaj=1.263 mas, bpa=-8.215 degrees
! Estimated noise=0.780321 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7238 x 1.263 at -8.215 degrees (North through East)
! Clean map  min=-0.0025092  max=1.2425 Jy/beam
quit
! Quitting program
! Log file OJ287_X.log closed on Tue Mar  6 11:12:17 2001