! Started logfile: J0121+1149_S_2001_07_05_pus_uvs.log on Thu Aug  9 23:44:12 2007
obs J0121+1149_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0121+1149_S_2001_07_05_pus_uva.fits
! AN table 1: 71 integrations on 171 of 171 possible baselines.
! AN table 2: 13 integrations on 171 of 171 possible baselines.
! AN table 3: 149 integrations on 171 of 171 possible baselines.
! AN table 4: 99 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.127968 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0121+1149
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! 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.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1774 lines of history.
! 
! Reading 29060 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.5 
print "taper_size =",taper_size
! taper_size = 20 
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.500x0.500 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 793 telescope corrections were flagged in sub-array 1.
!  A total of 142 telescope corrections were flagged in sub-array 2.
!  A total of 2126 telescope corrections were flagged in sub-array 3.
!  A total of 1571 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 793 telescope corrections were flagged in sub-array 1.
!  A total of 142 telescope corrections were flagged in sub-array 2.
!  A total of 2126 telescope corrections were flagged in sub-array 3.
!  A total of 1571 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 793 telescope corrections were flagged in sub-array 1.
!  A total of 142 telescope corrections were flagged in sub-array 2.
!  A total of 2126 telescope corrections were flagged in sub-array 3.
!  A total of 1571 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 793 telescope corrections were flagged in sub-array 1.
!  A total of 142 telescope corrections were flagged in sub-array 2.
!  A total of 2126 telescope corrections were flagged in sub-array 3.
!  A total of 1630 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.757786Jy  sigma=0.006503
! Fit after  self-cal, rms=0.324041Jy  sigma=0.002629
! 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=1.99 mas, bmaj=3.953 mas, bpa=2.097 degrees
! Estimated noise=911.943 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.890745 Jy
! Component: 100  -  total flux cleaned = 1.09921 Jy
! Total flux subtracted in 100 components = 1.09921 Jy
! Clean residual min=-0.027060 max=0.074874 Jy/beam
! Clean residual mean=0.000139 rms=0.007062 Jy/beam
! Combined flux in latest and established models = 1.09921 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 1.09921 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284280Jy  sigma=0.002193
! Fit after  self-cal, rms=0.284295Jy  sigma=0.002193
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0814449 Jy
! Component: 100  -  total flux cleaned = 0.126506 Jy
! Total flux subtracted in 100 components = 0.126506 Jy
! Clean residual min=-0.022899 max=0.028548 Jy/beam
! Clean residual mean=0.000003 rms=0.005352 Jy/beam
! Combined flux in latest and established models = 1.22572 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 19 components and 1.22572 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.262770Jy  sigma=0.001924
! Fit after  self-cal, rms=0.262771Jy  sigma=0.001923
! 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=2.518 mas, bmaj=5.041 mas, bpa=-0.9135 degrees
! Estimated noise=508.591 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.5, 19.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0381705 Jy
! Component: 100  -  total flux cleaned = 0.0605025 Jy
! Component: 150  -  total flux cleaned = 0.0770663 Jy
! Component: 200  -  total flux cleaned = 0.0898265 Jy
! Total flux subtracted in 200 components = 0.0898265 Jy
! Clean residual min=-0.020076 max=0.018624 Jy/beam
! Clean residual mean=0.000631 rms=0.004810 Jy/beam
! Combined flux in latest and established models = 1.31554 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 43 components and 1.31554 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256871Jy  sigma=0.001854
! Fit after  self-cal, rms=0.256193Jy  sigma=0.001847
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.00     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.00     KP        1.07     
!   LA        1.01     MC        1.00*    MK        1.02     NL        0.99     
!   NY        1.06     OV        0.97     PT        0.97     SC        0.97     
!   TS        1.00*    WF        0.97     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.07     FD        1.02     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.02     
!   LA        1.10     MC        1.00*    MK        0.99     NL        1.00*    
!   NY        1.00*    OV        0.98     PT        0.98     SC        1.00*    
!   TS        0.92     WF        1.00*    WZ        1.00*    
! 
!  A total of 225 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.06     FD        1.04     GC        1.00*    GG        1.00*    
!   HH        1.06     HN        0.97     KK        1.00*    KP        1.04     
!   LA        1.08     MC        0.95     MK        1.00*    NL        1.02     
!   NY        1.02     OV        1.05     PT        1.02     SC        0.99     
!   TS        1.00*    WF        0.98     WZ        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.94     FD        0.96     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.97     KP        1.00     
!   LA        0.97     MC        1.00*    MK        0.96     NL        0.98     
!   NY        1.00*    OV        0.92     PT        0.94     SC        1.00     
!   TS        1.00*    WF        1.00     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.01     GC        0.95     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        0.99     KP        0.83     
!   LA        0.97     MC        1.00*    MK        1.01     NL        0.97     
!   NY        1.09     OV        1.00     PT        1.01     SC        1.00     
!   TS        1.00*    WF        0.93     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        1.04     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        0.98     
!   LA        1.06     MC        1.00*    MK        0.97     NL        1.00*    
!   NY        1.00*    OV        1.02     PT        1.01     SC        1.00*    
!   TS        0.91     WF        1.00*    WZ        1.00*    
! 
!  A total of 225 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.06     FD        1.04     GC        1.00*    GG        1.00*    
!   HH        1.12     HN        0.96     KK        1.00*    KP        1.13     
!   LA        1.03     MC        0.91     MK        1.00*    NL        1.00     
!   NY        1.03     OV        1.07     PT        1.03     SC        1.01     
!   TS        1.00*    WF        0.98     WZ        0.99     
! 
!  A total of 30 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        0.98     GC        0.93     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.98     KP        0.65     
!   LA        0.92     MC        1.00*    MK        0.95     NL        0.95     
!   NY        1.00*    OV        0.93     PT        0.95     SC        1.03     
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.99     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.05     KP        1.08     
!   LA        1.02     MC        1.00*    MK        1.04     NL        1.01     
!   NY        1.09     OV        0.97     PT        0.96     SC        0.99     
!   TS        1.00*    WF        0.95     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.06     FD        1.01     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.06     
!   LA        1.10     MC        1.00*    MK        1.01     NL        1.00*    
!   NY        1.00*    OV        1.04     PT        1.03     SC        1.00*    
!   TS        0.95     WF        1.00*    WZ        1.00*    
! 
!  A total of 225 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.07     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        1.15     HN        1.04     KK        1.00*    KP        1.11     
!   LA        1.01     MC        1.60     MK        1.00*    NL        1.03     
!   NY        1.05     OV        1.08     PT        0.98     SC        0.97     
!   TS        1.00*    WF        0.98     WZ        1.01     
! 
!  A total of 30 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.97     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.01     KP        0.97     
!   LA        0.97     MC        1.00*    MK        0.98     NL        1.01     
!   NY        1.00*    OV        1.00     PT        1.01     SC        1.03     
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 21 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.00     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        1.00     KP        1.07     
!   LA        1.00     MC        1.00*    MK        1.03     NL        0.99     
!   NY        1.10     OV        1.01     PT        0.88     SC        1.00     
!   TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        1.03     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.06     
!   LA        1.08     MC        1.00*    MK        1.00     NL        1.00*    
!   NY        1.00*    OV        0.96     PT        1.06     SC        1.00*    
!   TS        0.96     WF        1.00*    WZ        1.00*    
! 
!  A total of 225 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.03     GC        1.00*    GG        1.00*    
!   HH        1.13     HN        0.93     KK        1.00*    KP        1.09     
!   LA        1.01     MC        1.95     MK        1.00*    NL        1.02     
!   NY        1.04     OV        1.08     PT        1.03     SC        1.00     
!   TS        1.00*    WF        1.00     WZ        0.99     
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        0.96     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.98     KP        0.98     
!   LA        0.98     MC        1.00*    MK        0.97     NL        0.99     
!   NY        1.00*    OV        0.95     PT        1.08     SC        1.02     
!   TS        1.00*    WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.256193Jy  sigma=0.001847
! Fit after  self-cal, rms=0.257232Jy  sigma=0.001461
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.555 mas, bmaj=5.178 mas, bpa=-1.768 degrees
! Estimated noise=510.792 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 (10, 32).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0177198 Jy
! Component: 100  -  total flux cleaned = 0.0291649 Jy
! Component: 150  -  total flux cleaned = 0.0371879 Jy
! Component: 200  -  total flux cleaned = 0.041846 Jy
! Total flux subtracted in 200 components = 0.041846 Jy
! Clean residual min=-0.004820 max=0.006178 Jy/beam
! Clean residual mean=0.000176 rms=0.001321 Jy/beam
! Combined flux in latest and established models = 1.35739 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 83 components and 1.35739 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.255850Jy  sigma=0.001439
! Fit after  self-cal, rms=0.256570Jy  sigma=0.001438
! 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.256570Jy  sigma=0.001438
! Fit after  self-cal, rms=0.258121Jy  sigma=0.001437
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.556 mas, bmaj=5.182 mas, bpa=-1.791 degrees
! Estimated noise=510.182 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00406028 Jy
! Component: 100  -  total flux cleaned = 0.00717908 Jy
! Component: 150  -  total flux cleaned = 0.00968953 Jy
! Component: 200  -  total flux cleaned = 0.0112471 Jy
! Total flux subtracted in 200 components = 0.0112471 Jy
! Clean residual min=-0.003898 max=0.005443 Jy/beam
! Clean residual mean=0.000137 rms=0.001105 Jy/beam
! Combined flux in latest and established models = 1.36864 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 97 components and 1.36864 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257825Jy  sigma=0.001433
! Fit after  self-cal, rms=0.257828Jy  sigma=0.001433
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 (17, 34).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00488925 Jy
! Component: 100  -  total flux cleaned = 0.00682263 Jy
! Component: 150  -  total flux cleaned = 0.00812807 Jy
! Component: 200  -  total flux cleaned = 0.0088752 Jy
! Total flux subtracted in 200 components = 0.0088752 Jy
! Clean residual min=-0.003516 max=0.004044 Jy/beam
! Clean residual mean=0.000089 rms=0.000983 Jy/beam
! Combined flux in latest and established models = 1.37751 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 111 components and 1.37751 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257643Jy  sigma=0.001431
! Fit after  self-cal, rms=0.257635Jy  sigma=0.001431
! 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.257635Jy  sigma=0.001431
! Fit after  self-cal, rms=0.258514Jy  sigma=0.001431
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.559 mas, bmaj=5.182 mas, bpa=-1.765 degrees
! Estimated noise=509.923 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00138843 Jy
! Component: 100  -  total flux cleaned = -0.000266579 Jy
! Component: 150  -  total flux cleaned = 0.000640118 Jy
! Component: 200  -  total flux cleaned = 0.00128494 Jy
! Total flux subtracted in 200 components = 0.00128494 Jy
! Clean residual min=-0.003292 max=0.004094 Jy/beam
! Clean residual mean=0.000100 rms=0.000932 Jy/beam
! Combined flux in latest and established models = 1.3788 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 119 components and 1.3788 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258395Jy  sigma=0.001430
! Fit after  self-cal, rms=0.258399Jy  sigma=0.001430
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 (42, 56).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0042971 Jy
! Component: 100  -  total flux cleaned = 0.00582335 Jy
! Component: 150  -  total flux cleaned = 0.00665048 Jy
! Component: 200  -  total flux cleaned = 0.00716095 Jy
! Total flux subtracted in 200 components = 0.00716095 Jy
! Clean residual min=-0.002989 max=0.003386 Jy/beam
! Clean residual mean=0.000064 rms=0.000864 Jy/beam
! Combined flux in latest and established models = 1.38596 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 135 components and 1.38596 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258263Jy  sigma=0.001429
! Fit after  self-cal, rms=0.258262Jy  sigma=0.001429
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 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.258262Jy  sigma=0.001429
! Fit after  self-cal, rms=0.258716Jy  sigma=0.001428
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.351 mas, bmaj=9.995 mas, bpa=-3.241 degrees
! Estimated noise=663.575 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00232188 Jy
! Component: 100  -  total flux cleaned = 0.00379444 Jy
! Component: 150  -  total flux cleaned = 0.00490804 Jy
! Component: 200  -  total flux cleaned = 0.00540984 Jy
! Total flux subtracted in 200 components = 0.00540984 Jy
! Clean residual min=-0.002468 max=0.003282 Jy/beam
! Clean residual mean=0.000122 rms=0.001031 Jy/beam
! Combined flux in latest and established models = 1.39137 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 156 components and 1.39137 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258688Jy  sigma=0.001428
! Fit after  self-cal, rms=0.258680Jy  sigma=0.001428
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.000393126 Jy
! Component: 100  -  total flux cleaned = 0.000554798 Jy
! Component: 150  -  total flux cleaned = 0.000651105 Jy
! Component: 200  -  total flux cleaned = 0.000820085 Jy
! Total flux subtracted in 200 components = 0.000820085 Jy
! Clean residual min=-0.002541 max=0.003216 Jy/beam
! Clean residual mean=0.000114 rms=0.001007 Jy/beam
! Combined flux in latest and established models = 1.39219 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 163 components and 1.39219 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258672Jy  sigma=0.001428
! Fit after  self-cal, rms=0.258670Jy  sigma=0.001428
! 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=2.561 mas, bmaj=5.183 mas, bpa=-1.743 degrees
! Estimated noise=509.781 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.561 x 5.183 at -1.743 degrees (North through East)
! Clean map  min=-0.0029307  max=1.1652 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.258670Jy  sigma=0.001428
! Fit after  self-cal, rms=0.349674Jy  sigma=0.001304
! Inverting map and beam 
! Estimated beam: bmin=2.562 mas, bmaj=5.191 mas, bpa=-1.781 degrees
! Estimated noise=509.406 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00185876 Jy
! Component: 100  -  total flux cleaned = -0.00242797 Jy
! Component: 150  -  total flux cleaned = -0.00280387 Jy
! Component: 200  -  total flux cleaned = -0.00308761 Jy
! Total flux subtracted in 200 components = -0.00308761 Jy
! Clean residual min=-0.002687 max=0.002956 Jy/beam
! Clean residual mean=0.000100 rms=0.000756 Jy/beam
! Combined flux in latest and established models = 1.3891 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 175 components and 1.3891 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349613Jy  sigma=0.001304
! Fit after  self-cal, rms=0.349607Jy  sigma=0.001304
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -6.56391e-05 Jy
! Component: 100  -  total flux cleaned = -0.000196712 Jy
! Component: 150  -  total flux cleaned = -0.000197145 Jy
! Component: 200  -  total flux cleaned = -0.000196807 Jy
! Total flux subtracted in 200 components = -0.000196807 Jy
! Clean residual min=-0.002654 max=0.002948 Jy/beam
! Clean residual mean=0.000101 rms=0.000747 Jy/beam
! Combined flux in latest and established models = 1.3889 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 185 components and 1.3889 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349575Jy  sigma=0.001303
! Fit after  self-cal, rms=0.349567Jy  sigma=0.001303
! 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.349567Jy  sigma=0.001303
! Fit after  self-cal, rms=0.362551Jy  sigma=0.001303
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=2.044 mas, bmaj=4.051 mas, bpa=1.342 degrees
! Estimated noise=935.7 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.895408 Jy
! Component: 100  -  total flux cleaned = 1.09698 Jy
! Component: 150  -  total flux cleaned = 1.16317 Jy
! Component: 200  -  total flux cleaned = 1.19571 Jy
! Total flux subtracted in 200 components = 1.19571 Jy
! Clean residual min=-0.009117 max=0.017565 Jy/beam
! Clean residual mean=0.000140 rms=0.002724 Jy/beam
! Combined flux in latest and established models = 1.19571 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 16 model components to the UV plane model.
! The established model now contains 16 components and 1.19571 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.564 mas, bmaj=5.191 mas, bpa=-1.769 degrees
! Estimated noise=509.374 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.0367103 Jy
! Component: 100  -  total flux cleaned = 0.0625921 Jy
! Component: 150  -  total flux cleaned = 0.082901 Jy
! Component: 200  -  total flux cleaned = 0.0993629 Jy
! Total flux subtracted in 200 components = 0.0993629 Jy
! Clean residual min=-0.005421 max=0.011420 Jy/beam
! Clean residual mean=0.000629 rms=0.002254 Jy/beam
! Combined flux in latest and established models = 1.29507 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 65 components and 1.29507 Jy
! Inverting map 
! Added new window around map position (7, 22.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.013887 Jy
! Component: 100  -  total flux cleaned = 0.0252775 Jy
! Component: 150  -  total flux cleaned = 0.0349114 Jy
! Component: 200  -  total flux cleaned = 0.0430755 Jy
! Total flux subtracted in 200 components = 0.0430755 Jy
! Clean residual min=-0.003965 max=0.005805 Jy/beam
! Clean residual mean=0.000383 rms=0.001351 Jy/beam
! Combined flux in latest and established models = 1.33815 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 92 components and 1.33815 Jy
! Inverting map 
! Added new window around map position (0.5, 10.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00715537 Jy
! Component: 100  -  total flux cleaned = 0.013284 Jy
! Component: 150  -  total flux cleaned = 0.0186802 Jy
! Component: 200  -  total flux cleaned = 0.0234496 Jy
! Total flux subtracted in 200 components = 0.0234496 Jy
! Clean residual min=-0.003133 max=0.004004 Jy/beam
! Clean residual mean=0.000249 rms=0.000992 Jy/beam
! Combined flux in latest and established models = 1.3616 Jy
! Adding 50 model components to the UV plane model.
! The established model now contains 117 components and 1.3616 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.35 mas, bmaj=9.994 mas, bpa=-3.266 degrees
! Estimated noise=662.337 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00745902 Jy
! Component: 100  -  total flux cleaned = 0.0123884 Jy
! Component: 150  -  total flux cleaned = 0.0160744 Jy
! Component: 200  -  total flux cleaned = 0.0189626 Jy
! Total flux subtracted in 200 components = 0.0189626 Jy
! Clean residual min=-0.002371 max=0.003462 Jy/beam
! Clean residual mean=0.000398 rms=0.001099 Jy/beam
! Combined flux in latest and established models = 1.38056 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.00229202 Jy
! Component: 100  -  total flux cleaned = 0.00414655 Jy
! Component: 150  -  total flux cleaned = 0.00514487 Jy
! Component: 200  -  total flux cleaned = 0.00600892 Jy
! Total flux subtracted in 200 components = 0.00600892 Jy
! Clean residual min=-0.002450 max=0.003250 Jy/beam
! Clean residual mean=0.000306 rms=0.000963 Jy/beam
! Combined flux in latest and established models = 1.38657 Jy
! Adding 128 model components to the UV plane model.
! The established model now contains 234 components and 1.38657 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.564 mas, bmaj=5.191 mas, bpa=-1.769 degrees
! Estimated noise=509.374 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000522283 Jy
! Component: 100  -  total flux cleaned = 0.000166487 Jy
! Component: 150  -  total flux cleaned = 0.000479468 Jy
! Component: 200  -  total flux cleaned = 0.000477884 Jy
! Total flux subtracted in 200 components = 0.000477884 Jy
! Clean residual min=-0.002846 max=0.002941 Jy/beam
! Clean residual mean=0.000112 rms=0.000749 Jy/beam
! Combined flux in latest and established models = 1.38705 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 241 components and 1.38705 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.362867Jy  sigma=0.001304
! Fit after  self-cal, rms=0.362870Jy  sigma=0.001304
wmodel J0121+1149_S_2001_07_05_pus_map.mod
! Writing 241 model components to file: J0121+1149_S_2001_07_05_pus_map.mod
wobs J0121+1149_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0121+1149_S_2001_07_05_pus_uvs.fits
wwins J0121+1149_S_2001_07_05_pus_map.win
! wwins: Wrote 7 windows to J0121+1149_S_2001_07_05_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.000921222 Jy
! Component: 100  -  total flux cleaned = 0.00163008 Jy
! Component: 150  -  total flux cleaned = 0.00206217 Jy
! Component: 200  -  total flux cleaned = 0.0024804 Jy
! Component: 250  -  total flux cleaned = 0.00293182 Jy
! Component: 300  -  total flux cleaned = 0.00328425 Jy
! Component: 350  -  total flux cleaned = 0.00367297 Jy
! Component: 400  -  total flux cleaned = 0.00409594 Jy
! Component: 450  -  total flux cleaned = 0.00442863 Jy
! Component: 500  -  total flux cleaned = 0.00475692 Jy
! Component: 550  -  total flux cleaned = 0.00512064 Jy
! Component: 600  -  total flux cleaned = 0.00551949 Jy
! Component: 650  -  total flux cleaned = 0.00591266 Jy
! Component: 700  -  total flux cleaned = 0.00614656 Jy
! Component: 750  -  total flux cleaned = 0.00641583 Jy
! Component: 800  -  total flux cleaned = 0.006682 Jy
! Component: 850  -  total flux cleaned = 0.00690769 Jy
! Component: 900  -  total flux cleaned = 0.00716838 Jy
! Component: 950  -  total flux cleaned = 0.00731594 Jy
! Component: 1000  -  total flux cleaned = 0.00764533 Jy
! Component: 1050  -  total flux cleaned = 0.00771723 Jy
! Component: 1100  -  total flux cleaned = 0.00789774 Jy
! Component: 1150  -  total flux cleaned = 0.00818335 Jy
! Component: 1200  -  total flux cleaned = 0.00836057 Jy
! Component: 1250  -  total flux cleaned = 0.00864121 Jy
! Component: 1300  -  total flux cleaned = 0.00871082 Jy
! Component: 1350  -  total flux cleaned = 0.0088838 Jy
! Component: 1400  -  total flux cleaned = 0.00902126 Jy
! Component: 1450  -  total flux cleaned = 0.00919214 Jy
! Component: 1500  -  total flux cleaned = 0.00929383 Jy
! Component: 1550  -  total flux cleaned = 0.00942847 Jy
! Component: 1600  -  total flux cleaned = 0.00959587 Jy
! Component: 1650  -  total flux cleaned = 0.0096955 Jy
! Component: 1700  -  total flux cleaned = 0.00986087 Jy
! Component: 1750  -  total flux cleaned = 0.00992638 Jy
! Component: 1800  -  total flux cleaned = 0.00999192 Jy
! Component: 1850  -  total flux cleaned = 0.0102196 Jy
! Component: 1900  -  total flux cleaned = 0.0103489 Jy
! Component: 1950  -  total flux cleaned = 0.0104451 Jy
! Component: 2000  -  total flux cleaned = 0.010573 Jy
! Total flux subtracted in 2048 components = 0.0105729 Jy
! Clean residual min=-0.001696 max=0.001670 Jy/beam
! Clean residual mean=0.000058 rms=0.000590 Jy/beam
! Combined flux in latest and established models = 1.39762 Jy
keep
! Adding 149 model components to the UV plane model.
! The established model now contains 388 components and 1.39762 Jy
wmap "J0121+1149_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.564 x 5.191 at -1.769 degrees (North through East)
! Clean map  min=-0.0024767  max=1.1665 Jy/beam
! Writing clean map to FITS file: J0121+1149_S_2001_07_05_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.16652 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000588321 
device "J0121+1149_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0121+1149_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.151302 0.151302 0.302603 0.605207 1.21041 2.42083 4.84165 9.6833 19.3666 38.7332 77.4664
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.166 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.564 x 5.191 at -1.769 degrees (North through East)
! Clean map  min=-0.0024767  max=1.1665 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0121+1149_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0121+1149_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0121+1149_S_2001_07_05_pus_uvs.log closed on Thu Aug  9 23:46:09 2007