! Started logfile: J1159+2914_X_2000_12_04_pus_uvs.log on Fri Oct 12 15:23:22 2007
obs J1159+2914_X_2000_12_04_pus_uva.fits
! Reading UV FITS file: J1159+2914_X_2000_12_04_pus_uva.fits
! AN table 1: 50 integrations on 190 of 190 possible baselines.
! AN table 2: 286 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.127052 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1159+2914
! 
! 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 2126 lines of history.
! 
! Reading 32444 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 = 256 
print "field_cell =",field_cell
! field_cell = 0.2 
print "taper_size =",taper_size
! taper_size = 70 
![@muppet J1159+2914_X_2000_12_04_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 = 256x256 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 762 telescope corrections were flagged in sub-array 1.
!  A total of 4059 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 762 telescope corrections were flagged in sub-array 1.
!  A total of 4059 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 762 telescope corrections were flagged in sub-array 1.
!  A total of 4059 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 762 telescope corrections were flagged in sub-array 1.
!  A total of 4059 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.688050Jy  sigma=0.006147
! Fit after  self-cal, rms=0.485624Jy  sigma=0.004017
! 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 
! Your choice of large map pixels excluded 4.09% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.4848 mas, bmaj=0.9899 mas, bpa=-8.725 degrees
! Estimated noise=988.881 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.40519 Jy
! Component: 100  -  total flux cleaned = 0.549407 Jy
! Total flux subtracted in 100 components = 0.549407 Jy
! Clean residual min=-0.019836 max=0.069786 Jy/beam
! Clean residual mean=0.000717 rms=0.007245 Jy/beam
! Combined flux in latest and established models = 0.549407 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.549407 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.266559Jy  sigma=0.002170
! Fit after  self-cal, rms=0.266184Jy  sigma=0.002168
! Inverting map 
! Your choice of large map pixels excluded 4.09% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0802777 Jy
! Component: 100  -  total flux cleaned = 0.126392 Jy
! Total flux subtracted in 100 components = 0.126392 Jy
! Clean residual min=-0.013987 max=0.025819 Jy/beam
! Clean residual mean=0.000496 rms=0.004227 Jy/beam
! Combined flux in latest and established models = 0.675798 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 11 components and 0.675799 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225203Jy  sigma=0.001642
! Fit after  self-cal, rms=0.225050Jy  sigma=0.001641
! Inverting map 
! Your choice of large map pixels excluded 4.09% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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 
! Your choice of large map pixels excluded 4.09% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5776 mas, bmaj=1.277 mas, bpa=-5.536 degrees
! Estimated noise=468.967 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.0629294 Jy
! Component: 100  -  total flux cleaned = 0.0950923 Jy
! Component: 150  -  total flux cleaned = 0.11204 Jy
! Component: 200  -  total flux cleaned = 0.121009 Jy
! Total flux subtracted in 200 components = 0.121009 Jy
! Clean residual min=-0.009376 max=0.019163 Jy/beam
! Clean residual mean=0.002669 rms=0.004572 Jy/beam
! Combined flux in latest and established models = 0.796808 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 20 components and 0.796808 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.210838Jy  sigma=0.001431
! Fit after  self-cal, rms=0.210777Jy  sigma=0.001430
! Inverting map 
! Your choice of large map pixels excluded 4.09% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.12     FD        1.13     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.08     
!   LA        1.14     MA        1.00*    MC        1.00*    MK        1.03     
!   NL        1.18     NY        1.08     OV        1.07     PT        1.06     
!   SC        1.00*    TS        1.05     WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.02     GC        1.13     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        1.01     
!   LA        0.97     MA        0.98     MC        0.96     MK        1.00*    
!   NL        0.98     NY        0.98     OV        1.05     PT        0.97     
!   SC        1.00     TS        1.00*    WF        1.01     WZ        1.01     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.12     FD        1.15     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.06     
!   LA        1.12     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        1.10     NY        1.12     OV        1.10     PT        1.06     
!   SC        1.00*    TS        1.04     WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.01     GC        1.12     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        1.01     
!   LA        0.97     MA        0.98     MC        0.98     MK        1.00*    
!   NL        0.93     NY        0.96     OV        1.05     PT        0.96     
!   SC        1.00     TS        1.00*    WF        1.01     WZ        1.01     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.09     FD        1.19     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.06     
!   LA        1.13     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        1.11     NY        1.13     OV        1.02     PT        1.04     
!   SC        1.00*    TS        1.18     WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.05     GC        1.09     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00*    KP        1.00     
!   LA        0.96     MA        0.94     MC        0.97     MK        1.00*    
!   NL        0.93     NY        0.96     OV        1.01     PT        0.94     
!   SC        0.98     TS        1.00*    WF        1.00     WZ        1.03     
! 
! 
! Correcting IF 4.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.12     FD        1.19     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.08     
!   LA        1.14     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        1.11     NY        1.13     OV        1.09     PT        1.01     
!   SC        1.00*    TS        1.15     WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.04     GC        1.15     GG        1.00*    
!   HH        1.00*    HN        0.91     KK        1.00*    KP        1.00     
!   LA        0.97     MA        0.96     MC        0.97     MK        1.00*    
!   NL        0.95     NY        0.96     OV        1.04     PT        0.92     
!   SC        0.96     TS        1.00*    WF        1.03     WZ        1.04     
! 
! 
! Fit before self-cal, rms=0.210777Jy  sigma=0.001430
! Fit after  self-cal, rms=0.209286Jy  sigma=0.001338
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.577 mas, bmaj=1.296 mas, bpa=-5.589 degrees
! Estimated noise=469.615 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.00206327 Jy
! Component: 100  -  total flux cleaned = 0.00179189 Jy
! Component: 150  -  total flux cleaned = 0.0017907 Jy
! Component: 200  -  total flux cleaned = 0.00169231 Jy
! Total flux subtracted in 200 components = 0.00169231 Jy
! Clean residual min=-0.005384 max=0.015543 Jy/beam
! Clean residual mean=0.001781 rms=0.003439 Jy/beam
! Combined flux in latest and established models = 0.7985 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 22 components and 0.7985 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.209111Jy  sigma=0.001337
! Fit after  self-cal, rms=0.209232Jy  sigma=0.001336
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.209232Jy  sigma=0.001336
! Fit after  self-cal, rms=0.209413Jy  sigma=0.001332
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5762 mas, bmaj=1.297 mas, bpa=-5.553 degrees
! Estimated noise=469.635 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000707768 Jy
! Component: 100  -  total flux cleaned = 0.000801746 Jy
! Component: 150  -  total flux cleaned = 0.000801318 Jy
! Component: 200  -  total flux cleaned = 0.000800439 Jy
! Total flux subtracted in 200 components = 0.000800439 Jy
! Clean residual min=-0.005718 max=0.015728 Jy/beam
! Clean residual mean=0.001667 rms=0.003392 Jy/beam
! Combined flux in latest and established models = 0.799301 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 23 components and 0.799301 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.209316Jy  sigma=0.001331
! Fit after  self-cal, rms=0.209298Jy  sigma=0.001331
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.6, 5.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0160632 Jy
! Component: 100  -  total flux cleaned = 0.0253922 Jy
! Component: 150  -  total flux cleaned = 0.0313429 Jy
! Component: 200  -  total flux cleaned = 0.0352171 Jy
! Total flux subtracted in 200 components = 0.0352171 Jy
! Clean residual min=-0.004212 max=0.007743 Jy/beam
! Clean residual mean=0.000995 rms=0.001757 Jy/beam
! Combined flux in latest and established models = 0.834518 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 52 components and 0.834518 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208314Jy  sigma=0.001312
! Fit after  self-cal, rms=0.208167Jy  sigma=0.001310
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Added new window around map position (-0.2, 3.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00879996 Jy
! Component: 100  -  total flux cleaned = 0.0137123 Jy
! Component: 150  -  total flux cleaned = 0.0170433 Jy
! Component: 200  -  total flux cleaned = 0.0187799 Jy
! Total flux subtracted in 200 components = 0.0187799 Jy
! Clean residual min=-0.003656 max=0.006881 Jy/beam
! Clean residual mean=0.000636 rms=0.001590 Jy/beam
! Combined flux in latest and established models = 0.853298 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 73 components and 0.853298 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207782Jy  sigma=0.001305
! Fit after  self-cal, rms=0.207732Jy  sigma=0.001304
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.207732Jy  sigma=0.001304
! Fit after  self-cal, rms=0.208079Jy  sigma=0.001302
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5762 mas, bmaj=1.297 mas, bpa=-5.499 degrees
! Estimated noise=469.584 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00472601 Jy
! Component: 100  -  total flux cleaned = 0.00782878 Jy
! Component: 150  -  total flux cleaned = 0.00939323 Jy
! Component: 200  -  total flux cleaned = 0.0102637 Jy
! Total flux subtracted in 200 components = 0.0102637 Jy
! Clean residual min=-0.003266 max=0.005721 Jy/beam
! Clean residual mean=0.000371 rms=0.001335 Jy/beam
! Combined flux in latest and established models = 0.863561 Jy
selfcal
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 89 components and 0.863561 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207947Jy  sigma=0.001300
! Fit after  self-cal, rms=0.207936Jy  sigma=0.001300
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.00175485 Jy
! Component: 100  -  total flux cleaned = 0.00265033 Jy
! Component: 150  -  total flux cleaned = 0.00304045 Jy
! Component: 200  -  total flux cleaned = 0.00328078 Jy
! Total flux subtracted in 200 components = 0.00328078 Jy
! Clean residual min=-0.003710 max=0.005612 Jy/beam
! Clean residual mean=0.000309 rms=0.001332 Jy/beam
! Combined flux in latest and established models = 0.866842 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 98 components and 0.866842 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207884Jy  sigma=0.001299
! Fit after  self-cal, rms=0.207881Jy  sigma=0.001299
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.207881Jy  sigma=0.001299
! Fit after  self-cal, rms=0.207998Jy  sigma=0.001299
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=2.921 mas, bmaj=3.134 mas, bpa=43.19 degrees
! Estimated noise=632.713 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00551184 Jy
! Component: 100  -  total flux cleaned = 0.00739413 Jy
! Component: 150  -  total flux cleaned = 0.00791189 Jy
! Component: 200  -  total flux cleaned = 0.00821713 Jy
! Total flux subtracted in 200 components = 0.00821713 Jy
! Clean residual min=-0.004658 max=0.008017 Jy/beam
! Clean residual mean=0.000474 rms=0.002550 Jy/beam
! Combined flux in latest and established models = 0.875059 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 103 components and 0.875059 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207987Jy  sigma=0.001299
! Fit after  self-cal, rms=0.207978Jy  sigma=0.001299
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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.00184846 Jy
! Component: 100  -  total flux cleaned = 0.0021217 Jy
! Component: 150  -  total flux cleaned = 0.00232046 Jy
! Component: 200  -  total flux cleaned = 0.00245867 Jy
! Total flux subtracted in 200 components = 0.00245867 Jy
! Clean residual min=-0.005301 max=0.007830 Jy/beam
! Clean residual mean=0.000345 rms=0.002613 Jy/beam
! Combined flux in latest and established models = 0.877518 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 110 components and 0.877518 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.207982Jy  sigma=0.001299
! Fit after  self-cal, rms=0.207983Jy  sigma=0.001299
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5762 mas, bmaj=1.298 mas, bpa=-5.486 degrees
! Estimated noise=469.648 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.5762 x 1.298 at -5.486 degrees (North through East)
! Clean map  min=-0.0033213  max=0.60087 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.207983Jy  sigma=0.001299
! Fit after  self-cal, rms=0.201694Jy  sigma=0.001209
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5763 mas, bmaj=1.297 mas, bpa=-5.455 degrees
! Estimated noise=469.403 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000332293 Jy
! Component: 100  -  total flux cleaned = 0.000114974 Jy
! Component: 150  -  total flux cleaned = -7.3472e-05 Jy
! Component: 200  -  total flux cleaned = -0.000238977 Jy
! Total flux subtracted in 200 components = -0.000238977 Jy
! Clean residual min=-0.003122 max=0.005481 Jy/beam
! Clean residual mean=0.000224 rms=0.001152 Jy/beam
! Combined flux in latest and established models = 0.877279 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 120 components and 0.877279 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201644Jy  sigma=0.001209
! Fit after  self-cal, rms=0.201643Jy  sigma=0.001209
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Added new window around map position (2.4, 10.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00494076 Jy
! Component: 100  -  total flux cleaned = 0.00743632 Jy
! Component: 150  -  total flux cleaned = 0.00786835 Jy
! Component: 200  -  total flux cleaned = 0.00799432 Jy
! Total flux subtracted in 200 components = 0.00799432 Jy
! Clean residual min=-0.003047 max=0.003375 Jy/beam
! Clean residual mean=0.000068 rms=0.000933 Jy/beam
! Combined flux in latest and established models = 0.885273 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 136 components and 0.885273 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201521Jy  sigma=0.001207
! Fit after  self-cal, rms=0.201504Jy  sigma=0.001207
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201504Jy  sigma=0.001207
! Fit after  self-cal, rms=0.201409Jy  sigma=0.001207
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 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.4825 mas, bmaj=1 mas, bpa=-8.609 degrees
! Estimated noise=1010.63 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.413954 Jy
! Component: 100  -  total flux cleaned = 0.560937 Jy
! Component: 150  -  total flux cleaned = 0.641583 Jy
! Component: 200  -  total flux cleaned = 0.687969 Jy
! Total flux subtracted in 200 components = 0.687969 Jy
! Clean residual min=-0.008541 max=0.024459 Jy/beam
! Clean residual mean=0.000415 rms=0.003193 Jy/beam
! Combined flux in latest and established models = 0.687969 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 11 model components to the UV plane model.
! The established model now contains 11 components and 0.687969 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5759 mas, bmaj=1.298 mas, bpa=-5.46 degrees
! Estimated noise=469.026 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.0534738 Jy
! Component: 100  -  total flux cleaned = 0.0825777 Jy
! Component: 150  -  total flux cleaned = 0.103455 Jy
! Component: 200  -  total flux cleaned = 0.119724 Jy
! Total flux subtracted in 200 components = 0.119724 Jy
! Clean residual min=-0.005021 max=0.010979 Jy/beam
! Clean residual mean=0.001660 rms=0.003219 Jy/beam
! Combined flux in latest and established models = 0.807692 Jy
! Adding 44 model components to the UV plane model.
! The established model now contains 49 components and 0.807693 Jy
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
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 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=2.918 mas, bmaj=3.133 mas, bpa=43.16 degrees
! Estimated noise=632.414 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0267208 Jy
! Component: 100  -  total flux cleaned = 0.0432571 Jy
! Component: 150  -  total flux cleaned = 0.0546683 Jy
! Component: 200  -  total flux cleaned = 0.0628443 Jy
! Total flux subtracted in 200 components = 0.0628443 Jy
! Clean residual min=-0.004842 max=0.007289 Jy/beam
! Clean residual mean=0.001125 rms=0.002654 Jy/beam
! Combined flux in latest and established models = 0.870537 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.00594167 Jy
! Component: 100  -  total flux cleaned = 0.0103008 Jy
! Component: 150  -  total flux cleaned = 0.0135165 Jy
! Component: 200  -  total flux cleaned = 0.0158964 Jy
! Total flux subtracted in 200 components = 0.0158964 Jy
! Clean residual min=-0.003891 max=0.006091 Jy/beam
! Clean residual mean=0.000308 rms=0.001821 Jy/beam
! Combined flux in latest and established models = 0.886433 Jy
! Adding 100 model components to the UV plane model.
! The established model now contains 138 components and 0.886433 Jy
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! Estimated beam: bmin=0.5759 mas, bmaj=1.298 mas, bpa=-5.46 degrees
! Estimated noise=469.026 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000433369 Jy
! Component: 100  -  total flux cleaned = 0.000159544 Jy
! Component: 150  -  total flux cleaned = 0.000284291 Jy
! Component: 200  -  total flux cleaned = 0.000513703 Jy
! Total flux subtracted in 200 components = 0.000513703 Jy
! Clean residual min=-0.003568 max=0.003811 Jy/beam
! Clean residual mean=0.000125 rms=0.000972 Jy/beam
! Combined flux in latest and established models = 0.886947 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 147 components and 0.886947 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.201591Jy  sigma=0.001209
! Fit after  self-cal, rms=0.201564Jy  sigma=0.001209
wmodel J1159+2914_X_2000_12_04_pus_map.mod
! Writing 147 model components to file: J1159+2914_X_2000_12_04_pus_map.mod
wobs J1159+2914_X_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J1159+2914_X_2000_12_04_pus_uvs.fits
wwins J1159+2914_X_2000_12_04_pus_map.win
! wwins: Wrote 4 windows to J1159+2914_X_2000_12_04_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.0010276 Jy
! Component: 100  -  total flux cleaned = 0.00206402 Jy
! Component: 150  -  total flux cleaned = 0.00286207 Jy
! Component: 200  -  total flux cleaned = 0.00355909 Jy
! Component: 250  -  total flux cleaned = 0.00437032 Jy
! Component: 300  -  total flux cleaned = 0.00480544 Jy
! Component: 350  -  total flux cleaned = 0.00513095 Jy
! Component: 400  -  total flux cleaned = 0.0053106 Jy
! Component: 450  -  total flux cleaned = 0.00557175 Jy
! Component: 500  -  total flux cleaned = 0.0057828 Jy
! Component: 550  -  total flux cleaned = 0.00594774 Jy
! Component: 600  -  total flux cleaned = 0.00615018 Jy
! Component: 650  -  total flux cleaned = 0.00638765 Jy
! Component: 700  -  total flux cleaned = 0.00658141 Jy
! Component: 750  -  total flux cleaned = 0.00680872 Jy
! Component: 800  -  total flux cleaned = 0.00688317 Jy
! Component: 850  -  total flux cleaned = 0.00710246 Jy
! Component: 900  -  total flux cleaned = 0.00728192 Jy
! Component: 950  -  total flux cleaned = 0.00742281 Jy
! Component: 1000  -  total flux cleaned = 0.00756185 Jy
! Total flux subtracted in 1024 components = 0.00763037 Jy
! Clean residual min=-0.002013 max=0.002018 Jy/beam
! Clean residual mean=0.000030 rms=0.000667 Jy/beam
! Combined flux in latest and established models = 0.894577 Jy
keep
! Adding 71 model components to the UV plane model.
! The established model now contains 217 components and 0.894577 Jy
![Exited script file: muppet]
wmap "J1159+2914_X_2000_12_04_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.5759 x 1.298 at -5.46 degrees (North through East)
! Clean map  min=-0.0024107  max=0.60029 Jy/beam
! Writing clean map to FITS file: J1159+2914_X_2000_12_04_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.60029 
invert
! Inverting map 
! Your choice of large map pixels excluded 4.1% of the data.
!  The x-axis pixel size should ideally be below 0.1855 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000660867 
device "J1159+2914_X_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J1159+2914_X_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.330274 0.330274 0.660548 1.3211 2.64219 5.28438 10.5688 21.1375 42.2751 84.5501
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.6 
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.5759 x 1.298 at -5.46 degrees (North through East)
! Clean map  min=-0.0024107  max=0.60029 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1159+2914_X_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J1159+2914_X_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1159+2914_X_2000_12_04_pus_uvs.log closed on Fri Oct 12 15:23:34 2007