! Started logfile: J1743-0350_S_1999_03_08_pus_uvs.log on Wed Jan  9 17:33:42 2008
obs J1743-0350_S_1999_03_08_pus_uva.fits
! Reading UV FITS file: J1743-0350_S_1999_03_08_pus_uva.fits
! AN table 1: 99 integrations on 190 of 190 possible baselines.
! AN table 2: 61 integrations on 190 of 190 possible baselines.
! AN table 3: 59 integrations on 190 of 190 possible baselines.
! AN table 4: 43 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.121314 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1743-0350
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2336 lines of history.
! 
! Reading 24156 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 J1743-0350_S_1999_03_08_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 1818 telescope corrections were flagged in sub-array 1.
!  A total of 793 telescope corrections were flagged in sub-array 2.
!  A total of 575 telescope corrections were flagged in sub-array 3.
!  A total of 776 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1818 telescope corrections were flagged in sub-array 1.
!  A total of 793 telescope corrections were flagged in sub-array 2.
!  A total of 576 telescope corrections were flagged in sub-array 3.
!  A total of 776 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1828 telescope corrections were flagged in sub-array 1.
!  A total of 793 telescope corrections were flagged in sub-array 2.
!  A total of 591 telescope corrections were flagged in sub-array 3.
!  A total of 779 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1818 telescope corrections were flagged in sub-array 1.
!  A total of 794 telescope corrections were flagged in sub-array 2.
!  A total of 575 telescope corrections were flagged in sub-array 3.
!  A total of 791 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=2.823467Jy  sigma=0.022422
! Fit after  self-cal, rms=2.386296Jy  sigma=0.019588
! 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=2.089 mas, bmaj=7.367 mas, bpa=-8.327 degrees
! Estimated noise=1031.82 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 = 2.50521 Jy
! Component: 100  -  total flux cleaned = 3.10038 Jy
! Total flux subtracted in 100 components = 3.10038 Jy
! Clean residual min=-0.056388 max=0.238494 Jy/beam
! Clean residual mean=-0.000405 rms=0.021641 Jy/beam
! Combined flux in latest and established models = 3.10038 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 3.10038 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.555552Jy  sigma=0.004339
! Fit after  self-cal, rms=0.555554Jy  sigma=0.004339
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.25315 Jy
! Component: 100  -  total flux cleaned = 0.377643 Jy
! Total flux subtracted in 100 components = 0.377643 Jy
! Clean residual min=-0.041131 max=0.058803 Jy/beam
! Clean residual mean=-0.000369 rms=0.011753 Jy/beam
! Combined flux in latest and established models = 3.47802 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 20 components and 3.47802 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.405049Jy  sigma=0.002917
! Fit after  self-cal, rms=0.405028Jy  sigma=0.002917
! 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.597 mas, bmaj=8.437 mas, bpa=-6.375 degrees
! Estimated noise=606.744 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.0956817 Jy
! Component: 100  -  total flux cleaned = 0.143137 Jy
! Component: 150  -  total flux cleaned = 0.171517 Jy
! Component: 200  -  total flux cleaned = 0.189192 Jy
! Total flux subtracted in 200 components = 0.189192 Jy
! Clean residual min=-0.035898 max=0.031392 Jy/beam
! Clean residual mean=-0.000990 rms=0.009387 Jy/beam
! Combined flux in latest and established models = 3.66721 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 52 components and 3.66721 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.387309Jy  sigma=0.002702
! Fit after  self-cal, rms=0.387269Jy  sigma=0.002702
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.00*    GC        1.04     GG        1.00*    
!   HN        1.01     KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        0.98     MC        1.00*    
!   MK        0.97     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.99     GC        1.00*    GG        1.00*    
!   HN        0.96     KP        1.00     LA        0.99     NL        1.04     
!   OV        0.99     PT        1.03     SC        1.00     WF        0.97     
!   GN        0.97     HH        1.00*    KK        1.11     MC        1.00*    
!   MK        0.95     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.99     GC        1.00*    GG        1.00*    
!   HN        0.97     KP        1.01     LA        1.00     NL        1.06     
!   OV        1.00     PT        1.03     SC        1.02     WF        0.97     
!   GN        0.99     HH        1.00*    KK        1.00*    MC        1.03     
!   MK        1.00*    NY        1.00*    ON        1.13     WZ        1.01     
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HN        0.00*    KP        0.00*    LA        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    WF        0.00*    
!   GN        0.00*    HH        0.00*    KK        0.00*    MC        0.00*    
!   MK        0.00*    NY        0.00*    ON        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.00*    GC        1.07     GG        1.00*    
!   HN        0.95     KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        0.95     MC        1.00*    
!   MK        0.98     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.04     GC        1.00*    GG        1.00*    
!   HN        0.94     KP        0.99     LA        0.97     NL        0.93     
!   OV        0.96     PT        0.99     SC        1.04     WF        0.99     
!   GN        0.97     HH        1.00*    KK        1.05     MC        1.00*    
!   MK        0.97     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00     GC        1.00*    GG        1.00*    
!   HN        0.96     KP        0.99     LA        0.95     NL        0.97     
!   OV        0.99     PT        0.98     SC        1.04     WF        0.98     
!   GN        0.99     HH        1.00*    KK        1.00*    MC        0.82     
!   MK        1.00*    NY        1.00*    ON        1.08     WZ        1.02     
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HN        0.00*    KP        0.00*    LA        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    WF        0.00*    
!   GN        0.00*    HH        0.00*    KK        0.00*    MC        0.00*    
!   MK        0.00*    NY        0.00*    ON        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00*    GC        1.05     GG        1.00*    
!   HN        1.31     KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        0.95     MC        1.00*    
!   MK        0.99     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 36 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.01     GC        1.00*    GG        1.00*    
!   HN        1.19     KP        0.98     LA        0.99     NL        0.99     
!   OV        0.98     PT        0.95     SC        1.00     WF        0.98     
!   GN        0.96     HH        1.00*    KK        1.07     MC        1.00*    
!   MK        0.95     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        0.97     GC        1.00*    GG        1.00*    
!   HN        1.21     KP        0.95     LA        0.99     NL        1.02     
!   OV        1.00     PT        0.95     SC        0.99     WF        0.98     
!   GN        0.98     HH        1.00*    KK        1.00*    MC        1.08     
!   MK        1.00*    NY        1.00*    ON        1.11     WZ        1.01     
! 
!  A total of 81 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HN        0.00*    KP        0.00*    LA        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    WF        0.00*    
!   GN        0.00*    HH        0.00*    KK        0.00*    MC        0.00*    
!   MK        0.00*    NY        0.00*    ON        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.00*    GC        1.05     GG        1.00*    
!   HN        1.16     KP        1.00*    LA        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    WF        1.00*    
!   GN        1.00*    HH        1.00*    KK        1.00     MC        1.00*    
!   MK        0.99     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00     GC        1.00*    GG        1.00*    
!   HN        1.13     KP        1.00     LA        0.98     NL        0.93     
!   OV        1.00     PT        0.95     SC        0.99     WF        0.97     
!   GN        0.95     HH        1.00*    KK        1.11     MC        1.00*    
!   MK        0.97     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        0.97     GC        1.00*    GG        1.00*    
!   HN        1.14     KP        0.99     LA        0.99     NL        0.98     
!   OV        1.00     PT        0.94     SC        0.99     WF        0.97     
!   GN        0.98     HH        1.00*    KK        1.00*    MC        1.62     
!   MK        1.00*    NY        1.00*    ON        1.09     WZ        0.98     
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HN        0.00*    KP        0.00*    LA        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    WF        0.00*    
!   GN        0.00*    HH        0.00*    KK        0.00*    MC        0.00*    
!   MK        0.00*    NY        0.00*    ON        0.00*    WZ        0.00*    
! 
! 
! Fit before self-cal, rms=0.387269Jy  sigma=0.002702
! Fit after  self-cal, rms=0.285716Jy  sigma=0.001705
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.613 mas, bmaj=8.412 mas, bpa=-6.37 degrees
! Estimated noise=609.264 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.0221853 Jy
! Component: 100  -  total flux cleaned = -0.0263177 Jy
! Component: 150  -  total flux cleaned = -0.0282147 Jy
! Component: 200  -  total flux cleaned = -0.0298197 Jy
! Total flux subtracted in 200 components = -0.0298197 Jy
! Clean residual min=-0.019695 max=0.007919 Jy/beam
! Clean residual mean=-0.000245 rms=0.002749 Jy/beam
! Combined flux in latest and established models = 3.63739 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 72 components and 3.63739 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.282975Jy  sigma=0.001685
! Fit after  self-cal, rms=0.283133Jy  sigma=0.001684
! 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.283133Jy  sigma=0.001684
! Fit after  self-cal, rms=0.283018Jy  sigma=0.001679
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.622 mas, bmaj=8.416 mas, bpa=-6.382 degrees
! Estimated noise=609.101 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0144935 Jy
! Component: 100  -  total flux cleaned = -0.0169594 Jy
! Component: 150  -  total flux cleaned = -0.0182992 Jy
! Component: 200  -  total flux cleaned = -0.0194432 Jy
! Total flux subtracted in 200 components = -0.0194432 Jy
! Clean residual min=-0.015758 max=0.006871 Jy/beam
! Clean residual mean=-0.000163 rms=0.002319 Jy/beam
! Combined flux in latest and established models = 3.61795 Jy
selfcal
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 88 components and 3.61795 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281565Jy  sigma=0.001669
! Fit after  self-cal, rms=0.281567Jy  sigma=0.001669
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.000986986 Jy
! Component: 100  -  total flux cleaned = -0.00182726 Jy
! Component: 150  -  total flux cleaned = -0.00254365 Jy
! Component: 200  -  total flux cleaned = -0.00302045 Jy
! Total flux subtracted in 200 components = -0.00302045 Jy
! Clean residual min=-0.013841 max=0.006833 Jy/beam
! Clean residual mean=-0.000158 rms=0.002204 Jy/beam
! Combined flux in latest and established models = 3.61493 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 97 components and 3.61493 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.281318Jy  sigma=0.001666
! Fit after  self-cal, rms=0.281316Jy  sigma=0.001666
! 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.281316Jy  sigma=0.001666
! Fit after  self-cal, rms=0.281478Jy  sigma=0.001661
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.631 mas, bmaj=8.419 mas, bpa=-6.386 degrees
! Estimated noise=609.441 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00982903 Jy
! Component: 100  -  total flux cleaned = -0.0112889 Jy
! Component: 150  -  total flux cleaned = -0.0124654 Jy
! Component: 200  -  total flux cleaned = -0.0130322 Jy
! Total flux subtracted in 200 components = -0.0130322 Jy
! Clean residual min=-0.011685 max=0.005758 Jy/beam
! Clean residual mean=-0.000086 rms=0.001906 Jy/beam
! Combined flux in latest and established models = 3.6019 Jy
selfcal
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 102 components and 3.6019 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280746Jy  sigma=0.001656
! Fit after  self-cal, rms=0.280753Jy  sigma=0.001656
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.000469149 Jy
! Component: 100  -  total flux cleaned = -0.00101557 Jy
! Component: 150  -  total flux cleaned = -0.00136956 Jy
! Component: 200  -  total flux cleaned = -0.001785 Jy
! Total flux subtracted in 200 components = -0.001785 Jy
! Clean residual min=-0.010567 max=0.005917 Jy/beam
! Clean residual mean=-0.000083 rms=0.001848 Jy/beam
! Combined flux in latest and established models = 3.60011 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 106 components and 3.60011 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280652Jy  sigma=0.001655
! Fit after  self-cal, rms=0.280651Jy  sigma=0.001655
! 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.280651Jy  sigma=0.001655
! Fit after  self-cal, rms=0.280986Jy  sigma=0.001652
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.039 mas, bmaj=11.98 mas, bpa=-8.257 degrees
! Estimated noise=782.094 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0097742 Jy
! Component: 100  -  total flux cleaned = -0.0140515 Jy
! Component: 150  -  total flux cleaned = -0.0159855 Jy
! Component: 200  -  total flux cleaned = -0.0165595 Jy
! Total flux subtracted in 200 components = -0.0165595 Jy
! Clean residual min=-0.007187 max=0.005608 Jy/beam
! Clean residual mean=-0.000075 rms=0.002221 Jy/beam
! Combined flux in latest and established models = 3.58355 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 114 components and 3.58355 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280816Jy  sigma=0.001652
! Fit after  self-cal, rms=0.280818Jy  sigma=0.001652
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 = -3.51314e-05 Jy
! Component: 100  -  total flux cleaned = -9.14087e-05 Jy
! Component: 150  -  total flux cleaned = -0.000119778 Jy
! Component: 200  -  total flux cleaned = -0.00017457 Jy
! Total flux subtracted in 200 components = -0.00017457 Jy
! Clean residual min=-0.007174 max=0.005592 Jy/beam
! Clean residual mean=-0.000075 rms=0.002215 Jy/beam
! Combined flux in latest and established models = 3.58338 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 116 components and 3.58338 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.280815Jy  sigma=0.001652
! Fit after  self-cal, rms=0.280814Jy  sigma=0.001652
! 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.638 mas, bmaj=8.421 mas, bpa=-6.387 degrees
! Estimated noise=609.716 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.638 x 8.421 at -6.387 degrees (North through East)
! Clean map  min=-0.0077285  max=3.3326 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.280814Jy  sigma=0.001652
! Fit after  self-cal, rms=0.311620Jy  sigma=0.001241
! Inverting map and beam 
! Estimated beam: bmin=2.639 mas, bmaj=8.417 mas, bpa=-6.362 degrees
! Estimated noise=608.971 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00484962 Jy
! Component: 100  -  total flux cleaned = -0.00444979 Jy
! Component: 150  -  total flux cleaned = -0.00428393 Jy
! Component: 200  -  total flux cleaned = -0.00401061 Jy
! Total flux subtracted in 200 components = -0.00401061 Jy
! Clean residual min=-0.007518 max=0.004942 Jy/beam
! Clean residual mean=-0.000048 rms=0.001434 Jy/beam
! Combined flux in latest and established models = 3.57937 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 117 components and 3.57937 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.311381Jy  sigma=0.001238
! Fit after  self-cal, rms=0.311380Jy  sigma=0.001238
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000235765 Jy
! Component: 100  -  total flux cleaned = 0.000540099 Jy
! Component: 150  -  total flux cleaned = 0.000715582 Jy
! Component: 200  -  total flux cleaned = 0.000942802 Jy
! Total flux subtracted in 200 components = 0.000942802 Jy
! Clean residual min=-0.006984 max=0.005084 Jy/beam
! Clean residual mean=-0.000049 rms=0.001418 Jy/beam
! Combined flux in latest and established models = 3.58031 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 122 components and 3.58031 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.311340Jy  sigma=0.001237
! Fit after  self-cal, rms=0.311338Jy  sigma=0.001237
! 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.311338Jy  sigma=0.001237
! Fit after  self-cal, rms=0.311624Jy  sigma=0.001236
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.132 mas, bmaj=7.329 mas, bpa=-8.335 degrees
! Estimated noise=1077.75 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 2.54851 Jy
! Component: 100  -  total flux cleaned = 3.11943 Jy
! Component: 150  -  total flux cleaned = 3.33296 Jy
! Component: 200  -  total flux cleaned = 3.43591 Jy
! Total flux subtracted in 200 components = 3.43591 Jy
! Clean residual min=-0.014505 max=0.047999 Jy/beam
! Clean residual mean=-0.000060 rms=0.004972 Jy/beam
! Combined flux in latest and established models = 3.43591 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 22 model components to the UV plane model.
! The established model now contains 22 components and 3.43591 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.644 mas, bmaj=8.416 mas, bpa=-6.357 degrees
! Estimated noise=609.006 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.0740507 Jy
! Component: 100  -  total flux cleaned = 0.110727 Jy
! Component: 150  -  total flux cleaned = 0.129847 Jy
! Component: 200  -  total flux cleaned = 0.140043 Jy
! Total flux subtracted in 200 components = 0.140043 Jy
! Clean residual min=-0.005843 max=0.007097 Jy/beam
! Clean residual mean=-0.000053 rms=0.001481 Jy/beam
! Combined flux in latest and established models = 3.57596 Jy
! Adding 39 model components to the UV plane model.
! The established model now contains 54 components and 3.57596 Jy
! Inverting map 
! Added new window around map position (3, -12.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00450286 Jy
! Component: 100  -  total flux cleaned = 0.00526283 Jy
! Component: 150  -  total flux cleaned = 0.00603549 Jy
! Component: 200  -  total flux cleaned = 0.00630249 Jy
! Total flux subtracted in 200 components = 0.00630249 Jy
! Clean residual min=-0.006014 max=0.005025 Jy/beam
! Clean residual mean=-0.000063 rms=0.001342 Jy/beam
! Combined flux in latest and established models = 3.58226 Jy
! Adding 18 model components to the UV plane model.
! The established model now contains 67 components and 3.58226 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.041 mas, bmaj=11.97 mas, bpa=-8.223 degrees
! Estimated noise=779.975 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00102707 Jy
! Component: 100  -  total flux cleaned = -0.00113864 Jy
! Component: 150  -  total flux cleaned = -0.00107488 Jy
! Component: 200  -  total flux cleaned = -0.00101335 Jy
! Total flux subtracted in 200 components = -0.00101335 Jy
! Clean residual min=-0.006163 max=0.004541 Jy/beam
! Clean residual mean=-0.000155 rms=0.001850 Jy/beam
! Combined flux in latest and established models = 3.58125 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 = 5.74887e-05 Jy
! Component: 100  -  total flux cleaned = -4.03007e-05 Jy
! Component: 150  -  total flux cleaned = -0.000131938 Jy
! Component: 200  -  total flux cleaned = -0.000217951 Jy
! Total flux subtracted in 200 components = -0.000217951 Jy
! Clean residual min=-0.006124 max=0.004541 Jy/beam
! Clean residual mean=-0.000154 rms=0.001834 Jy/beam
! Combined flux in latest and established models = 3.58103 Jy
! Adding 21 model components to the UV plane model.
! The established model now contains 84 components and 3.58103 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.644 mas, bmaj=8.416 mas, bpa=-6.357 degrees
! Estimated noise=609.006 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00170069 Jy
! Component: 100  -  total flux cleaned = 0.00215211 Jy
! Component: 150  -  total flux cleaned = 0.00263181 Jy
! Component: 200  -  total flux cleaned = 0.00271978 Jy
! Total flux subtracted in 200 components = 0.00271978 Jy
! Clean residual min=-0.005328 max=0.005078 Jy/beam
! Clean residual mean=-0.000068 rms=0.001261 Jy/beam
! Combined flux in latest and established models = 3.58375 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 98 components and 3.58375 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.311398Jy  sigma=0.001233
! Fit after  self-cal, rms=0.311353Jy  sigma=0.001233
wmodel J1743-0350_S_1999_03_08_pus_map.mod
! Writing 98 model components to file: J1743-0350_S_1999_03_08_pus_map.mod
wobs J1743-0350_S_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J1743-0350_S_1999_03_08_pus_uvs.fits
wwins J1743-0350_S_1999_03_08_pus_map.win
! wwins: Wrote 2 windows to J1743-0350_S_1999_03_08_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.00142703 Jy
! Component: 100  -  total flux cleaned = -0.00231596 Jy
! Component: 150  -  total flux cleaned = -0.00261718 Jy
! Component: 200  -  total flux cleaned = -0.00247542 Jy
! Component: 250  -  total flux cleaned = -0.00233821 Jy
! Component: 300  -  total flux cleaned = -0.00233564 Jy
! Component: 350  -  total flux cleaned = -0.00259165 Jy
! Component: 400  -  total flux cleaned = -0.0027784 Jy
! Component: 450  -  total flux cleaned = -0.00289905 Jy
! Component: 500  -  total flux cleaned = -0.00283796 Jy
! Component: 550  -  total flux cleaned = -0.00272194 Jy
! Component: 600  -  total flux cleaned = -0.00272281 Jy
! Component: 650  -  total flux cleaned = -0.0026679 Jy
! Component: 700  -  total flux cleaned = -0.00266786 Jy
! Component: 750  -  total flux cleaned = -0.00261434 Jy
! Component: 800  -  total flux cleaned = -0.00261459 Jy
! Component: 850  -  total flux cleaned = -0.00261431 Jy
! Component: 900  -  total flux cleaned = -0.00261359 Jy
! Component: 950  -  total flux cleaned = -0.00266313 Jy
! Component: 1000  -  total flux cleaned = -0.00256494 Jy
! Component: 1050  -  total flux cleaned = -0.00251789 Jy
! Component: 1100  -  total flux cleaned = -0.00261412 Jy
! Component: 1150  -  total flux cleaned = -0.00256778 Jy
! Component: 1200  -  total flux cleaned = -0.00261392 Jy
! Component: 1250  -  total flux cleaned = -0.00252187 Jy
! Component: 1300  -  total flux cleaned = -0.00252146 Jy
! Component: 1350  -  total flux cleaned = -0.00256644 Jy
! Component: 1400  -  total flux cleaned = -0.00256675 Jy
! Component: 1450  -  total flux cleaned = -0.00265478 Jy
! Component: 1500  -  total flux cleaned = -0.00265462 Jy
! Component: 1550  -  total flux cleaned = -0.00269749 Jy
! Component: 1600  -  total flux cleaned = -0.00265532 Jy
! Component: 1650  -  total flux cleaned = -0.00273892 Jy
! Component: 1700  -  total flux cleaned = -0.00265692 Jy
! Component: 1750  -  total flux cleaned = -0.00286055 Jy
! Component: 1800  -  total flux cleaned = -0.00265807 Jy
! Component: 1850  -  total flux cleaned = -0.00273886 Jy
! Component: 1900  -  total flux cleaned = -0.00273907 Jy
! Component: 1950  -  total flux cleaned = -0.00285671 Jy
! Component: 2000  -  total flux cleaned = -0.00285667 Jy
! Total flux subtracted in 2048 components = -0.00281814 Jy
! Clean residual min=-0.002162 max=0.001916 Jy/beam
! Clean residual mean=-0.000060 rms=0.000785 Jy/beam
! Combined flux in latest and established models = 3.58093 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 244 components and 3.58093 Jy
![Exited script file: muppet]
wmap "J1743-0350_S_1999_03_08_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.644 x 8.416 at -6.357 degrees (North through East)
! Clean map  min=-0.0041825  max=3.3325 Jy/beam
! Writing clean map to FITS file: J1743-0350_S_1999_03_08_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 3.33247 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000785589 
device "J1743-0350_S_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J1743-0350_S_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0707214 0.0707214 0.141443 0.282885 0.565771 1.13154 2.26308 4.52617 9.05234 18.1047 36.2093 72.4187
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0023 
print "peak=",int(1000*peak_flux)/1000
! peak= 3.332 
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.644 x 8.416 at -6.357 degrees (North through East)
! Clean map  min=-0.0041825  max=3.3325 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1743-0350_S_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J1743-0350_S_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1743-0350_S_1999_03_08_pus_uvs.log closed on Wed Jan  9 17:34:03 2008