! Started logfile: J1357+7643_S_1999_03_08_pus_uvs.log on Tue Jan  8 18:26:47 2008
obs J1357+7643_S_1999_03_08_pus_uva.fits
! Reading UV FITS file: J1357+7643_S_1999_03_08_pus_uva.fits
! AN table 1: 115 integrations on 190 of 190 possible baselines.
! AN table 2: 142 integrations on 190 of 190 possible baselines.
! AN table 3: 126 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.253635 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1357+7643
! 
! 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 2332 lines of history.
! 
! Reading 73828 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 J1357+7643_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 1554 telescope corrections were flagged in sub-array 1.
!  A total of 1417 telescope corrections were flagged in sub-array 2.
!  A total of 1501 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1554 telescope corrections were flagged in sub-array 1.
!  A total of 1417 telescope corrections were flagged in sub-array 2.
!  A total of 1501 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1554 telescope corrections were flagged in sub-array 1.
!  A total of 1417 telescope corrections were flagged in sub-array 2.
!  A total of 1501 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1554 telescope corrections were flagged in sub-array 1.
!  A total of 1417 telescope corrections were flagged in sub-array 2.
!  A total of 1501 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.708620Jy  sigma=0.004376
! Fit after  self-cal, rms=0.566983Jy  sigma=0.003548
! 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.101 mas, bmaj=2.302 mas, bpa=-72.69 degrees
! Estimated noise=800.284 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.402438 Jy
! Component: 100  -  total flux cleaned = 0.490201 Jy
! Total flux subtracted in 100 components = 0.490201 Jy
! Clean residual min=-0.009624 max=0.024691 Jy/beam
! Clean residual mean=0.000033 rms=0.002620 Jy/beam
! Combined flux in latest and established models = 0.490201 Jy
! Performing phase self-cal
! Adding 2 model components to the UV plane model.
! The established model now contains 2 components and 0.490201 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.327470Jy  sigma=0.001548
! Fit after  self-cal, rms=0.327468Jy  sigma=0.001548
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0262941 Jy
! Component: 100  -  total flux cleaned = 0.0420707 Jy
! Total flux subtracted in 100 components = 0.0420707 Jy
! Clean residual min=-0.009658 max=0.011515 Jy/beam
! Clean residual mean=0.000012 rms=0.002445 Jy/beam
! Combined flux in latest and established models = 0.532271 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 12 components and 0.532271 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.324320Jy  sigma=0.001514
! Fit after  self-cal, rms=0.324282Jy  sigma=0.001513
! 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.611 mas, bmaj=2.743 mas, bpa=-52.37 degrees
! Estimated noise=395.968 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.0186889 Jy
! Component: 100  -  total flux cleaned = 0.0284886 Jy
! Component: 150  -  total flux cleaned = 0.0344666 Jy
! Component: 200  -  total flux cleaned = 0.038155 Jy
! Total flux subtracted in 200 components = 0.038155 Jy
! Clean residual min=-0.004298 max=0.007280 Jy/beam
! Clean residual mean=-0.000067 rms=0.001224 Jy/beam
! Combined flux in latest and established models = 0.570426 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 22 components and 0.570426 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.323126Jy  sigma=0.001503
! Fit after  self-cal, rms=0.323102Jy  sigma=0.001502
! Inverting map 
! Added new window around map position (-1, -4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0072798 Jy
! Component: 100  -  total flux cleaned = 0.0101615 Jy
! Component: 150  -  total flux cleaned = 0.0116391 Jy
! Component: 200  -  total flux cleaned = 0.012843 Jy
! Total flux subtracted in 200 components = 0.012843 Jy
! Clean residual min=-0.004219 max=0.005536 Jy/beam
! Clean residual mean=-0.000130 rms=0.001145 Jy/beam
! Combined flux in latest and established models = 0.583269 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 44 components and 0.583269 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.322904Jy  sigma=0.001500
! Fit after  self-cal, rms=0.322895Jy  sigma=0.001500
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 51 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.97     GC        0.98     GG        1.00*    
!   HN        1.05     KP        1.00*    LA        1.00*    NL        1.06     
!   OV        1.00*    PT        1.00*    SC        1.12     WF        0.93     
!   GN        0.99     HH        1.00*    KK        1.00     MC        0.99     
!   MK        0.97     NY        0.98     ON        1.00     WZ        0.91     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.01     GC        0.99     GG        1.00*    
!   HN        1.04     KP        0.97     LA        1.01     NL        0.97     
!   OV        0.95     PT        1.04     SC        1.01     WF        0.97     
!   GN        0.97     HH        1.00*    KK        1.07     MC        1.13     
!   MK        1.00*    NY        1.02     ON        0.96     WZ        0.90     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        0.98     GC        0.99     GG        1.00*    
!   HN        0.97     KP        0.98     LA        0.98     NL        1.03     
!   OV        1.00     PT        1.01     SC        1.01     WF        0.99     
!   GN        0.95     HH        1.00*    KK        1.03     MC        1.04     
!   MK        0.96     NY        1.01     ON        1.00     WZ        0.94     
! 
! 
! Correcting IF 2.
!  A total of 51 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.02     GC        1.01     GG        1.00*    
!   HN        0.95     KP        1.00*    LA        1.00*    NL        0.93     
!   OV        1.00*    PT        1.00*    SC        1.11     WF        0.98     
!   GN        0.97     HH        1.00*    KK        1.01     MC        0.99     
!   MK        1.00     NY        0.98     ON        1.02     WZ        0.93     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.06     GC        1.00     GG        1.00*    
!   HN        0.96     KP        0.99     LA        0.98     NL        1.01     
!   OV        0.96     PT        1.00     SC        1.10     WF        0.98     
!   GN        0.99     HH        1.00*    KK        1.05     MC        1.62     
!   MK        1.00*    NY        1.01     ON        0.99     WZ        0.91     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.06     GC        1.00     GG        1.00*    
!   HN        0.95     KP        1.03     LA        0.99     NL        1.03     
!   OV        0.96     PT        1.00     SC        1.06     WF        0.97     
!   GN        0.95     HH        1.00*    KK        1.01     MC        0.87     
!   MK        0.99     NY        0.97     ON        0.89     WZ        0.94     
! 
! 
! Correcting IF 3.
!  A total of 51 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.02     GC        0.99     GG        1.00*    
!   HN        1.22     KP        1.00*    LA        1.00*    NL        1.00     
!   OV        1.00*    PT        1.00*    SC        1.09     WF        0.98     
!   GN        0.98     HH        1.00*    KK        0.98     MC        1.06     
!   MK        1.00     NY        0.99     ON        0.89     WZ        0.96     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.04     GC        0.98     GG        1.00*    
!   HN        1.22     KP        1.03     LA        1.00     NL        0.98     
!   OV        0.98     PT        0.98     SC        1.05     WF        0.97     
!   GN        0.99     HH        1.00*    KK        1.07     MC        0.97     
!   MK        1.00*    NY        0.99     ON        0.98     WZ        0.95     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.03     GC        0.99     GG        1.00*    
!   HN        1.22     KP        1.02     LA        1.01     NL        1.04     
!   OV        1.00     PT        0.96     SC        1.02     WF        0.94     
!   GN        0.94     HH        1.00*    KK        1.00     MC        0.89     
!   MK        0.97     NY        0.99     ON        0.91     WZ        0.97     
! 
! 
! Correcting IF 4.
!  A total of 51 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.01     GC        1.00     GG        1.00*    
!   HN        1.15     KP        1.00*    LA        1.00*    NL        0.93     
!   OV        1.00*    PT        1.00*    SC        1.10     WF        0.97     
!   GN        1.00     HH        1.00*    KK        1.09     MC        0.91     
!   MK        1.02     NY        0.99     ON        0.96     WZ        0.95     
! 
!  A total of 48 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.03     GC        1.00     GG        1.00*    
!   HN        1.18     KP        1.02     LA        0.99     NL        0.99     
!   OV        1.00     PT        0.97     SC        1.05     WF        0.99     
!   GN        0.98     HH        1.00*    KK        1.13     MC        1.11     
!   MK        1.00*    NY        0.99     ON        0.97     WZ        0.92     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        1.00     GC        1.03     GG        1.00*    
!   HN        1.13     KP        1.06     LA        1.02     NL        1.06     
!   OV        0.99     PT        0.89     SC        1.02     WF        0.96     
!   GN        0.94     HH        1.00*    KK        1.09     MC        1.07     
!   MK        1.01     NY        0.99     ON        1.01     WZ        0.95     
! 
! 
! Fit before self-cal, rms=0.322895Jy  sigma=0.001500
! Fit after  self-cal, rms=0.313006Jy  sigma=0.001471
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.615 mas, bmaj=2.739 mas, bpa=-56.61 degrees
! Estimated noise=396.522 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.000416981 Jy
! Component: 100  -  total flux cleaned = -0.000587887 Jy
! Component: 150  -  total flux cleaned = -0.000588836 Jy
! Component: 200  -  total flux cleaned = -0.000454388 Jy
! Total flux subtracted in 200 components = -0.000454388 Jy
! Clean residual min=-0.003625 max=0.003550 Jy/beam
! Clean residual mean=-0.000004 rms=0.000851 Jy/beam
! Combined flux in latest and established models = 0.582815 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 58 components and 0.582815 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.312954Jy  sigma=0.001470
! Fit after  self-cal, rms=0.313000Jy  sigma=0.001470
! 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.313000Jy  sigma=0.001470
! Fit after  self-cal, rms=0.313625Jy  sigma=0.001467
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.616 mas, bmaj=2.738 mas, bpa=-55.76 degrees
! Estimated noise=396.987 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -9.67732e-06 Jy
! Component: 100  -  total flux cleaned = 5.51253e-05 Jy
! Component: 150  -  total flux cleaned = 0.000115526 Jy
! Component: 200  -  total flux cleaned = 0.00022584 Jy
! Total flux subtracted in 200 components = 0.00022584 Jy
! Clean residual min=-0.003330 max=0.003500 Jy/beam
! Clean residual mean=0.000001 rms=0.000822 Jy/beam
! Combined flux in latest and established models = 0.583041 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 65 components and 0.583041 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.313590Jy  sigma=0.001467
! Fit after  self-cal, rms=0.313601Jy  sigma=0.001467
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.000121198 Jy
! Component: 100  -  total flux cleaned = 0.000173997 Jy
! Component: 150  -  total flux cleaned = 0.000224474 Jy
! Component: 200  -  total flux cleaned = 0.000273299 Jy
! Total flux subtracted in 200 components = 0.000273299 Jy
! Clean residual min=-0.003319 max=0.003363 Jy/beam
! Clean residual mean=-0.000000 rms=0.000819 Jy/beam
! Combined flux in latest and established models = 0.583314 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 66 components and 0.583314 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.313582Jy  sigma=0.001467
! Fit after  self-cal, rms=0.313582Jy  sigma=0.001467
! 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.313582Jy  sigma=0.001467
! Fit after  self-cal, rms=0.348789Jy  sigma=0.001451
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.612 mas, bmaj=2.742 mas, bpa=-53.02 degrees
! Estimated noise=397.697 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000624743 Jy
! Component: 100  -  total flux cleaned = 0.000424418 Jy
! Component: 150  -  total flux cleaned = 0.000482684 Jy
! Component: 200  -  total flux cleaned = 0.000429394 Jy
! Total flux subtracted in 200 components = 0.000429394 Jy
! Clean residual min=-0.002691 max=0.002910 Jy/beam
! Clean residual mean=0.000005 rms=0.000697 Jy/beam
! Combined flux in latest and established models = 0.583743 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 73 components and 0.583743 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.348766Jy  sigma=0.001451
! Fit after  self-cal, rms=0.348981Jy  sigma=0.001450
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 = 1.88117e-05 Jy
! Component: 100  -  total flux cleaned = 2.02224e-05 Jy
! Component: 150  -  total flux cleaned = 6.02373e-05 Jy
! Component: 200  -  total flux cleaned = 6.01709e-05 Jy
! Total flux subtracted in 200 components = 6.01709e-05 Jy
! Clean residual min=-0.002668 max=0.002921 Jy/beam
! Clean residual mean=0.000005 rms=0.000695 Jy/beam
! Combined flux in latest and established models = 0.583803 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 79 components and 0.583803 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.348971Jy  sigma=0.001450
! Fit after  self-cal, rms=0.348970Jy  sigma=0.001450
! 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.348970Jy  sigma=0.001450
! Fit after  self-cal, rms=0.352459Jy  sigma=0.001450
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.01 mas, bmaj=8.938 mas, bpa=-17.18 degrees
! Estimated noise=619.101 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0023485 Jy
! Component: 100  -  total flux cleaned = 0.00315837 Jy
! Component: 150  -  total flux cleaned = 0.00329643 Jy
! Component: 200  -  total flux cleaned = 0.00335712 Jy
! Total flux subtracted in 200 components = 0.00335712 Jy
! Clean residual min=-0.004606 max=0.004343 Jy/beam
! Clean residual mean=-0.000003 rms=0.001607 Jy/beam
! Combined flux in latest and established models = 0.587161 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 83 components and 0.587161 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352454Jy  sigma=0.001450
! Fit after  self-cal, rms=0.352457Jy  sigma=0.001450
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.000261122 Jy
! Component: 100  -  total flux cleaned = 0.000350127 Jy
! Component: 150  -  total flux cleaned = 0.000404635 Jy
! Component: 200  -  total flux cleaned = 0.000454363 Jy
! Total flux subtracted in 200 components = 0.000454363 Jy
! Clean residual min=-0.004674 max=0.004269 Jy/beam
! Clean residual mean=-0.000011 rms=0.001608 Jy/beam
! Combined flux in latest and established models = 0.587615 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 84 components and 0.587615 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352457Jy  sigma=0.001450
! Fit after  self-cal, rms=0.352457Jy  sigma=0.001450
! 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.61 mas, bmaj=2.741 mas, bpa=-52.57 degrees
! Estimated noise=397.93 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.61 x 2.741 at -52.57 degrees (North through East)
! Clean map  min=-0.0026371  max=0.52942 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.352457Jy  sigma=0.001450
! Fit after  self-cal, rms=0.650531Jy  sigma=0.001363
! Inverting map and beam 
! Estimated beam: bmin=2.61 mas, bmaj=2.74 mas, bpa=-52.38 degrees
! Estimated noise=398.624 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000255456 Jy
! Component: 100  -  total flux cleaned = -0.000110208 Jy
! Component: 150  -  total flux cleaned = -0.000466859 Jy
! Component: 200  -  total flux cleaned = -0.000772872 Jy
! Total flux subtracted in 200 components = -0.000772872 Jy
! Clean residual min=-0.002350 max=0.002678 Jy/beam
! Clean residual mean=0.000024 rms=0.000655 Jy/beam
! Combined flux in latest and established models = 0.586842 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 87 components and 0.586842 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.650523Jy  sigma=0.001363
! Fit after  self-cal, rms=0.650556Jy  sigma=0.001363
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00038301 Jy
! Component: 100  -  total flux cleaned = -0.000491112 Jy
! Component: 150  -  total flux cleaned = -0.000621999 Jy
! Component: 200  -  total flux cleaned = -0.000683254 Jy
! Total flux subtracted in 200 components = -0.000683254 Jy
! Clean residual min=-0.002311 max=0.002628 Jy/beam
! Clean residual mean=0.000027 rms=0.000654 Jy/beam
! Combined flux in latest and established models = 0.586159 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 89 components and 0.586159 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.650557Jy  sigma=0.001363
! Fit after  self-cal, rms=0.650567Jy  sigma=0.001363
! 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.650567Jy  sigma=0.001363
! Fit after  self-cal, rms=0.673536Jy  sigma=0.001363
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.118 mas, bmaj=2.284 mas, bpa=-65.96 degrees
! Estimated noise=818.326 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.410063 Jy
! Component: 100  -  total flux cleaned = 0.499484 Jy
! Component: 150  -  total flux cleaned = 0.525031 Jy
! Component: 200  -  total flux cleaned = 0.538841 Jy
! Total flux subtracted in 200 components = 0.538841 Jy
! Clean residual min=-0.005240 max=0.007369 Jy/beam
! Clean residual mean=0.000024 rms=0.001247 Jy/beam
! Combined flux in latest and established models = 0.538841 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.538841 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.608 mas, bmaj=2.739 mas, bpa=-51.83 degrees
! Estimated noise=399.089 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.0154563 Jy
! Component: 100  -  total flux cleaned = 0.0244116 Jy
! Component: 150  -  total flux cleaned = 0.0304585 Jy
! Component: 200  -  total flux cleaned = 0.034815 Jy
! Total flux subtracted in 200 components = 0.034815 Jy
! Clean residual min=-0.002364 max=0.003654 Jy/beam
! Clean residual mean=0.000094 rms=0.000713 Jy/beam
! Combined flux in latest and established models = 0.573656 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 51 components and 0.573656 Jy
! Inverting map 
! Added new window around map position (4, -5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00375427 Jy
! Component: 100  -  total flux cleaned = 0.00640371 Jy
! Component: 150  -  total flux cleaned = 0.00845671 Jy
! Component: 200  -  total flux cleaned = 0.010054 Jy
! Total flux subtracted in 200 components = 0.010054 Jy
! Clean residual min=-0.002296 max=0.002806 Jy/beam
! Clean residual mean=0.000046 rms=0.000653 Jy/beam
! Combined flux in latest and established models = 0.58371 Jy
! Adding 20 model components to the UV plane model.
! The established model now contains 61 components and 0.58371 Jy
! Inverting map 
! Added new window around map position (-9, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00270502 Jy
! Component: 100  -  total flux cleaned = 0.00433355 Jy
! Component: 150  -  total flux cleaned = 0.00534403 Jy
! Component: 200  -  total flux cleaned = 0.00595733 Jy
! Total flux subtracted in 200 components = 0.00595732 Jy
! Clean residual min=-0.002286 max=0.002696 Jy/beam
! Clean residual mean=0.000016 rms=0.000632 Jy/beam
! Combined flux in latest and established models = 0.589667 Jy
! Adding 29 model components to the UV plane model.
! The established model now contains 82 components and 0.589667 Jy
! Inverting map 
! Added new window around map position (-38.5, 36).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00265942 Jy
! Component: 100  -  total flux cleaned = 0.00310042 Jy
! Component: 150  -  total flux cleaned = 0.0034224 Jy
! Component: 200  -  total flux cleaned = 0.00370779 Jy
! Total flux subtracted in 200 components = 0.00370779 Jy
! Clean residual min=-0.002285 max=0.002437 Jy/beam
! Clean residual mean=-0.000007 rms=0.000617 Jy/beam
! Combined flux in latest and established models = 0.593375 Jy
! Adding 22 model components to the UV plane model.
! The established model now contains 96 components and 0.593375 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.017 mas, bmaj=8.947 mas, bpa=-17.04 degrees
! Estimated noise=620.669 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000789435 Jy
! Component: 100  -  total flux cleaned = 0.00123427 Jy
! Component: 150  -  total flux cleaned = 0.00136843 Jy
! Component: 200  -  total flux cleaned = 0.00145663 Jy
! Total flux subtracted in 200 components = 0.00145663 Jy
! Clean residual min=-0.004019 max=0.003530 Jy/beam
! Clean residual mean=-0.000048 rms=0.001161 Jy/beam
! Combined flux in latest and established models = 0.594832 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 = 2.53595e-05 Jy
! Component: 100  -  total flux cleaned = 4.96585e-05 Jy
! Component: 150  -  total flux cleaned = 5.00229e-05 Jy
! Component: 200  -  total flux cleaned = 5.08869e-05 Jy
! Total flux subtracted in 200 components = 5.08869e-05 Jy
! Clean residual min=-0.004022 max=0.003510 Jy/beam
! Clean residual mean=-0.000048 rms=0.001156 Jy/beam
! Combined flux in latest and established models = 0.594883 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 120 components and 0.594883 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.608 mas, bmaj=2.739 mas, bpa=-51.83 degrees
! Estimated noise=399.089 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000136426 Jy
! Component: 100  -  total flux cleaned = -0.000215946 Jy
! Component: 150  -  total flux cleaned = -0.000144479 Jy
! Component: 200  -  total flux cleaned = -7.83663e-05 Jy
! Total flux subtracted in 200 components = -7.83663e-05 Jy
! Clean residual min=-0.002289 max=0.002350 Jy/beam
! Clean residual mean=-0.000014 rms=0.000614 Jy/beam
! Combined flux in latest and established models = 0.594804 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 132 components and 0.594804 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.673514Jy  sigma=0.001362
! Fit after  self-cal, rms=0.673575Jy  sigma=0.001362
wmodel J1357+7643_S_1999_03_08_pus_map.mod
! Writing 132 model components to file: J1357+7643_S_1999_03_08_pus_map.mod
wobs J1357+7643_S_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J1357+7643_S_1999_03_08_pus_uvs.fits
wwins J1357+7643_S_1999_03_08_pus_map.win
! wwins: Wrote 5 windows to J1357+7643_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 = 3.41721e-06 Jy
! Component: 100  -  total flux cleaned = -0.000159922 Jy
! Component: 150  -  total flux cleaned = -0.000199247 Jy
! Component: 200  -  total flux cleaned = -0.000199183 Jy
! Component: 250  -  total flux cleaned = -0.000311156 Jy
! Component: 300  -  total flux cleaned = -0.000311141 Jy
! Component: 350  -  total flux cleaned = -0.000310797 Jy
! Component: 400  -  total flux cleaned = -0.00031024 Jy
! Component: 450  -  total flux cleaned = -0.000309375 Jy
! Component: 500  -  total flux cleaned = -0.000308906 Jy
! Component: 550  -  total flux cleaned = -0.000342395 Jy
! Component: 600  -  total flux cleaned = -0.000308466 Jy
! Component: 650  -  total flux cleaned = -0.00034163 Jy
! Component: 700  -  total flux cleaned = -0.000374267 Jy
! Component: 750  -  total flux cleaned = -0.000341432 Jy
! Component: 800  -  total flux cleaned = -0.000406201 Jy
! Component: 850  -  total flux cleaned = -0.000470236 Jy
! Component: 900  -  total flux cleaned = -0.000438216 Jy
! Component: 950  -  total flux cleaned = -0.000533154 Jy
! Component: 1000  -  total flux cleaned = -0.000564334 Jy
! Component: 1050  -  total flux cleaned = -0.000626553 Jy
! Component: 1100  -  total flux cleaned = -0.000595442 Jy
! Component: 1150  -  total flux cleaned = -0.000748669 Jy
! Component: 1200  -  total flux cleaned = -0.000718176 Jy
! Component: 1250  -  total flux cleaned = -0.00083898 Jy
! Component: 1300  -  total flux cleaned = -0.000868845 Jy
! Component: 1350  -  total flux cleaned = -0.000868744 Jy
! Component: 1400  -  total flux cleaned = -0.000957825 Jy
! Component: 1450  -  total flux cleaned = -0.000957651 Jy
! Component: 1500  -  total flux cleaned = -0.000957603 Jy
! Component: 1550  -  total flux cleaned = -0.000928384 Jy
! Component: 1600  -  total flux cleaned = -0.00092842 Jy
! Component: 1650  -  total flux cleaned = -0.000957232 Jy
! Component: 1700  -  total flux cleaned = -0.00104313 Jy
! Component: 1750  -  total flux cleaned = -0.00104308 Jy
! Component: 1800  -  total flux cleaned = -0.00104307 Jy
! Component: 1850  -  total flux cleaned = -0.00118377 Jy
! Component: 1900  -  total flux cleaned = -0.00115581 Jy
! Component: 1950  -  total flux cleaned = -0.00126716 Jy
! Component: 2000  -  total flux cleaned = -0.0012671 Jy
! Total flux subtracted in 2048 components = -0.00132215 Jy
! Clean residual min=-0.001728 max=0.001563 Jy/beam
! Clean residual mean=-0.000007 rms=0.000525 Jy/beam
! Combined flux in latest and established models = 0.593482 Jy
keep
! Adding 176 model components to the UV plane model.
! The established model now contains 308 components and 0.593482 Jy
![Exited script file: muppet]
wmap "J1357+7643_S_1999_03_08_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.608 x 2.739 at -51.83 degrees (North through East)
! Clean map  min=-0.0020828  max=0.5325 Jy/beam
! Writing clean map to FITS file: J1357+7643_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 0.532502 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000526155 
device "J1357+7643_S_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J1357+7643_S_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.296424 0.296424 0.592848 1.1857 2.37139 4.74279 9.48557 18.9711 37.9423 75.8846
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.532 
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.608 x 2.739 at -51.83 degrees (North through East)
! Clean map  min=-0.0020828  max=0.5325 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1357+7643_S_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J1357+7643_S_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1357+7643_S_1999_03_08_pus_uvs.log closed on Tue Jan  8 18:27:16 2008