! Started logfile: OJ287_X.log on Wed Jun 20 08:22:37 2001
observe OJ287_X.edt
! Reading UV FITS file: OJ287_X.edt
! AN table 1: 19 integrations on 120 of 120 possible baselines.
! AN table 2: 35 integrations on 120 of 120 possible baselines.
! AN table 3: 152 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.251659 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 8437 lines of history.
! 
! Reading 24884 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 149 telescope corrections were flagged in sub-array 1.
!  A total of 450 telescope corrections were flagged in sub-array 2.
!  A total of 1440 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 149 telescope corrections were flagged in sub-array 1.
!  A total of 450 telescope corrections were flagged in sub-array 2.
!  A total of 1440 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 149 telescope corrections were flagged in sub-array 1.
!  A total of 450 telescope corrections were flagged in sub-array 2.
!  A total of 1444 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 149 telescope corrections were flagged in sub-array 1.
!  A total of 450 telescope corrections were flagged in sub-array 2.
!  A total of 1449 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.392324Jy  sigma=2.748771
! Fit after  self-cal, rms=0.392041Jy  sigma=2.747296
! 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.6276 mas, bmaj=0.9233 mas, bpa=-10.7 degrees
! Estimated noise=1.17022 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.819899 Jy
! Total flux subtracted in 50 components = 0.819899 Jy
! Clean residual min=-0.037257 max=0.238297 Jy/beam
! Clean residual mean=0.000171 rms=0.011375 Jy/beam
! Combined flux in latest and established models = 0.819899 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 4 components and 0.819899 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.488268Jy  sigma=3.417395
! Fit after  self-cal, rms=0.488234Jy  sigma=3.417205
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.24962 Jy
! Total flux subtracted in 50 components = 0.24962 Jy
! Clean residual min=-0.027311 max=0.129752 Jy/beam
! Clean residual mean=0.000104 rms=0.007402 Jy/beam
! Combined flux in latest and established models = 1.06952 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 8 components and 1.06952 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339449Jy  sigma=2.375193
! Fit after  self-cal, rms=0.338288Jy  sigma=2.366519
! Inverting map 
! Added new window around map position (-0.8, -0.3).
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.141676 Jy
! Total flux subtracted in 50 components = 0.141676 Jy
! Clean residual min=-0.023129 max=0.069731 Jy/beam
! Clean residual mean=0.000066 rms=0.005557 Jy/beam
! Combined flux in latest and established models = 1.2112 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 11 components and 1.2112 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270446Jy  sigma=1.890202
! Fit after  self-cal, rms=0.268652Jy  sigma=1.877150
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0868936 Jy
! Total flux subtracted in 50 components = 0.0868936 Jy
! Clean residual min=-0.020069 max=0.043513 Jy/beam
! Clean residual mean=0.000043 rms=0.004654 Jy/beam
! Combined flux in latest and established models = 1.29809 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 15 components and 1.29809 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.235331Jy  sigma=1.642902
! Fit after  self-cal, rms=0.234736Jy  sigma=1.638542
! Inverting map 
! clean: niter=50  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0548585 Jy
! Total flux subtracted in 50 components = 0.0548585 Jy
! Clean residual min=-0.019660 max=0.028921 Jy/beam
! Clean residual mean=0.000028 rms=0.004269 Jy/beam
! Combined flux in latest and established models = 1.35295 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 21 components and 1.35295 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.218421Jy  sigma=1.523701
! Fit after  self-cal, rms=0.218171Jy  sigma=1.521886
! 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.7626 mas, bmaj=1.117 mas, bpa=-8.058 degrees
! Estimated noise=0.703237 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.0660392 Jy
! Component: 100  -  total flux cleaned = 0.106685 Jy
! Total flux subtracted in 100 components = 0.106685 Jy
! Clean residual min=-0.030487 max=0.034554 Jy/beam
! Clean residual mean=-0.001036 rms=0.005523 Jy/beam
! Combined flux in latest and established models = 1.45963 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 38 model components to the UV plane model.
! The established model now contains 55 components and 1.45963 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.198596Jy  sigma=1.383448
! Fit after  self-cal, rms=0.197785Jy  sigma=1.377745
! Inverting map 
print "****************************************"
! **************************************** 
print "*** Finished Natural Weighting CLEAN ***"
! *** Finished Natural Weighting CLEAN *** 
print "****************************************"
! **************************************** 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00     GC        1.04     HN        1.33     
!   KK        1.10     KP        1.00*    LA        0.96     MC        1.09     
!   MK        1.01     NL        1.01     NY        0.99     OV        1.00*    
!   PT        1.00     SC        0.93     WF        1.10     GN        0.88     
! 
!  A total of 21 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00*    GC        1.02     HN        1.00*    
!   KK        0.93     KP        1.00*    LA        1.00*    MC        1.00*    
!   MK        0.98     NL        1.00*    NY        1.14     OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    GN        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.99     GC        1.05     HN        1.08     
!   KK        0.94     KP        0.99     LA        0.97     MC        0.91     
!   MK        0.99     NL        1.02     NY        1.07     OV        0.99     
!   PT        1.00     SC        0.98     WF        1.03     GN        0.91     
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.98     GC        1.04     HN        1.40     
!   KK        1.09     KP        1.00*    LA        0.96     MC        1.09     
!   MK        1.02     NL        1.00     NY        1.01     OV        1.00*    
!   PT        1.01     SC        0.93     WF        1.12     GN        0.91     
! 
!  A total of 21 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.00*    GC        1.01     HN        1.00*    
!   KK        0.93     KP        1.00*    LA        1.00*    MC        1.00*    
!   MK        0.97     NL        1.00*    NY        1.14     OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    GN        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.98     GC        1.05     HN        1.08     
!   KK        0.94     KP        0.99     LA        0.97     MC        0.89     
!   MK        0.98     NL        1.01     NY        1.07     OV        0.99     
!   PT        1.00     SC        0.97     WF        1.05     GN        0.93     
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        0.97     GC        1.05     HN        1.67     
!   KK        1.07     KP        1.00*    LA        0.96     MC        1.06     
!   MK        1.01     NL        1.00     NY        1.00     OV        1.00*    
!   PT        1.01     SC        0.92     WF        1.12     GN        0.77     
! 
!  A total of 21 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00*    GC        1.03     HN        1.00*    
!   KK        0.90     KP        1.00*    LA        1.00*    MC        1.00*    
!   MK        0.97     NL        1.00*    NY        1.13     OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    GN        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.97     GC        1.04     HN        1.10     
!   KK        0.92     KP        0.98     LA        0.96     MC        0.88     
!   MK        0.98     NL        0.99     NY        1.07     OV        0.99     
!   PT        0.99     SC        0.97     WF        1.05     GN        0.79     
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.97     GC        1.04     HN        1.46     
!   KK        1.07     KP        1.00*    LA        0.94     MC        1.05     
!   MK        0.99     NL        1.00     NY        0.99     OV        1.00*    
!   PT        1.02     SC        0.93     WF        1.16     GN        0.71     
! 
!  A total of 21 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00*    GC        1.00     HN        1.00*    
!   KK        0.90     KP        1.00*    LA        1.00*    MC        1.00*    
!   MK        0.96     NL        1.00*    NY        1.11     OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    GN        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.97     FD        0.97     GC        1.05     HN        1.08     
!   KK        0.92     KP        0.98     LA        0.96     MC        0.91     
!   MK        0.97     NL        1.00     NY        1.06     OV        0.98     
!   PT        0.99     SC        0.98     WF        1.06     GN        0.72     
! 
! 
! Fit before self-cal, rms=0.197785Jy  sigma=1.377745
! Fit after  self-cal, rms=0.143548Jy  sigma=0.959768
dynam = dynam - 0.5
doamp = false
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7664 mas, bmaj=1.139 mas, bpa=-8.223 degrees
! Estimated noise=0.695387 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 (-1.7, 0.3).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0211887 Jy
! Component: 100  -  total flux cleaned = 0.0331286 Jy
! Total flux subtracted in 100 components = 0.0331286 Jy
! Clean residual min=-0.007161 max=0.012125 Jy/beam
! Clean residual mean=0.001470 rms=0.001729 Jy/beam
! Combined flux in latest and established models = 1.49276 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 76 components and 1.49276 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.140689Jy  sigma=0.938134
! Fit after  self-cal, rms=0.140574Jy  sigma=0.936362
! 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.00757758 Jy
! Component: 100  -  total flux cleaned = 0.00920134 Jy
! Total flux subtracted in 100 components = 0.00920133 Jy
! Clean residual min=-0.006797 max=0.009892 Jy/beam
! Clean residual mean=0.001361 rms=0.001659 Jy/beam
! Combined flux in latest and established models = 1.50196 Jy
! Performing amp+phase self-cal over 1 minute time intervals
! Adding 26 model components to the UV plane model.
! The established model now contains 94 components and 1.50196 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.139940Jy  sigma=0.931861
! Fit after  self-cal, rms=0.125550Jy  sigma=0.821071
! Inverting map and beam 
! Estimated beam: bmin=0.7668 mas, bmaj=1.137 mas, bpa=-8.422 degrees
! Estimated noise=0.698001 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.00232736 Jy
! Component: 100  -  total flux cleaned = 0.00373711 Jy
! Total flux subtracted in 100 components = 0.00373711 Jy
! Clean residual min=-0.003577 max=0.004633 Jy/beam
! Clean residual mean=0.000202 rms=0.000715 Jy/beam
! Combined flux in latest and established models = 1.5057 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 114 components and 1.5057 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.125177Jy  sigma=0.818110
! Fit after  self-cal, rms=0.125173Jy  sigma=0.817932
! Inverting map 
! Added new window around map position (-3.3, -1.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00272883 Jy
! Component: 100  -  total flux cleaned = 0.00400939 Jy
! Total flux subtracted in 100 components = 0.00400939 Jy
! Clean residual min=-0.003402 max=0.002971 Jy/beam
! Clean residual mean=0.000152 rms=0.000672 Jy/beam
! Combined flux in latest and established models = 1.50971 Jy
! Performing phase self-cal over 0.6 minute time intervals
! Adding 21 model components to the UV plane model.
! The established model now contains 126 components and 1.50971 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.124952Jy  sigma=0.816186
! Fit after  self-cal, rms=0.124954Jy  sigma=0.816121
! Inverting map 
print "***********************************"
! *********************************** 
print "*** Finished Amplitude Self-Cal ***"
! *** Finished Amplitude Self-Cal *** 
print "***********************************"
! *********************************** 
save OJ287_X
! Writing UV FITS file: OJ287_X.uvf
! Writing 126 model components to file: OJ287_X.mod
! wwins: Wrote 4 windows to OJ287_X.win
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7668 x 1.137 at -8.422 degrees (North through East)
! Clean map  min=-0.0023935  max=1.0785 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
! Using default options string ""
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.7668 mas, bmaj=1.137 mas, bpa=-8.422 degrees
! Estimated noise=0.698001 mJy/beam.
mappl cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7668 x 1.137 at -8.422 degrees (North through East)
! Clean map  min=-0.0023935  max=1.0785 Jy/beam
quit
! Quitting program
! Log file OJ287_X.log closed on Wed Jun 20 08:23:36 2001