! Started logfile: J1159+2914_S_2001_10_29_pus_uvs.log on Wed Feb 27 15:21:21 2008
obs J1159+2914_S_2001_10_29_pus_uva.fits
! Reading UV FITS file: J1159+2914_S_2001_10_29_pus_uva.fits
! AN table 1: 161 integrations on 153 of 153 possible baselines.
! AN table 2: 69 integrations on 153 of 153 possible baselines.
! AN table 3: 97 integrations on 153 of 153 possible baselines.
! AN table 4: 53 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0778982 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  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 2604 lines of history.
! 
! Reading 18116 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 
![@muppet J1159+2914_S_2001_10_29_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.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 2056 telescope corrections were flagged in sub-array 1.
!  A total of 1122 telescope corrections were flagged in sub-array 2.
!  A total of 1512 telescope corrections were flagged in sub-array 3.
!  A total of 816 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 2056 telescope corrections were flagged in sub-array 1.
!  A total of 1122 telescope corrections were flagged in sub-array 2.
!  A total of 1512 telescope corrections were flagged in sub-array 3.
!  A total of 816 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 2056 telescope corrections were flagged in sub-array 1.
!  A total of 1122 telescope corrections were flagged in sub-array 2.
!  A total of 1512 telescope corrections were flagged in sub-array 3.
!  A total of 816 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 2311 telescope corrections were flagged in sub-array 1.
!  A total of 1242 telescope corrections were flagged in sub-array 2.
!  A total of 1512 telescope corrections were flagged in sub-array 3.
!  A total of 816 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.687128Jy  sigma=0.005107
! Fit after  self-cal, rms=0.509855Jy  sigma=0.003621
! 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.822 mas, bmaj=5.035 mas, bpa=-5.715 degrees
! Estimated noise=1425.25 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.432852 Jy
! Component: 100  -  total flux cleaned = 0.586107 Jy
! Total flux subtracted in 100 components = 0.586107 Jy
! Clean residual min=-0.025954 max=0.072149 Jy/beam
! Clean residual mean=-0.000243 rms=0.010366 Jy/beam
! Combined flux in latest and established models = 0.586107 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 16 components and 0.586107 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.305076Jy  sigma=0.002284
! Fit after  self-cal, rms=0.304642Jy  sigma=0.002283
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0860555 Jy
! Component: 100  -  total flux cleaned = 0.141774 Jy
! Total flux subtracted in 100 components = 0.141774 Jy
! Clean residual min=-0.021772 max=0.060334 Jy/beam
! Clean residual mean=-0.000082 rms=0.007574 Jy/beam
! Combined flux in latest and established models = 0.727881 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 34 components and 0.727881 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.263492Jy  sigma=0.001863
! Fit after  self-cal, rms=0.262975Jy  sigma=0.001860
! Inverting map 
! Added new window around map position (3.5, 6.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0572577 Jy
! Component: 100  -  total flux cleaned = 0.0944993 Jy
! Total flux subtracted in 100 components = 0.0944993 Jy
! Clean residual min=-0.018830 max=0.032157 Jy/beam
! Clean residual mean=-0.000022 rms=0.005868 Jy/beam
! Combined flux in latest and established models = 0.822381 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 53 components and 0.822381 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.241019Jy  sigma=0.001628
! Fit after  self-cal, rms=0.239640Jy  sigma=0.001617
! 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.145 mas, bmaj=6.605 mas, bpa=-7.658 degrees
! Estimated noise=738.148 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.0596069 Jy
! Component: 100  -  total flux cleaned = 0.096761 Jy
! Component: 150  -  total flux cleaned = 0.122667 Jy
! Component: 200  -  total flux cleaned = 0.14104 Jy
! Total flux subtracted in 200 components = 0.14104 Jy
! Clean residual min=-0.015277 max=0.024597 Jy/beam
! Clean residual mean=0.001097 rms=0.005627 Jy/beam
! Combined flux in latest and established models = 0.963421 Jy
! Performing phase self-cal
! Adding 57 model components to the UV plane model.
! The established model now contains 101 components and 0.963421 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224001Jy  sigma=0.001439
! Fit after  self-cal, rms=0.222915Jy  sigma=0.001428
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 90 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.87     KK        1.00*    KP        1.00     LA        0.95     
!   MA        0.99     MC        1.04     MK        1.00*    NL        1.11     
!   OV        1.03     PT        0.95     SC        0.98     TS        1.29     
!   WF        1.05     WZ        1.00     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.14     MC        0.99     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.02     
!   WF        1.00*    WZ        0.90     
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00*    KP        0.95     LA        0.96     
!   MA        1.00*    MC        1.00*    MK        1.03     NL        0.97     
!   OV        0.93     PT        0.93     SC        1.11     TS        1.00*    
!   WF        0.94     WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.94     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        0.91     KP        1.00*    LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        1.03     NL        1.00*    
!   OV        0.97     PT        0.88     SC        1.03     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 90 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.13     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.00*    KP        1.11     LA        0.93     
!   MA        0.79     MC        0.94     MK        1.00*    NL        1.15     
!   OV        1.05     PT        0.94     SC        1.00     TS        1.41     
!   WF        0.99     WZ        1.00     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.13     MC        0.95     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.96     
!   WF        1.00*    WZ        0.95     
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.00*    KP        0.94     LA        0.94     
!   MA        1.00*    MC        1.00*    MK        1.00     NL        0.99     
!   OV        0.95     PT        0.93     SC        1.07     TS        1.00*    
!   WF        0.99     WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        0.96     KP        1.00*    LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        1.04     NL        1.00*    
!   OV        0.97     PT        0.87     SC        1.03     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 90 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.98     KK        1.00*    KP        0.99     LA        0.94     
!   MA        0.93     MC        0.97     MK        1.00*    NL        1.11     
!   OV        1.05     PT        0.94     SC        0.96     TS        0.97     
!   WF        1.04     WZ        0.99     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        1.02     MC        2.38     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.87     
!   WF        1.00*    WZ        1.02     
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00*    KP        0.94     LA        0.95     
!   MA        1.00*    MC        1.00*    MK        0.90     NL        0.97     
!   OV        0.96     PT        0.94     SC        1.05     TS        1.00*    
!   WF        1.00     WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        0.97     KP        1.00*    LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        0.98     NL        1.00*    
!   OV        0.98     PT        0.85     SC        1.00     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.08     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        0.94     KK        1.00*    KP        0.99     LA        0.97     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        1.25     
!   OV        1.04     PT        0.93     SC        0.94     TS        1.00*    
!   WF        0.98     WZ        0.94     
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00     KK        1.00*    KP        0.96     LA        0.96     
!   MA        1.00*    MC        1.00*    MK        0.92     NL        1.00     
!   OV        0.93     PT        1.01     SC        1.05     TS        1.00*    
!   WF        0.93     WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.94     FD        1.00*    GG        1.00*    HH        1.00*    
!   HN        1.00*    KK        0.96     KP        1.00*    LA        1.00*    
!   MA        1.00*    MC        1.00*    MK        1.02     NL        1.00*    
!   OV        0.94     PT        0.95     SC        1.00     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.222915Jy  sigma=0.001428
! Fit after  self-cal, rms=0.208030Jy  sigma=0.001337
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.163 mas, bmaj=6.651 mas, bpa=-8.454 degrees
! Estimated noise=734.329 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 (7, 6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0156508 Jy
! Component: 100  -  total flux cleaned = 0.020476 Jy
! Component: 150  -  total flux cleaned = 0.0221222 Jy
! Component: 200  -  total flux cleaned = 0.0228881 Jy
! Total flux subtracted in 200 components = 0.0228881 Jy
! Clean residual min=-0.007984 max=0.013365 Jy/beam
! Clean residual mean=0.000561 rms=0.002378 Jy/beam
! Combined flux in latest and established models = 0.986309 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 124 components and 0.986309 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.206708Jy  sigma=0.001326
! Fit after  self-cal, rms=0.206834Jy  sigma=0.001324
! Inverting map 
! Added new window around map position (7.5, 24).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0135861 Jy
! Component: 100  -  total flux cleaned = 0.0204694 Jy
! Component: 150  -  total flux cleaned = 0.0232517 Jy
! Component: 200  -  total flux cleaned = 0.0250229 Jy
! Total flux subtracted in 200 components = 0.0250229 Jy
! Clean residual min=-0.006616 max=0.006943 Jy/beam
! Clean residual mean=0.000424 rms=0.001771 Jy/beam
! Combined flux in latest and established models = 1.01133 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 149 components and 1.01133 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.205925Jy  sigma=0.001315
! Fit after  self-cal, rms=0.205847Jy  sigma=0.001314
! 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.205847Jy  sigma=0.001314
! Fit after  self-cal, rms=0.204937Jy  sigma=0.001310
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.161 mas, bmaj=6.63 mas, bpa=-8.437 degrees
! Estimated noise=733.234 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00600279 Jy
! Component: 100  -  total flux cleaned = 0.00927817 Jy
! Component: 150  -  total flux cleaned = 0.0112645 Jy
! Component: 200  -  total flux cleaned = 0.0124893 Jy
! Total flux subtracted in 200 components = 0.0124893 Jy
! Clean residual min=-0.006212 max=0.006820 Jy/beam
! Clean residual mean=0.000368 rms=0.001585 Jy/beam
! Combined flux in latest and established models = 1.02382 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 173 components and 1.02382 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204664Jy  sigma=0.001307
! Fit after  self-cal, rms=0.204654Jy  sigma=0.001307
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 (0, 9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00579083 Jy
! Component: 100  -  total flux cleaned = 0.00625198 Jy
! Component: 150  -  total flux cleaned = 0.00692004 Jy
! Component: 200  -  total flux cleaned = 0.0075293 Jy
! Total flux subtracted in 200 components = 0.0075293 Jy
! Clean residual min=-0.005807 max=0.006208 Jy/beam
! Clean residual mean=0.000335 rms=0.001482 Jy/beam
! Combined flux in latest and established models = 1.03135 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 192 components and 1.03135 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204368Jy  sigma=0.001305
! Fit after  self-cal, rms=0.204340Jy  sigma=0.001305
! 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.204340Jy  sigma=0.001305
! Fit after  self-cal, rms=0.204402Jy  sigma=0.001304
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.161 mas, bmaj=6.615 mas, bpa=-8.428 degrees
! Estimated noise=733.232 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00519276 Jy
! Component: 100  -  total flux cleaned = 0.00747958 Jy
! Component: 150  -  total flux cleaned = 0.00828447 Jy
! Component: 200  -  total flux cleaned = 0.00870407 Jy
! Total flux subtracted in 200 components = 0.00870407 Jy
! Clean residual min=-0.005682 max=0.005755 Jy/beam
! Clean residual mean=0.000309 rms=0.001360 Jy/beam
! Combined flux in latest and established models = 1.04005 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 211 components and 1.04006 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204198Jy  sigma=0.001302
! Fit after  self-cal, rms=0.204187Jy  sigma=0.001302
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 (5, -60).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00405598 Jy
! Component: 100  -  total flux cleaned = 0.00585643 Jy
! Component: 150  -  total flux cleaned = 0.00704152 Jy
! Component: 200  -  total flux cleaned = 0.00778815 Jy
! Total flux subtracted in 200 components = 0.00778815 Jy
! Clean residual min=-0.004986 max=0.004727 Jy/beam
! Clean residual mean=0.000263 rms=0.001244 Jy/beam
! Combined flux in latest and established models = 1.04784 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 231 components and 1.04784 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.203968Jy  sigma=0.001301
! Fit after  self-cal, rms=0.203959Jy  sigma=0.001300
! 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.203959Jy  sigma=0.001300
! Fit after  self-cal, rms=0.204171Jy  sigma=0.001300
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=9.111 mas, bmaj=10.12 mas, bpa=-9.417 degrees
! Estimated noise=943.265 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00546604 Jy
! Component: 100  -  total flux cleaned = 0.00856643 Jy
! Component: 150  -  total flux cleaned = 0.0108316 Jy
! Component: 200  -  total flux cleaned = 0.0112226 Jy
! Total flux subtracted in 200 components = 0.0112226 Jy
! Clean residual min=-0.004431 max=0.005418 Jy/beam
! Clean residual mean=0.000513 rms=0.001489 Jy/beam
! Combined flux in latest and established models = 1.05907 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 253 components and 1.05907 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204054Jy  sigma=0.001299
! Fit after  self-cal, rms=0.204049Jy  sigma=0.001299
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.00111582 Jy
! Component: 100  -  total flux cleaned = 0.00175438 Jy
! Component: 150  -  total flux cleaned = 0.00200818 Jy
! Component: 200  -  total flux cleaned = 0.00218375 Jy
! Total flux subtracted in 200 components = 0.00218375 Jy
! Clean residual min=-0.004344 max=0.005387 Jy/beam
! Clean residual mean=0.000492 rms=0.001460 Jy/beam
! Combined flux in latest and established models = 1.06125 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 264 components and 1.06125 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.204012Jy  sigma=0.001299
! Fit after  self-cal, rms=0.204014Jy  sigma=0.001299
! 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.162 mas, bmaj=6.613 mas, bpa=-8.411 degrees
! Estimated noise=733.936 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.162 x 6.613 at -8.411 degrees (North through East)
! Clean map  min=-0.0041998  max=0.57619 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.204014Jy  sigma=0.001299
! Fit after  self-cal, rms=0.199254Jy  sigma=0.001168
! Inverting map and beam 
! Estimated beam: bmin=2.166 mas, bmaj=6.612 mas, bpa=-8.412 degrees
! Estimated noise=736.007 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00287067 Jy
! Component: 100  -  total flux cleaned = 0.00392059 Jy
! Component: 150  -  total flux cleaned = 0.00464594 Jy
! Component: 200  -  total flux cleaned = 0.00512968 Jy
! Total flux subtracted in 200 components = 0.00512968 Jy
! Clean residual min=-0.004047 max=0.004097 Jy/beam
! Clean residual mean=0.000197 rms=0.001078 Jy/beam
! Combined flux in latest and established models = 1.06638 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 273 components and 1.06638 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.199149Jy  sigma=0.001167
! Fit after  self-cal, rms=0.199152Jy  sigma=0.001167
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000772663 Jy
! Component: 100  -  total flux cleaned = 0.00108952 Jy
! Component: 150  -  total flux cleaned = 0.00137719 Jy
! Component: 200  -  total flux cleaned = 0.00137531 Jy
! Total flux subtracted in 200 components = 0.00137531 Jy
! Clean residual min=-0.004034 max=0.004033 Jy/beam
! Clean residual mean=0.000188 rms=0.001054 Jy/beam
! Combined flux in latest and established models = 1.06775 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 287 components and 1.06775 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.199094Jy  sigma=0.001166
! Fit after  self-cal, rms=0.199094Jy  sigma=0.001166
! 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.199094Jy  sigma=0.001166
! Fit after  self-cal, rms=0.199342Jy  sigma=0.001166
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=1.842 mas, bmaj=5.024 mas, bpa=-6.093 degrees
! Estimated noise=1466.9 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.42436 Jy
! Component: 100  -  total flux cleaned = 0.5762 Jy
! Component: 150  -  total flux cleaned = 0.668401 Jy
! Component: 200  -  total flux cleaned = 0.734166 Jy
! Total flux subtracted in 200 components = 0.734166 Jy
! Clean residual min=-0.016179 max=0.037493 Jy/beam
! Clean residual mean=-0.000060 rms=0.006252 Jy/beam
! Combined flux in latest and established models = 0.734166 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 37 model components to the UV plane model.
! The established model now contains 37 components and 0.734166 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.167 mas, bmaj=6.613 mas, bpa=-8.411 degrees
! Estimated noise=736.426 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.0888035 Jy
! Component: 100  -  total flux cleaned = 0.145709 Jy
! Component: 150  -  total flux cleaned = 0.184984 Jy
! Component: 200  -  total flux cleaned = 0.213113 Jy
! Total flux subtracted in 200 components = 0.213113 Jy
! Clean residual min=-0.008263 max=0.015946 Jy/beam
! Clean residual mean=0.000771 rms=0.004317 Jy/beam
! Combined flux in latest and established models = 0.947279 Jy
! Adding 109 model components to the UV plane model.
! The established model now contains 127 components and 0.947279 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=9.12 mas, bmaj=10.1 mas, bpa=-9.931 degrees
! Estimated noise=944.417 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0385286 Jy
! Component: 100  -  total flux cleaned = 0.0620285 Jy
! Component: 150  -  total flux cleaned = 0.0776598 Jy
! Component: 200  -  total flux cleaned = 0.088688 Jy
! Total flux subtracted in 200 components = 0.088688 Jy
! Clean residual min=-0.005805 max=0.006751 Jy/beam
! Clean residual mean=0.000861 rms=0.002644 Jy/beam
! Combined flux in latest and established models = 1.03597 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.00826175 Jy
! Component: 100  -  total flux cleaned = 0.0147948 Jy
! Component: 150  -  total flux cleaned = 0.0200142 Jy
! Component: 200  -  total flux cleaned = 0.0241955 Jy
! Total flux subtracted in 200 components = 0.0241955 Jy
! Clean residual min=-0.004476 max=0.005720 Jy/beam
! Clean residual mean=0.000561 rms=0.001571 Jy/beam
! Combined flux in latest and established models = 1.06016 Jy
! Adding 129 model components to the UV plane model.
! The established model now contains 247 components and 1.06016 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.167 mas, bmaj=6.613 mas, bpa=-8.411 degrees
! Estimated noise=736.426 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0018903 Jy
! Component: 100  -  total flux cleaned = 0.00342752 Jy
! Component: 150  -  total flux cleaned = 0.00461613 Jy
! Component: 200  -  total flux cleaned = 0.00567435 Jy
! Total flux subtracted in 200 components = 0.00567435 Jy
! Clean residual min=-0.004296 max=0.004654 Jy/beam
! Clean residual mean=0.000207 rms=0.001132 Jy/beam
! Combined flux in latest and established models = 1.06584 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 268 components and 1.06584 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.199520Jy  sigma=0.001168
! Fit after  self-cal, rms=0.199477Jy  sigma=0.001167
wmodel J1159+2914_S_2001_10_29_pus_map.mod
! Writing 268 model components to file: J1159+2914_S_2001_10_29_pus_map.mod
wobs J1159+2914_S_2001_10_29_pus_uvs.fits
! Writing UV FITS file: J1159+2914_S_2001_10_29_pus_uvs.fits
wwins J1159+2914_S_2001_10_29_pus_map.win
! wwins: Wrote 6 windows to J1159+2914_S_2001_10_29_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.00107599 Jy
! Component: 100  -  total flux cleaned = 0.00100887 Jy
! Component: 150  -  total flux cleaned = 0.000738932 Jy
! Component: 200  -  total flux cleaned = 0.000736875 Jy
! Component: 250  -  total flux cleaned = 0.00092129 Jy
! Component: 300  -  total flux cleaned = 0.00139931 Jy
! Component: 350  -  total flux cleaned = 0.00174659 Jy
! Component: 400  -  total flux cleaned = 0.00219939 Jy
! Component: 450  -  total flux cleaned = 0.00258727 Jy
! Component: 500  -  total flux cleaned = 0.00296866 Jy
! Component: 550  -  total flux cleaned = 0.00344903 Jy
! Component: 600  -  total flux cleaned = 0.00391926 Jy
! Component: 650  -  total flux cleaned = 0.00443126 Jy
! Component: 700  -  total flux cleaned = 0.00488371 Jy
! Component: 750  -  total flux cleaned = 0.00542612 Jy
! Component: 800  -  total flux cleaned = 0.0058627 Jy
! Component: 850  -  total flux cleaned = 0.00648304 Jy
! Component: 900  -  total flux cleaned = 0.00695277 Jy
! Component: 950  -  total flux cleaned = 0.00746183 Jy
! Component: 1000  -  total flux cleaned = 0.00787281 Jy
! Component: 1050  -  total flux cleaned = 0.00841362 Jy
! Component: 1100  -  total flux cleaned = 0.00894618 Jy
! Component: 1150  -  total flux cleaned = 0.00938372 Jy
! Component: 1200  -  total flux cleaned = 0.00981549 Jy
! Component: 1250  -  total flux cleaned = 0.0101561 Jy
! Component: 1300  -  total flux cleaned = 0.0104926 Jy
! Component: 1350  -  total flux cleaned = 0.0109497 Jy
! Component: 1400  -  total flux cleaned = 0.011196 Jy
! Component: 1450  -  total flux cleaned = 0.0116022 Jy
! Component: 1500  -  total flux cleaned = 0.0118831 Jy
! Component: 1550  -  total flux cleaned = 0.0122402 Jy
! Component: 1600  -  total flux cleaned = 0.0125933 Jy
! Component: 1650  -  total flux cleaned = 0.012865 Jy
! Component: 1700  -  total flux cleaned = 0.0132112 Jy
! Component: 1750  -  total flux cleaned = 0.0135921 Jy
! Component: 1800  -  total flux cleaned = 0.013893 Jy
! Component: 1850  -  total flux cleaned = 0.0143396 Jy
! Component: 1900  -  total flux cleaned = 0.0145236 Jy
! Component: 1950  -  total flux cleaned = 0.0148888 Jy
! Component: 2000  -  total flux cleaned = 0.015214 Jy
! Total flux subtracted in 2048 components = 0.0155357 Jy
! Clean residual min=-0.001978 max=0.002136 Jy/beam
! Clean residual mean=0.000133 rms=0.000686 Jy/beam
! Combined flux in latest and established models = 1.08137 Jy
keep
! Adding 130 model components to the UV plane model.
! The established model now contains 397 components and 1.08137 Jy
![Exited script file: muppet]
wmap "J1159+2914_S_2001_10_29_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.167 x 6.613 at -8.411 degrees (North through East)
! Clean map  min=-0.0030779  max=0.57621 Jy/beam
! Writing clean map to FITS file: J1159+2914_S_2001_10_29_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.576206 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000686239 
device "J1159+2914_S_2001_10_29_pus\_map.eps/VPS"
! Attempting to open device: 'J1159+2914_S_2001_10_29_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.357288 0.357288 0.714577 1.42915 2.85831 5.71661 11.4332 22.8665 45.7329 91.4658
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.002 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.576 
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.167 x 6.613 at -8.411 degrees (North through East)
! Clean map  min=-0.0030779  max=0.57621 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1159+2914_S_2001_10_29_pus\_map.gif/vgif"
! Attempting to open device: 'J1159+2914_S_2001_10_29_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1159+2914_S_2001_10_29_pus_uvs.log closed on Wed Feb 27 15:21:34 2008