! Started logfile: OJ287_S.log on Thu Oct 22 23:25:04 1998
observe OJ287_S.edt
! Reading UV FITS file: OJ287_S.edt
! AN table 1: 89 integrations on 81 of 105 possible baselines.
! AN table 2: 36 integrations on 78 of 78 possible baselines.
! AN table 3: 70 integrations on 91 of 91 possible baselines.
! AN table 4: 135 integrations on 118 of 120 possible baselines.
! Apparent sampling: 0.265 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 1602 lines of history.
! 
! Reading 34256 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 1154 telescope corrections were flagged in sub-array 1.
!  A total of 287 telescope corrections were flagged in sub-array 2.
!  A total of 584 telescope corrections were flagged in sub-array 3.
!  A total of 1489 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1154 telescope corrections were flagged in sub-array 1.
!  A total of 285 telescope corrections were flagged in sub-array 2.
!  A total of 580 telescope corrections were flagged in sub-array 3.
!  A total of 1475 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1154 telescope corrections were flagged in sub-array 1.
!  A total of 285 telescope corrections were flagged in sub-array 2.
!  A total of 580 telescope corrections were flagged in sub-array 3.
!  A total of 1475 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1154 telescope corrections were flagged in sub-array 1.
!  A total of 285 telescope corrections were flagged in sub-array 2.
!  A total of 580 telescope corrections were flagged in sub-array 3.
!  A total of 1475 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.305083Jy  sigma=1.609094
! Fit after  self-cal, rms=0.302137Jy  sigma=1.593420
! 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.204 mas, bmaj=4.483 mas, bpa=-10.84 degrees
! Estimated noise=1.31277 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.712127 Jy
! Total flux subtracted in 50 components = 0.712127 Jy
! Clean residual min=-0.028732 max=0.199245 Jy/beam
! Clean residual mean=0.000087 rms=0.008575 Jy/beam
! Combined flux in latest and established models = 0.712127 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 2 model components to the UV plane model.
! The established model now contains 2 components and 0.712127 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.408750Jy  sigma=2.167607
! Fit after  self-cal, rms=0.408744Jy  sigma=2.167578
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.196566 Jy
! Total flux subtracted in 50 components = 0.196566 Jy
! Clean residual min=-0.019951 max=0.087810 Jy/beam
! Clean residual mean=0.000051 rms=0.005506 Jy/beam
! Combined flux in latest and established models = 0.908692 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 7 components and 0.908692 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302634Jy  sigma=1.596326
! Fit after  self-cal, rms=0.302618Jy  sigma=1.596247
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0949765 Jy
! Total flux subtracted in 50 components = 0.0949765 Jy
! Clean residual min=-0.017901 max=0.043697 Jy/beam
! Clean residual mean=0.000033 rms=0.004506 Jy/beam
! Combined flux in latest and established models = 1.00367 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 11 components and 1.00367 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270347Jy  sigma=1.422312
! Fit after  self-cal, rms=0.270323Jy  sigma=1.422164
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0493641 Jy
! Total flux subtracted in 50 components = 0.0493641 Jy
! Clean residual min=-0.017090 max=0.032041 Jy/beam
! Clean residual mean=0.000023 rms=0.004194 Jy/beam
! Combined flux in latest and established models = 1.05303 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 19 components and 1.05303 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.260075Jy  sigma=1.367194
! Fit after  self-cal, rms=0.260061Jy  sigma=1.367108
! Inverting map 
! Added new window around map position (-4.8, -2.4).
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0348513 Jy
! Total flux subtracted in 50 components = 0.0348513 Jy
! Clean residual min=-0.017192 max=0.024174 Jy/beam
! Clean residual mean=0.000016 rms=0.004053 Jy/beam
! Combined flux in latest and established models = 1.08788 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 30 components and 1.08788 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254838Jy  sigma=1.338924
! Fit after  self-cal, rms=0.254783Jy  sigma=1.338621
! 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.779 mas, bmaj=5.277 mas, bpa=-7.638 degrees
! Estimated noise=0.798818 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.0398312 Jy
! Component: 100  -  total flux cleaned = 0.0637484 Jy
! Total flux subtracted in 100 components = 0.0637484 Jy
! Clean residual min=-0.010895 max=0.021474 Jy/beam
! Clean residual mean=0.000447 rms=0.003641 Jy/beam
! Combined flux in latest and established models = 1.15163 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 31 model components to the UV plane model.
! The established model now contains 53 components and 1.15163 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.248977Jy  sigma=1.307468
! Fit after  self-cal, rms=0.248835Jy  sigma=1.306680
! 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 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.02     GC        1.89     GN        0.98     
!   HN        0.97     KK        1.00*    KP        1.06     LA        1.02     
!   MC        1.20     NL        0.99     ON        0.95     PT        1.01     
!   SC        0.94     WF        1.01     MK        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GC        0.97     GN        1.01     
!   HN        0.99     KP        1.03     LA        1.00     MC        1.00*    
!   NL        0.94     ON        0.84     OV        0.98     SC        0.97     
!   WF        0.83     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        0.99     GC        0.98     GN        0.96     
!   HN        0.97     KK        0.96     KP        0.90     LA        0.88     
!   NL        2.00     OV        0.89     PT        0.91     SC        1.11     
!   WF        0.55     MK        0.98     
! 
!  A total of 54 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.97     GC        0.95     GN        0.96     
!   HN        1.02     KK        1.01     KP        1.00     LA        0.99     
!   MC        1.08     NL        0.97     ON        1.01     OV        0.99     
!   PT        0.95     SC        1.00     WF        0.86     MK        0.98     
! 
! 
! Correcting IF 2.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.01     GC        1.89     GN        0.99     
!   HN        0.95     KK        1.00*    KP        1.02     LA        1.04     
!   MC        1.44     NL        1.05     ON        0.91     PT        0.99     
!   SC        1.04     WF        0.97     MK        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.99     GC        0.98     GN        1.01     
!   HN        1.00     KP        0.98     LA        0.97     MC        1.00*    
!   NL        1.01     ON        0.94     OV        0.99     SC        0.98     
!   WF        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        0.99     GC        0.98     GN        0.99     
!   HN        0.98     KK        0.97     KP        0.91     LA        0.92     
!   NL        1.23     OV        0.89     PT        0.90     SC        1.08     
!   WF        0.98     MK        0.98     
! 
!  A total of 45 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.98     GC        0.94     GN        0.96     
!   HN        1.02     KK        1.02     KP        0.98     LA        0.96     
!   MC        0.68     NL        1.02     ON        1.01     OV        0.99     
!   PT        0.94     SC        1.01     WF        0.96     MK        0.97     
! 
! 
! Correcting IF 3.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.05     GC        1.93     GN        0.99     
!   HN        0.98     KK        1.00*    KP        1.04     LA        1.12     
!   MC        1.06     NL        1.09     ON        0.97     PT        1.01     
!   SC        1.07     WF        0.98     MK        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.01     GC        0.97     GN        1.06     
!   HN        1.03     KP        1.03     LA        0.99     MC        1.00*    
!   NL        1.04     ON        1.00     OV        1.01     SC        0.98     
!   WF        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        1.01     GC        1.01     GN        1.04     
!   HN        1.02     KK        0.99     KP        0.91     LA        0.93     
!   NL        1.16     OV        0.92     PT        0.90     SC        1.12     
!   WF        1.01     MK        0.99     
! 
!  A total of 45 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.00     GC        0.97     GN        1.00     
!   HN        1.03     KK        1.01     KP        1.00     LA        0.98     
!   MC        1.00     NL        1.04     ON        1.00     OV        1.01     
!   PT        0.97     SC        1.03     WF        0.98     MK        0.98     
! 
! 
! Correcting IF 4.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.09     FD        1.05     GC        1.83     GN        0.98     
!   HN        1.00     KK        1.00*    KP        1.06     LA        1.12     
!   MC        0.93     NL        1.08     ON        0.89     PT        1.03     
!   SC        1.07     WF        0.98     MK        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.02     GC        1.04     GN        1.02     
!   HN        1.03     KP        1.02     LA        1.00     MC        1.00*    
!   NL        1.05     ON        1.01     OV        1.02     SC        1.02     
!   WF        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.02     GC        1.02     GN        1.03     
!   HN        1.02     KK        0.99     KP        0.94     LA        0.95     
!   NL        1.10     OV        0.93     PT        0.92     SC        1.16     
!   WF        1.01     MK        0.99     
! 
!  A total of 45 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.01     GC        0.98     GN        1.00     
!   HN        1.06     KK        1.04     KP        1.01     LA        0.99     
!   MC        0.89     NL        1.06     ON        1.02     OV        1.02     
!   PT        0.98     SC        1.05     WF        0.97     MK        0.98     
! 
! 
! Fit before self-cal, rms=0.248835Jy  sigma=1.306680
! Fit after  self-cal, rms=0.213837Jy  sigma=1.096720
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.776 mas, bmaj=5.33 mas, bpa=-8.183 degrees
! Estimated noise=0.793606 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.00768729 Jy
! Component: 100  -  total flux cleaned = 0.00915834 Jy
! Total flux subtracted in 100 components = 0.00915834 Jy
! Clean residual min=-0.009256 max=0.011192 Jy/beam
! Clean residual mean=0.000050 rms=0.002353 Jy/beam
! Combined flux in latest and established models = 1.16079 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.16079 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.213557Jy  sigma=1.095159
! Fit after  self-cal, rms=0.213613Jy  sigma=1.094887
! 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.00108802 Jy
! Component: 100  -  total flux cleaned = 0.00135071 Jy
! Total flux subtracted in 100 components = 0.00135071 Jy
! Clean residual min=-0.008959 max=0.011172 Jy/beam
! Clean residual mean=0.000040 rms=0.002348 Jy/beam
! Combined flux in latest and established models = 1.16214 Jy
! Performing amp+phase self-cal over 1 minute time intervals
! Adding 12 model components to the UV plane model.
! The established model now contains 73 components and 1.16214 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.213527Jy  sigma=1.094411
! Fit after  self-cal, rms=0.198466Jy  sigma=0.992417
! Inverting map and beam 
! Estimated beam: bmin=2.777 mas, bmaj=5.327 mas, bpa=-8.272 degrees
! Estimated noise=0.794085 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 (-7.6, -4.4).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00822356 Jy
! Component: 100  -  total flux cleaned = 0.0136081 Jy
! Total flux subtracted in 100 components = 0.0136081 Jy
! Clean residual min=-0.003215 max=0.003925 Jy/beam
! Clean residual mean=0.000151 rms=0.000887 Jy/beam
! Combined flux in latest and established models = 1.17575 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 87 components and 1.17575 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.198145Jy  sigma=0.990434
! Fit after  self-cal, rms=0.198135Jy  sigma=0.990245
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save OJ287_S
! Writing UV FITS file: OJ287_S.uvf
! Writing 87 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: 2.777 x 5.327 at -8.272 degrees (North through East)
! Clean map  min=-0.0030674  max=0.95685 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=2.777 mas, bmaj=5.327 mas, bpa=-8.272 degrees
! Estimated noise=0.794085 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.777 x 5.327 at -8.272 degrees (North through East)
! Clean map  min=-0.0030674  max=0.95685 Jy/beam
quit
! Quitting program
! Log file OJ287_S.log closed on Thu Oct 22 23:31:15 1998