! Started logfile: J1230+1223_X_1998_10_01_pus_uvs.log on Wed Feb  6 13:03:16 2008
obs J1230+1223_X_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1230+1223_X_1998_10_01_pus_uva.fits
! AN table 1: 45 integrations on 136 of 136 possible baselines.
! AN table 2: 153 integrations on 136 of 136 possible baselines.
! AN table 3: 136 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.183978 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1230+1223
! 
! 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.40798e+09        4e+06          1        4e+06
!  02        2  8.47798e+09        4e+06          1        4e+06
!  03        3  8.79298e+09        4e+06          1        4e+06
!  04        4  8.89798e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 2049 lines of history.
! 
! Reading 33428 visibilities.
select I
! Polarization I is unavailable.
! 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
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.2 
print "taper_size =",taper_size
! taper_size = 70 
![@muppet J1230+1223_X_1998_10_01_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.200x0.200 milli-arcsec cellsize.
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 583 telescope corrections were flagged in sub-array 1.
!  A total of 1796 telescope corrections were flagged in sub-array 2.
!  A total of 1167 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 583 telescope corrections were flagged in sub-array 1.
!  A total of 1796 telescope corrections were flagged in sub-array 2.
!  A total of 1167 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 583 telescope corrections were flagged in sub-array 1.
!  A total of 1796 telescope corrections were flagged in sub-array 2.
!  A total of 1167 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 583 telescope corrections were flagged in sub-array 1.
!  A total of 1796 telescope corrections were flagged in sub-array 2.
!  A total of 1167 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.861238Jy  sigma=0.007468
! Fit after  self-cal, rms=0.553148Jy  sigma=0.004466
! clrmod: Cleared the established, tentative and continuum models.
! Redundant starting model cleared.
uvw 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.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.65 mas, bmaj=1.174 mas, bpa=-10.34 degrees
! Estimated noise=830.47 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.569166 Jy
! Component: 100  -  total flux cleaned = 0.78752 Jy
! Total flux subtracted in 100 components = 0.78752 Jy
! Clean residual min=-0.045108 max=0.113935 Jy/beam
! Clean residual mean=0.000938 rms=0.014727 Jy/beam
! Combined flux in latest and established models = 0.78752 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 0.78752 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.449046Jy  sigma=0.003840
! Fit after  self-cal, rms=0.447980Jy  sigma=0.003835
! Inverting map 
! Added new window around map position (-1, 0.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.133918 Jy
! Component: 100  -  total flux cleaned = 0.228834 Jy
! Total flux subtracted in 100 components = 0.228834 Jy
! Clean residual min=-0.030376 max=0.058866 Jy/beam
! Clean residual mean=0.000708 rms=0.010029 Jy/beam
! Combined flux in latest and established models = 1.01635 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 28 components and 1.01635 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.387614Jy  sigma=0.003128
! Fit after  self-cal, rms=0.386374Jy  sigma=0.003120
! Inverting map 
! Added new window around map position (-2, 0.4).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.077281 Jy
! Component: 100  -  total flux cleaned = 0.138049 Jy
! Total flux subtracted in 100 components = 0.138049 Jy
! Clean residual min=-0.022868 max=0.036887 Jy/beam
! Clean residual mean=0.000569 rms=0.007579 Jy/beam
! Combined flux in latest and established models = 1.1544 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 42 components and 1.1544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.362363Jy  sigma=0.002816
! Fit after  self-cal, rms=0.361697Jy  sigma=0.002811
! Inverting map 
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 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
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7039 mas, bmaj=1.375 mas, bpa=-10.33 degrees
! Estimated noise=456.583 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0791982 Jy
! Component: 100  -  total flux cleaned = 0.137415 Jy
! Component: 150  -  total flux cleaned = 0.182481 Jy
! Component: 200  -  total flux cleaned = 0.21822 Jy
! Total flux subtracted in 200 components = 0.21822 Jy
! Clean residual min=-0.019193 max=0.025381 Jy/beam
! Clean residual mean=0.001494 rms=0.006503 Jy/beam
! Combined flux in latest and established models = 1.37262 Jy
! Performing phase self-cal
! Adding 56 model components to the UV plane model.
! The established model now contains 78 components and 1.37262 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340585Jy  sigma=0.002522
! Fit after  self-cal, rms=0.339854Jy  sigma=0.002515
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        0.99     GC        1.03     HN        1.00*    
!   KK        0.92     KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.02     SC        1.00*    WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        1.01     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.03     ON        0.90     OV        1.00*    
!   PT        1.00*    SC        1.04     WF        1.00*    MC        1.01     
!   GN        1.06     
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.89     FD        0.99     GC        1.03     HN        0.96     
!   KK        1.07     KP        0.94     LA        0.96     MK        1.02     
!   NL        1.03     NY        1.14     ON        1.00*    OV        0.98     
!   PT        1.00     SC        1.07     WF        0.97     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.10     FD        1.04     GC        1.08     HN        1.00*    
!   KK        0.85     KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.99     SC        1.00*    WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        1.07     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.07     ON        0.92     OV        1.00*    
!   PT        1.00*    SC        1.01     WF        1.00*    MC        0.94     
!   GN        1.05     
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.90     FD        1.00     GC        1.05     HN        1.00     
!   KK        1.04     KP        0.95     LA        0.92     MK        1.01     
!   NL        1.04     NY        1.15     ON        1.00*    OV        0.97     
!   PT        1.00     SC        1.03     WF        0.98     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.16     FD        1.03     GC        1.00     HN        1.00*    
!   KK        0.91     KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.99     SC        1.00*    WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        0.99     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.01     ON        0.93     OV        1.00*    
!   PT        1.00*    SC        1.06     WF        1.00*    MC        0.98     
!   GN        1.06     
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        0.96     GC        1.03     HN        0.95     
!   KK        1.06     KP        0.97     LA        0.92     MK        1.03     
!   NL        1.03     NY        1.12     ON        1.00*    OV        0.93     
!   PT        0.99     SC        1.02     WF        0.94     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.01     GC        1.02     HN        1.00*    
!   KK        0.93     KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.93     SC        1.00*    WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        1.04     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.05     ON        0.94     OV        1.00*    
!   PT        1.00*    SC        1.01     WF        1.00*    MC        0.92     
!   GN        1.07     
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.91     FD        0.95     GC        1.04     HN        0.98     
!   KK        1.04     KP        0.95     LA        0.92     MK        0.99     
!   NL        1.03     NY        1.12     ON        1.00*    OV        0.95     
!   PT        0.96     SC        0.98     WF        0.95     MC        1.00*    
!   GN        1.00*    
! 
! 
! Fit before self-cal, rms=0.339854Jy  sigma=0.002515
! Fit after  self-cal, rms=0.331413Jy  sigma=0.002429
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.7149 mas, bmaj=1.407 mas, bpa=-9.544 degrees
! Estimated noise=450.225 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-3.2, 0.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.026703 Jy
! Component: 100  -  total flux cleaned = 0.0430703 Jy
! Component: 150  -  total flux cleaned = 0.0549951 Jy
! Component: 200  -  total flux cleaned = 0.0629315 Jy
! Total flux subtracted in 200 components = 0.0629315 Jy
! Clean residual min=-0.011651 max=0.019896 Jy/beam
! Clean residual mean=0.001016 rms=0.003725 Jy/beam
! Combined flux in latest and established models = 1.43555 Jy
! Performing phase self-cal
! Adding 51 model components to the UV plane model.
! The established model now contains 122 components and 1.43555 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.329267Jy  sigma=0.002396
! Fit after  self-cal, rms=0.329148Jy  sigma=0.002394
! Inverting map 
! Added new window around map position (-6.4, 0.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0185896 Jy
! Component: 100  -  total flux cleaned = 0.0298794 Jy
! Component: 150  -  total flux cleaned = 0.03879 Jy
! Component: 200  -  total flux cleaned = 0.044393 Jy
! Total flux subtracted in 200 components = 0.044393 Jy
! Clean residual min=-0.009572 max=0.015469 Jy/beam
! Clean residual mean=0.000840 rms=0.003156 Jy/beam
! Combined flux in latest and established models = 1.47995 Jy
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 150 components and 1.47995 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.327956Jy  sigma=0.002378
! Fit after  self-cal, rms=0.327868Jy  sigma=0.002378
! Inverting map 
selfcal true, true, soltime1
! Performing amp+phase self-cal over 120 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.327868Jy  sigma=0.002378
! Fit after  self-cal, rms=0.329173Jy  sigma=0.002376
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7154 mas, bmaj=1.408 mas, bpa=-9.53 degrees
! Estimated noise=450.295 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00884779 Jy
! Component: 100  -  total flux cleaned = 0.0153991 Jy
! Component: 150  -  total flux cleaned = 0.019418 Jy
! Component: 200  -  total flux cleaned = 0.0230647 Jy
! Total flux subtracted in 200 components = 0.0230647 Jy
! Clean residual min=-0.008672 max=0.013174 Jy/beam
! Clean residual mean=0.000674 rms=0.002911 Jy/beam
! Combined flux in latest and established models = 1.50301 Jy
selfcal
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 165 components and 1.50301 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328781Jy  sigma=0.002371
! Fit after  self-cal, rms=0.328801Jy  sigma=0.002371
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-8.6, 1.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0140451 Jy
! Component: 100  -  total flux cleaned = 0.0221984 Jy
! Component: 150  -  total flux cleaned = 0.0285866 Jy
! Component: 200  -  total flux cleaned = 0.0341674 Jy
! Total flux subtracted in 200 components = 0.0341674 Jy
! Clean residual min=-0.008027 max=0.009957 Jy/beam
! Clean residual mean=0.000549 rms=0.002557 Jy/beam
! Combined flux in latest and established models = 1.53718 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 186 components and 1.53718 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328156Jy  sigma=0.002362
! Fit after  self-cal, rms=0.328115Jy  sigma=0.002362
! Inverting map 
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328115Jy  sigma=0.002362
! Fit after  self-cal, rms=0.328897Jy  sigma=0.002361
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.716 mas, bmaj=1.409 mas, bpa=-9.455 degrees
! Estimated noise=450.77 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00608984 Jy
! Component: 100  -  total flux cleaned = 0.0102907 Jy
! Component: 150  -  total flux cleaned = 0.013741 Jy
! Component: 200  -  total flux cleaned = 0.0160532 Jy
! Total flux subtracted in 200 components = 0.0160532 Jy
! Clean residual min=-0.007801 max=0.009453 Jy/beam
! Clean residual mean=0.000496 rms=0.002432 Jy/beam
! Combined flux in latest and established models = 1.55323 Jy
selfcal
! Performing phase self-cal
! Adding 42 model components to the UV plane model.
! The established model now contains 197 components and 1.55323 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328682Jy  sigma=0.002359
! Fit after  self-cal, rms=0.328684Jy  sigma=0.002359
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00285658 Jy
! Component: 100  -  total flux cleaned = 0.00532219 Jy
! Component: 150  -  total flux cleaned = 0.00747796 Jy
! Component: 200  -  total flux cleaned = 0.00937162 Jy
! Total flux subtracted in 200 components = 0.00937162 Jy
! Clean residual min=-0.007701 max=0.009264 Jy/beam
! Clean residual mean=0.000459 rms=0.002367 Jy/beam
! Combined flux in latest and established models = 1.56261 Jy
! Performing phase self-cal
! Adding 51 model components to the UV plane model.
! The established model now contains 207 components and 1.56261 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328550Jy  sigma=0.002357
! Fit after  self-cal, rms=0.328545Jy  sigma=0.002357
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
win_mult = win_mult * 1.2
selfcal true, true, soltime2
! Performing amp+phase self-cal over 20 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328545Jy  sigma=0.002357
! Fit after  self-cal, rms=0.329186Jy  sigma=0.002357
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.06 mas, bmaj=2.309 mas, bpa=-4.804 degrees
! Estimated noise=642.154 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0124761 Jy
! Component: 100  -  total flux cleaned = 0.0208454 Jy
! Component: 150  -  total flux cleaned = 0.0270923 Jy
! Component: 200  -  total flux cleaned = 0.0320503 Jy
! Total flux subtracted in 200 components = 0.0320503 Jy
! Clean residual min=-0.016567 max=0.020709 Jy/beam
! Clean residual mean=0.001207 rms=0.006165 Jy/beam
! Combined flux in latest and established models = 1.59466 Jy
selfcal
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 222 components and 1.59466 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.329220Jy  sigma=0.002356
! Fit after  self-cal, rms=0.329192Jy  sigma=0.002356
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00498035 Jy
! Component: 100  -  total flux cleaned = 0.00693552 Jy
! Component: 150  -  total flux cleaned = 0.00823979 Jy
! Component: 200  -  total flux cleaned = 0.00929557 Jy
! Total flux subtracted in 200 components = 0.00929557 Jy
! Clean residual min=-0.016351 max=0.020588 Jy/beam
! Clean residual mean=0.001072 rms=0.006097 Jy/beam
! Combined flux in latest and established models = 1.60395 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 231 components and 1.60395 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.329209Jy  sigma=0.002356
! Fit after  self-cal, rms=0.329199Jy  sigma=0.002356
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
win_mult = win_mult / 1.2
print "************** FINISHED AMPLITUDE SELF-CAL **************"
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
restore
! Inverting map and beam 
! Estimated beam: bmin=0.7163 mas, bmaj=1.408 mas, bpa=-9.367 degrees
! Estimated noise=451.034 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7163 x 1.408 at -9.367 degrees (North through East)
! Clean map  min=-0.0071963  max=0.75258 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true
  clean clean_niter,clean_gain
  selfcal
  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
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true
  end if
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.329199Jy  sigma=0.002356
! Fit after  self-cal, rms=0.488619Jy  sigma=0.002189
! Inverting map and beam 
! Estimated beam: bmin=0.714 mas, bmaj=1.406 mas, bpa=-9.37 degrees
! Estimated noise=450.893 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000409877 Jy
! Component: 100  -  total flux cleaned = 0.000209109 Jy
! Component: 150  -  total flux cleaned = 0.000609842 Jy
! Component: 200  -  total flux cleaned = 0.00108748 Jy
! Total flux subtracted in 200 components = 0.00108748 Jy
! Clean residual min=-0.006818 max=0.009186 Jy/beam
! Clean residual mean=0.000416 rms=0.002195 Jy/beam
! Combined flux in latest and established models = 1.60504 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 245 components and 1.60504 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.488484Jy  sigma=0.002188
! Fit after  self-cal, rms=0.488504Jy  sigma=0.002188
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000708011 Jy
! Component: 100  -  total flux cleaned = 0.00113736 Jy
! Component: 150  -  total flux cleaned = 0.00134098 Jy
! Component: 200  -  total flux cleaned = 0.00189998 Jy
! Total flux subtracted in 200 components = 0.00189998 Jy
! Clean residual min=-0.006747 max=0.009146 Jy/beam
! Clean residual mean=0.000410 rms=0.002174 Jy/beam
! Combined flux in latest and established models = 1.60694 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 247 components and 1.60694 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.488444Jy  sigma=0.002187
! Fit after  self-cal, rms=0.488458Jy  sigma=0.002187
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.488458Jy  sigma=0.002187
! Fit after  self-cal, rms=0.736647Jy  sigma=0.002187
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 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.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.6588 mas, bmaj=1.194 mas, bpa=-9.085 degrees
! Estimated noise=820.952 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.565851 Jy
! Component: 100  -  total flux cleaned = 0.784096 Jy
! Component: 150  -  total flux cleaned = 0.917566 Jy
! Component: 200  -  total flux cleaned = 1.012 Jy
! Total flux subtracted in 200 components = 1.012 Jy
! Clean residual min=-0.027131 max=0.053616 Jy/beam
! Clean residual mean=0.000747 rms=0.008476 Jy/beam
! Combined flux in latest and established models = 1.012 Jy
uvw 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.
flux_cutoff = imstat(rms) * dynam
! Adding 25 model components to the UV plane model.
! The established model now contains 25 components and 1.012 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.7138 mas, bmaj=1.407 mas, bpa=-9.294 degrees
! Estimated noise=450.834 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.106906 Jy
! Component: 100  -  total flux cleaned = 0.182351 Jy
! Component: 150  -  total flux cleaned = 0.238271 Jy
! Component: 200  -  total flux cleaned = 0.280592 Jy
! Total flux subtracted in 200 components = 0.280592 Jy
! Clean residual min=-0.015790 max=0.024577 Jy/beam
! Clean residual mean=0.001598 rms=0.005671 Jy/beam
! Combined flux in latest and established models = 1.29259 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 61 components and 1.29259 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0330993 Jy
! Component: 100  -  total flux cleaned = 0.060301 Jy
! Component: 150  -  total flux cleaned = 0.0832566 Jy
! Component: 200  -  total flux cleaned = 0.103154 Jy
! Total flux subtracted in 200 components = 0.103154 Jy
! Clean residual min=-0.011259 max=0.016358 Jy/beam
! Clean residual mean=0.001192 rms=0.003915 Jy/beam
! Combined flux in latest and established models = 1.39574 Jy
! Adding 56 model components to the UV plane model.
! The established model now contains 104 components and 1.39574 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.059 mas, bmaj=2.308 mas, bpa=-4.487 degrees
! Estimated noise=644.492 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0491455 Jy
! Component: 100  -  total flux cleaned = 0.0846681 Jy
! Component: 150  -  total flux cleaned = 0.111965 Jy
! Component: 200  -  total flux cleaned = 0.133563 Jy
! Total flux subtracted in 200 components = 0.133563 Jy
! Clean residual min=-0.017948 max=0.018750 Jy/beam
! Clean residual mean=0.002361 rms=0.006989 Jy/beam
! Combined flux in latest and established models = 1.52931 Jy
flux_cutoff = imstat(rms) * dynam
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0174811 Jy
! Component: 100  -  total flux cleaned = 0.03181 Jy
! Component: 150  -  total flux cleaned = 0.0435956 Jy
! Component: 200  -  total flux cleaned = 0.0533041 Jy
! Total flux subtracted in 200 components = 0.0533041 Jy
! Clean residual min=-0.016740 max=0.019285 Jy/beam
! Clean residual mean=0.001635 rms=0.006053 Jy/beam
! Combined flux in latest and established models = 1.58261 Jy
! Adding 114 model components to the UV plane model.
! The established model now contains 191 components and 1.58261 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.7138 mas, bmaj=1.407 mas, bpa=-9.294 degrees
! Estimated noise=450.834 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00388052 Jy
! Component: 100  -  total flux cleaned = 0.00685759 Jy
! Component: 150  -  total flux cleaned = 0.00851401 Jy
! Component: 200  -  total flux cleaned = 0.0104426 Jy
! Total flux subtracted in 200 components = 0.0104426 Jy
! Clean residual min=-0.008138 max=0.008798 Jy/beam
! Clean residual mean=0.000421 rms=0.002305 Jy/beam
! Combined flux in latest and established models = 1.59305 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 205 components and 1.59305 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.736954Jy  sigma=0.002192
! Fit after  self-cal, rms=0.736913Jy  sigma=0.002191
wmodel J1230+1223_X_1998_10_01_pus_map.mod
! Writing 205 model components to file: J1230+1223_X_1998_10_01_pus_map.mod
wobs J1230+1223_X_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1230+1223_X_1998_10_01_pus_uvs.fits
wwins J1230+1223_X_1998_10_01_pus_map.win
! wwins: Wrote 6 windows to J1230+1223_X_1998_10_01_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.003751 Jy
! Component: 100  -  total flux cleaned = 0.00490659 Jy
! Component: 150  -  total flux cleaned = 0.00614274 Jy
! Component: 200  -  total flux cleaned = 0.00719621 Jy
! Component: 250  -  total flux cleaned = 0.00808535 Jy
! Component: 300  -  total flux cleaned = 0.00906633 Jy
! Component: 350  -  total flux cleaned = 0.00990006 Jy
! Component: 400  -  total flux cleaned = 0.010825 Jy
! Component: 450  -  total flux cleaned = 0.0117225 Jy
! Component: 500  -  total flux cleaned = 0.0125978 Jy
! Component: 550  -  total flux cleaned = 0.0136641 Jy
! Component: 600  -  total flux cleaned = 0.0144977 Jy
! Component: 650  -  total flux cleaned = 0.0156164 Jy
! Component: 700  -  total flux cleaned = 0.0166095 Jy
! Component: 750  -  total flux cleaned = 0.0177768 Jy
! Component: 800  -  total flux cleaned = 0.018733 Jy
! Component: 850  -  total flux cleaned = 0.0196735 Jy
! Component: 900  -  total flux cleaned = 0.0207787 Jy
! Component: 950  -  total flux cleaned = 0.0217736 Jy
! Component: 1000  -  total flux cleaned = 0.0226635 Jy
! Component: 1050  -  total flux cleaned = 0.0236268 Jy
! Component: 1100  -  total flux cleaned = 0.0244033 Jy
! Component: 1150  -  total flux cleaned = 0.0254245 Jy
! Component: 1200  -  total flux cleaned = 0.0264288 Jy
! Component: 1250  -  total flux cleaned = 0.0273336 Jy
! Component: 1300  -  total flux cleaned = 0.0282257 Jy
! Component: 1350  -  total flux cleaned = 0.0289454 Jy
! Component: 1400  -  total flux cleaned = 0.0298125 Jy
! Component: 1450  -  total flux cleaned = 0.0305882 Jy
! Component: 1500  -  total flux cleaned = 0.0311247 Jy
! Component: 1550  -  total flux cleaned = 0.0317304 Jy
! Component: 1600  -  total flux cleaned = 0.0326261 Jy
! Component: 1650  -  total flux cleaned = 0.0333615 Jy
! Component: 1700  -  total flux cleaned = 0.0340163 Jy
! Component: 1750  -  total flux cleaned = 0.034734 Jy
! Component: 1800  -  total flux cleaned = 0.0355144 Jy
! Component: 1850  -  total flux cleaned = 0.0363544 Jy
! Component: 1900  -  total flux cleaned = 0.036977 Jy
! Component: 1950  -  total flux cleaned = 0.0378658 Jy
! Component: 2000  -  total flux cleaned = 0.038407 Jy
! Total flux subtracted in 2048 components = 0.0392763 Jy
! Clean residual min=-0.003988 max=0.004008 Jy/beam
! Clean residual mean=0.000288 rms=0.001299 Jy/beam
! Combined flux in latest and established models = 1.63233 Jy
keep
! Adding 174 model components to the UV plane model.
! The established model now contains 379 components and 1.63233 Jy
![Exited script file: muppet]
wmap "J1230+1223_X_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7138 x 1.407 at -9.294 degrees (North through East)
! Clean map  min=-0.0050309  max=0.75223 Jy/beam
! Writing clean map to FITS file: J1230+1223_X_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.752226 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00129232 
device "J1230+1223_X_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1230+1223_X_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.515397 0.515397 1.03079 2.06159 4.12318 8.24635 16.4927 32.9854 65.9708
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0038 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.752 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7138 x 1.407 at -9.294 degrees (North through East)
! Clean map  min=-0.0050309  max=0.75223 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1230+1223_X_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1230+1223_X_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1230+1223_X_1998_10_01_pus_uvs.log closed on Wed Feb  6 13:03:33 2008