! Started logfile: J2246-1206_S_1999_03_08_pus_uvs.log on Wed Jan  9 17:44:23 2008
obs J2246-1206_S_1999_03_08_pus_uva.fits
! Reading UV FITS file: J2246-1206_S_1999_03_08_pus_uva.fits
! AN table 1: 77 integrations on 190 of 190 possible baselines.
! AN table 2: 19 integrations on 190 of 190 possible baselines.
! AN table 3: 152 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0712861 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2246-1206
! 
! 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 13436 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 J2246-1206_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 1151 telescope corrections were flagged in sub-array 1.
!  A total of 248 telescope corrections were flagged in sub-array 2.
!  A total of 2357 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1152 telescope corrections were flagged in sub-array 1.
!  A total of 248 telescope corrections were flagged in sub-array 2.
!  A total of 2357 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1152 telescope corrections were flagged in sub-array 1.
!  A total of 248 telescope corrections were flagged in sub-array 2.
!  A total of 2338 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1152 telescope corrections were flagged in sub-array 1.
!  A total of 248 telescope corrections were flagged in sub-array 2.
!  A total of 2338 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.358542Jy  sigma=0.008162
! Fit after  self-cal, rms=0.741431Jy  sigma=0.003769
! 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.992 mas, bmaj=4.503 mas, bpa=2.515 degrees
! Estimated noise=1819.3 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.770784 Jy
! Component: 100  -  total flux cleaned = 1.07255 Jy
! Total flux subtracted in 100 components = 1.07255 Jy
! Clean residual min=-0.078054 max=0.141350 Jy/beam
! Clean residual mean=0.000400 rms=0.020118 Jy/beam
! Combined flux in latest and established models = 1.07255 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 1.07255 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.668346Jy  sigma=0.003195
! Fit after  self-cal, rms=0.667739Jy  sigma=0.003185
! Inverting map 
! Added new window around map position (2, 1.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.165607 Jy
! Component: 100  -  total flux cleaned = 0.260324 Jy
! Total flux subtracted in 100 components = 0.260324 Jy
! Clean residual min=-0.067430 max=0.101927 Jy/beam
! Clean residual mean=0.000010 rms=0.015165 Jy/beam
! Combined flux in latest and established models = 1.33287 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 22 components and 1.33287 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.576668Jy  sigma=0.002663
! Fit after  self-cal, rms=0.576376Jy  sigma=0.002655
! Inverting map 
! Added new window around map position (6, 7).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0958465 Jy
! Component: 100  -  total flux cleaned = 0.153908 Jy
! Total flux subtracted in 100 components = 0.153908 Jy
! Clean residual min=-0.058571 max=0.048099 Jy/beam
! Clean residual mean=-0.000260 rms=0.012920 Jy/beam
! Combined flux in latest and established models = 1.48678 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 28 components and 1.48678 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.550017Jy  sigma=0.002481
! Fit after  self-cal, rms=0.549149Jy  sigma=0.002471
! 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.334 mas, bmaj=6.348 mas, bpa=-2.672 degrees
! Estimated noise=943.507 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.0952253 Jy
! Component: 100  -  total flux cleaned = 0.154226 Jy
! Component: 150  -  total flux cleaned = 0.194285 Jy
! Component: 200  -  total flux cleaned = 0.220894 Jy
! Total flux subtracted in 200 components = 0.220894 Jy
! Clean residual min=-0.110522 max=0.061040 Jy/beam
! Clean residual mean=-0.004736 rms=0.025716 Jy/beam
! Combined flux in latest and established models = 1.70768 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 56 components and 1.70768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.512626Jy  sigma=0.002382
! Fit after  self-cal, rms=0.511847Jy  sigma=0.002374
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.00     GC        1.00*    GG        1.00*    
!   HN        1.05     KP        1.19     LA        1.00*    NL        1.09     
!   OV        1.00*    PT        1.00*    SC        0.96     WF        1.00     
!   GN        1.00*    HH        1.00*    KK        1.01     MC        1.00*    
!   MK        0.96     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.01     GC        1.00*    GG        1.00*    
!   HN        1.09     KP        1.00*    LA        1.00*    NL        1.08     
!   OV        1.00*    PT        1.00*    SC        1.03     WF        1.02     
!   GN        1.00     HH        1.00*    KK        0.98     MC        1.00*    
!   MK        0.88     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.10     GC        1.00*    GG        1.00*    
!   HN        0.97     KP        1.07     LA        1.00*    NL        0.69     
!   OV        1.00*    PT        1.16     SC        0.97     WF        0.99     
!   GN        1.11     HH        1.00*    KK        0.98     MC        1.63     
!   MK        0.93     NY        1.00*    ON        1.00*    WZ        1.10     
! 
! 
! Correcting IF 2.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.03     GC        1.00*    GG        1.00*    
!   HN        0.96     KP        1.00*    LA        1.00*    NL        0.96     
!   OV        1.00*    PT        1.00*    SC        1.00     WF        2.64     
!   GN        1.00*    HH        1.00*    KK        0.98     MC        1.00*    
!   MK        0.98     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        1.04     GC        1.00*    GG        1.00*    
!   HN        0.99     KP        1.00*    LA        1.00*    NL        1.01     
!   OV        1.00*    PT        1.00*    SC        1.07     WF        1.09     
!   GN        1.03     HH        1.00*    KK        0.97     MC        1.00*    
!   MK        0.89     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.13     GC        1.00*    GG        1.00*    
!   HN        0.94     KP        1.06     LA        1.00*    NL        0.61     
!   OV        1.00*    PT        1.11     SC        1.03     WF        1.03     
!   GN        1.14     HH        1.00*    KK        0.93     MC        0.99     
!   MK        0.98     NY        1.00*    ON        1.00*    WZ        1.29     
! 
! 
! Correcting IF 3.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.02     GC        1.00*    GG        1.00*    
!   HN        1.21     KP        1.00*    LA        1.00*    NL        1.03     
!   OV        1.00*    PT        1.00*    SC        0.97     WF        1.11     
!   GN        1.00*    HH        1.00*    KK        1.01     MC        1.00*    
!   MK        0.97     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        1.03     GC        1.00*    GG        1.00*    
!   HN        1.28     KP        1.00*    LA        1.00*    NL        1.07     
!   OV        1.00*    PT        1.00*    SC        1.06     WF        1.05     
!   GN        1.02     HH        1.00*    KK        1.00     MC        1.00*    
!   MK        0.90     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.10     GC        1.00*    GG        1.00*    
!   HN        1.19     KP        1.05     LA        1.00*    NL        0.66     
!   OV        1.00*    PT        1.07     SC        0.96     WF        1.04     
!   GN        1.13     HH        1.02     KK        0.95     MC        1.68     
!   MK        0.96     NY        1.00*    ON        1.00*    WZ        1.05     
! 
! 
! Correcting IF 4.
!  A total of 30 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.98     
!   OV        1.00*    PT        1.00*    SC        0.98     WF        1.21     
!   GN        1.00*    HH        1.00*    KK        1.02     MC        1.00*    
!   MK        1.02     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.02     GC        1.00*    GG        1.00*    
!   HN        1.22     KP        1.00*    LA        1.00*    NL        1.02     
!   OV        1.00*    PT        1.00*    SC        1.07     WF        1.06     
!   GN        1.00     HH        1.00*    KK        1.05     MC        1.00*    
!   MK        0.93     NY        1.00*    ON        1.00*    WZ        1.00*    
! 
!  A total of 45 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.11     GC        1.00*    GG        1.00*    
!   HN        1.15     KP        1.08     LA        1.00*    NL        0.62     
!   OV        1.00*    PT        1.09     SC        0.96     WF        1.03     
!   GN        1.12     HH        1.21     KK        0.98     MC        1.59     
!   MK        1.00     NY        1.00*    ON        1.00*    WZ        1.11     
! 
! 
! Fit before self-cal, rms=0.511847Jy  sigma=0.002374
! Fit after  self-cal, rms=0.334079Jy  sigma=0.001833
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.374 mas, bmaj=6.42 mas, bpa=-2.569 degrees
! Estimated noise=975.852 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.02293 Jy
! Component: 100  -  total flux cleaned = 0.0310146 Jy
! Component: 150  -  total flux cleaned = 0.0350603 Jy
! Component: 200  -  total flux cleaned = 0.037458 Jy
! Total flux subtracted in 200 components = 0.0374581 Jy
! Clean residual min=-0.041566 max=0.036082 Jy/beam
! Clean residual mean=-0.001744 rms=0.012783 Jy/beam
! Combined flux in latest and established models = 1.74513 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 71 components and 1.74513 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330576Jy  sigma=0.001817
! Fit after  self-cal, rms=0.330467Jy  sigma=0.001815
! 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.330467Jy  sigma=0.001815
! Fit after  self-cal, rms=0.291033Jy  sigma=0.001389
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.384 mas, bmaj=6.435 mas, bpa=-2.39 degrees
! Estimated noise=983.441 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0120245 Jy
! Component: 100  -  total flux cleaned = -0.0150875 Jy
! Component: 150  -  total flux cleaned = -0.0154813 Jy
! Component: 200  -  total flux cleaned = -0.015464 Jy
! Total flux subtracted in 200 components = -0.015464 Jy
! Clean residual min=-0.011645 max=0.013985 Jy/beam
! Clean residual mean=0.000382 rms=0.003397 Jy/beam
! Combined flux in latest and established models = 1.72967 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 77 components and 1.72967 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289482Jy  sigma=0.001375
! Fit after  self-cal, rms=0.289681Jy  sigma=0.001374
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.000669293 Jy
! Component: 100  -  total flux cleaned = -0.00067466 Jy
! Component: 150  -  total flux cleaned = -0.000443645 Jy
! Component: 200  -  total flux cleaned = -0.000448479 Jy
! Total flux subtracted in 200 components = -0.000448479 Jy
! Clean residual min=-0.011277 max=0.012925 Jy/beam
! Clean residual mean=0.000381 rms=0.003243 Jy/beam
! Combined flux in latest and established models = 1.72922 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 80 components and 1.72922 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289316Jy  sigma=0.001370
! Fit after  self-cal, rms=0.289302Jy  sigma=0.001370
! 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.289302Jy  sigma=0.001370
! Fit after  self-cal, rms=0.296627Jy  sigma=0.001358
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.398 mas, bmaj=6.43 mas, bpa=-2.347 degrees
! Estimated noise=987.543 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00707436 Jy
! Component: 100  -  total flux cleaned = -0.00683843 Jy
! Component: 150  -  total flux cleaned = -0.00661499 Jy
! Component: 200  -  total flux cleaned = -0.00617475 Jy
! Total flux subtracted in 200 components = -0.00617475 Jy
! Clean residual min=-0.008937 max=0.013625 Jy/beam
! Clean residual mean=0.000467 rms=0.002780 Jy/beam
! Combined flux in latest and established models = 1.72305 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 85 components and 1.72305 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.296095Jy  sigma=0.001353
! Fit after  self-cal, rms=0.296178Jy  sigma=0.001353
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 (12, 4.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0134337 Jy
! Component: 100  -  total flux cleaned = 0.0178455 Jy
! Component: 150  -  total flux cleaned = 0.0180931 Jy
! Component: 200  -  total flux cleaned = 0.0177239 Jy
! Total flux subtracted in 200 components = 0.0177239 Jy
! Clean residual min=-0.007991 max=0.007713 Jy/beam
! Clean residual mean=0.000137 rms=0.002233 Jy/beam
! Combined flux in latest and established models = 1.74077 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 99 components and 1.74077 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.295433Jy  sigma=0.001348
! Fit after  self-cal, rms=0.295382Jy  sigma=0.001347
! 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.295382Jy  sigma=0.001347
! Fit after  self-cal, rms=0.299045Jy  sigma=0.001345
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.976 mas, bmaj=11.79 mas, bpa=10.79 degrees
! Estimated noise=1400.73 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000140144 Jy
! Component: 100  -  total flux cleaned = -0.000212846 Jy
! Component: 150  -  total flux cleaned = -0.000600304 Jy
! Component: 200  -  total flux cleaned = -0.000607172 Jy
! Total flux subtracted in 200 components = -0.000607172 Jy
! Clean residual min=-0.008501 max=0.007764 Jy/beam
! Clean residual mean=0.000778 rms=0.002838 Jy/beam
! Combined flux in latest and established models = 1.74016 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 125 components and 1.74016 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.298920Jy  sigma=0.001343
! Fit after  self-cal, rms=0.298888Jy  sigma=0.001343
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.000352478 Jy
! Component: 100  -  total flux cleaned = 0.000508831 Jy
! Component: 150  -  total flux cleaned = 0.000642801 Jy
! Component: 200  -  total flux cleaned = 0.00070553 Jy
! Total flux subtracted in 200 components = 0.00070553 Jy
! Clean residual min=-0.009239 max=0.007957 Jy/beam
! Clean residual mean=0.000743 rms=0.002879 Jy/beam
! Combined flux in latest and established models = 1.74087 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 138 components and 1.74087 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.298884Jy  sigma=0.001343
! Fit after  self-cal, rms=0.298865Jy  sigma=0.001343
! 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.407 mas, bmaj=6.431 mas, bpa=-2.304 degrees
! Estimated noise=989.494 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.407 x 6.431 at -2.304 degrees (North through East)
! Clean map  min=-0.0073262  max=1.0769 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.298865Jy  sigma=0.001343
! Fit after  self-cal, rms=0.323845Jy  sigma=0.001159
! Inverting map and beam 
! Estimated beam: bmin=2.411 mas, bmaj=6.438 mas, bpa=-2.327 degrees
! Estimated noise=987.41 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00144818 Jy
! Component: 100  -  total flux cleaned = -0.00179779 Jy
! Component: 150  -  total flux cleaned = -0.00148382 Jy
! Component: 200  -  total flux cleaned = -0.0010715 Jy
! Total flux subtracted in 200 components = -0.0010715 Jy
! Clean residual min=-0.006121 max=0.006378 Jy/beam
! Clean residual mean=0.000226 rms=0.001513 Jy/beam
! Combined flux in latest and established models = 1.7398 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 145 components and 1.7398 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.323622Jy  sigma=0.001157
! Fit after  self-cal, rms=0.323612Jy  sigma=0.001157
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000176702 Jy
! Component: 100  -  total flux cleaned = 0.000299006 Jy
! Component: 150  -  total flux cleaned = 0.00051511 Jy
! Component: 200  -  total flux cleaned = 0.000516081 Jy
! Total flux subtracted in 200 components = 0.000516081 Jy
! Clean residual min=-0.006184 max=0.006048 Jy/beam
! Clean residual mean=0.000216 rms=0.001472 Jy/beam
! Combined flux in latest and established models = 1.74031 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 151 components and 1.74031 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.323513Jy  sigma=0.001157
! Fit after  self-cal, rms=0.323502Jy  sigma=0.001157
! 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.323502Jy  sigma=0.001157
! Fit after  self-cal, rms=0.326138Jy  sigma=0.001156
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.026 mas, bmaj=4.604 mas, bpa=2.708 degrees
! Estimated noise=1942.93 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.814038 Jy
! Component: 100  -  total flux cleaned = 1.12405 Jy
! Component: 150  -  total flux cleaned = 1.29315 Jy
! Component: 200  -  total flux cleaned = 1.39637 Jy
! Total flux subtracted in 200 components = 1.39637 Jy
! Clean residual min=-0.025585 max=0.058140 Jy/beam
! Clean residual mean=0.000490 rms=0.008127 Jy/beam
! Combined flux in latest and established models = 1.39637 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 1.39637 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.416 mas, bmaj=6.436 mas, bpa=-2.336 degrees
! Estimated noise=988.16 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.0921972 Jy
! Component: 100  -  total flux cleaned = 0.152596 Jy
! Component: 150  -  total flux cleaned = 0.195494 Jy
! Component: 200  -  total flux cleaned = 0.226764 Jy
! Total flux subtracted in 200 components = 0.226764 Jy
! Clean residual min=-0.010305 max=0.023445 Jy/beam
! Clean residual mean=0.002301 rms=0.004025 Jy/beam
! Combined flux in latest and established models = 1.62314 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 54 components and 1.62314 Jy
! Inverting map 
! Added new window around map position (3.5, 9.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0250614 Jy
! Component: 100  -  total flux cleaned = 0.0438726 Jy
! Component: 150  -  total flux cleaned = 0.0587615 Jy
! Component: 200  -  total flux cleaned = 0.0706864 Jy
! Total flux subtracted in 200 components = 0.0706864 Jy
! Clean residual min=-0.006048 max=0.008430 Jy/beam
! Clean residual mean=0.001054 rms=0.002029 Jy/beam
! Combined flux in latest and established models = 1.69382 Jy
! Adding 32 model components to the UV plane model.
! The established model now contains 79 components and 1.69382 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=6.975 mas, bmaj=11.81 mas, bpa=10.71 degrees
! Estimated noise=1391.67 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0165654 Jy
! Component: 100  -  total flux cleaned = 0.0262407 Jy
! Component: 150  -  total flux cleaned = 0.0322095 Jy
! Component: 200  -  total flux cleaned = 0.0359715 Jy
! Total flux subtracted in 200 components = 0.0359715 Jy
! Clean residual min=-0.005334 max=0.006554 Jy/beam
! Clean residual mean=0.001160 rms=0.001830 Jy/beam
! Combined flux in latest and established models = 1.72979 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.00249003 Jy
! Component: 100  -  total flux cleaned = 0.00336765 Jy
! Component: 150  -  total flux cleaned = 0.00392329 Jy
! Component: 200  -  total flux cleaned = 0.00414299 Jy
! Total flux subtracted in 200 components = 0.00414299 Jy
! Clean residual min=-0.005234 max=0.006031 Jy/beam
! Clean residual mean=0.000949 rms=0.001805 Jy/beam
! Combined flux in latest and established models = 1.73394 Jy
! Adding 60 model components to the UV plane model.
! The established model now contains 129 components and 1.73394 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.416 mas, bmaj=6.436 mas, bpa=-2.336 degrees
! Estimated noise=988.16 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00123118 Jy
! Component: 100  -  total flux cleaned = 0.00143988 Jy
! Component: 150  -  total flux cleaned = 0.00125838 Jy
! Component: 200  -  total flux cleaned = 0.00142925 Jy
! Total flux subtracted in 200 components = 0.00142925 Jy
! Clean residual min=-0.005208 max=0.006258 Jy/beam
! Clean residual mean=0.000315 rms=0.001418 Jy/beam
! Combined flux in latest and established models = 1.73537 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 145 components and 1.73537 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.326600Jy  sigma=0.001157
! Fit after  self-cal, rms=0.326465Jy  sigma=0.001156
wmodel J2246-1206_S_1999_03_08_pus_map.mod
! Writing 145 model components to file: J2246-1206_S_1999_03_08_pus_map.mod
wobs J2246-1206_S_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J2246-1206_S_1999_03_08_pus_uvs.fits
wwins J2246-1206_S_1999_03_08_pus_map.win
! wwins: Wrote 5 windows to J2246-1206_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.00226759 Jy
! Component: 100  -  total flux cleaned = 0.00302722 Jy
! Component: 150  -  total flux cleaned = 0.00347504 Jy
! Component: 200  -  total flux cleaned = 0.00406297 Jy
! Component: 250  -  total flux cleaned = 0.00478965 Jy
! Component: 300  -  total flux cleaned = 0.0052569 Jy
! Component: 350  -  total flux cleaned = 0.00571355 Jy
! Component: 400  -  total flux cleaned = 0.0061601 Jy
! Component: 450  -  total flux cleaned = 0.00659591 Jy
! Component: 500  -  total flux cleaned = 0.00695143 Jy
! Component: 550  -  total flux cleaned = 0.00730012 Jy
! Component: 600  -  total flux cleaned = 0.00757483 Jy
! Component: 650  -  total flux cleaned = 0.00791128 Jy
! Component: 700  -  total flux cleaned = 0.0081759 Jy
! Component: 750  -  total flux cleaned = 0.00824176 Jy
! Component: 800  -  total flux cleaned = 0.00849951 Jy
! Component: 850  -  total flux cleaned = 0.00869017 Jy
! Component: 900  -  total flux cleaned = 0.0090013 Jy
! Component: 950  -  total flux cleaned = 0.00912389 Jy
! Component: 1000  -  total flux cleaned = 0.00930562 Jy
! Component: 1050  -  total flux cleaned = 0.00954543 Jy
! Component: 1100  -  total flux cleaned = 0.00972322 Jy
! Component: 1150  -  total flux cleaned = 0.00995744 Jy
! Component: 1200  -  total flux cleaned = 0.0101306 Jy
! Component: 1250  -  total flux cleaned = 0.010302 Jy
! Component: 1300  -  total flux cleaned = 0.0104721 Jy
! Component: 1350  -  total flux cleaned = 0.0105285 Jy
! Component: 1400  -  total flux cleaned = 0.010806 Jy
! Component: 1450  -  total flux cleaned = 0.0109155 Jy
! Component: 1500  -  total flux cleaned = 0.0109697 Jy
! Component: 1550  -  total flux cleaned = 0.0110777 Jy
! Component: 1600  -  total flux cleaned = 0.0111851 Jy
! Component: 1650  -  total flux cleaned = 0.0114498 Jy
! Component: 1700  -  total flux cleaned = 0.0115544 Jy
! Component: 1750  -  total flux cleaned = 0.0117106 Jy
! Component: 1800  -  total flux cleaned = 0.0119676 Jy
! Component: 1850  -  total flux cleaned = 0.0119677 Jy
! Component: 1900  -  total flux cleaned = 0.0121197 Jy
! Component: 1950  -  total flux cleaned = 0.0123703 Jy
! Component: 2000  -  total flux cleaned = 0.0124695 Jy
! Total flux subtracted in 2048 components = 0.012519 Jy
! Clean residual min=-0.003144 max=0.003192 Jy/beam
! Clean residual mean=0.000147 rms=0.000952 Jy/beam
! Combined flux in latest and established models = 1.74788 Jy
keep
! Adding 127 model components to the UV plane model.
! The established model now contains 272 components and 1.74789 Jy
![Exited script file: muppet]
wmap "J2246-1206_S_1999_03_08_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.416 x 6.436 at -2.336 degrees (North through East)
! Clean map  min=-0.0037327  max=1.0851 Jy/beam
! Writing clean map to FITS file: J2246-1206_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 1.08509 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000947494 
device "J2246-1206_S_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J2246-1206_S_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.261959 0.261959 0.523918 1.04784 2.09567 4.19135 8.38269 16.7654 33.5308 67.0615
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0028 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.085 
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.416 x 6.436 at -2.336 degrees (North through East)
! Clean map  min=-0.0037327  max=1.0851 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2246-1206_S_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J2246-1206_S_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2246-1206_S_1999_03_08_pus_uvs.log closed on Wed Jan  9 17:44:38 2008