! Started logfile: J2218-0335_S_1999_12_20_pus_uvs.log on Fri Dec 21 13:39:16 2007
obs J2218-0335_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J2218-0335_S_1999_12_20_pus_uva.fits
! AN table 1: 99 integrations on 190 of 190 possible baselines.
! AN table 2: 12 integrations on 190 of 190 possible baselines.
! AN table 3: 57 integrations on 190 of 190 possible baselines.
! AN table 4: 136 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.111236 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2218-0335
! 
! 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 2302 lines of history.
! 
! Reading 25700 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 J2218-0335_S_1999_12_20_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 1805 telescope corrections were flagged in sub-array 1.
!  A total of 210 telescope corrections were flagged in sub-array 2.
!  A total of 1045 telescope corrections were flagged in sub-array 3.
!  A total of 1541 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1805 telescope corrections were flagged in sub-array 1.
!  A total of 210 telescope corrections were flagged in sub-array 2.
!  A total of 1039 telescope corrections were flagged in sub-array 3.
!  A total of 1541 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1950 telescope corrections were flagged in sub-array 1.
!  A total of 210 telescope corrections were flagged in sub-array 2.
!  A total of 1080 telescope corrections were flagged in sub-array 3.
!  A total of 1608 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1805 telescope corrections were flagged in sub-array 1.
!  A total of 210 telescope corrections were flagged in sub-array 2.
!  A total of 1048 telescope corrections were flagged in sub-array 3.
!  A total of 1540 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.700141Jy  sigma=0.014505
! Fit after  self-cal, rms=0.884802Jy  sigma=0.007315
! 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.926 mas, bmaj=3.736 mas, bpa=6.174 degrees
! Estimated noise=1154.38 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 = 1.30908 Jy
! Component: 100  -  total flux cleaned = 1.68395 Jy
! Total flux subtracted in 100 components = 1.68395 Jy
! Clean residual min=-0.060840 max=0.159234 Jy/beam
! Clean residual mean=0.001064 rms=0.017709 Jy/beam
! Combined flux in latest and established models = 1.68395 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 17 components and 1.68395 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.418659Jy  sigma=0.003239
! Fit after  self-cal, rms=0.418697Jy  sigma=0.003239
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.17875 Jy
! Component: 100  -  total flux cleaned = 0.27703 Jy
! Total flux subtracted in 100 components = 0.27703 Jy
! Clean residual min=-0.046963 max=0.053583 Jy/beam
! Clean residual mean=0.000538 rms=0.010464 Jy/beam
! Combined flux in latest and established models = 1.96098 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 27 components and 1.96098 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.331122Jy  sigma=0.002261
! Fit after  self-cal, rms=0.331069Jy  sigma=0.002261
! 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.428 mas, bmaj=4.515 mas, bpa=0.7923 degrees
! Estimated noise=654.128 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.0761167 Jy
! Component: 100  -  total flux cleaned = 0.109687 Jy
! Component: 150  -  total flux cleaned = 0.125966 Jy
! Component: 200  -  total flux cleaned = 0.13416 Jy
! Total flux subtracted in 200 components = 0.13416 Jy
! Clean residual min=-0.032400 max=0.047785 Jy/beam
! Clean residual mean=0.000469 rms=0.008689 Jy/beam
! Combined flux in latest and established models = 2.09514 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 45 components and 2.09514 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.321994Jy  sigma=0.002080
! Fit after  self-cal, rms=0.321949Jy  sigma=0.002080
! Inverting map 
! Added new window around map position (-27.5, 45).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0407077 Jy
! Component: 100  -  total flux cleaned = 0.0546629 Jy
! Component: 150  -  total flux cleaned = 0.0605216 Jy
! Component: 200  -  total flux cleaned = 0.0630411 Jy
! Total flux subtracted in 200 components = 0.0630411 Jy
! Clean residual min=-0.033090 max=0.036123 Jy/beam
! Clean residual mean=0.000034 rms=0.007609 Jy/beam
! Combined flux in latest and established models = 2.15818 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 65 components and 2.15818 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317418Jy  sigma=0.002030
! Fit after  self-cal, rms=0.316856Jy  sigma=0.002023
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 135 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.93     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        1.58     MK        1.00*    NY        1.00*    ON        0.95     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.07     GN        1.00*    NL        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        1.15     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        1.61     MK        1.00*    NY        1.00*    ON        0.98     
!   OV        1.00*    PT        1.00*    SC        1.25     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.98     GC        1.00*    HH        0.96     
!   HN        0.98     KK        1.02     KP        0.97     LA        1.00     
!   MC        1.07     MK        1.01     NY        1.00*    ON        1.00     
!   OV        0.97     PT        1.02     SC        1.00     TS        1.00*    
!   WF        1.01     WZ        0.92     GN        0.93     NL        0.99     
! 
! 
! Correcting IF 2.
!  A total of 135 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.95     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        2.25     MK        1.00*    NY        1.00*    ON        0.95     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.15     GN        1.00*    NL        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        1.09     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        0.80     MK        1.00*    NY        1.00*    ON        1.10     
!   OV        1.00*    PT        1.00*    SC        1.25     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        1.03     GC        1.00*    HH        0.97     
!   HN        1.03     KK        1.04     KP        1.01     LA        0.97     
!   MC        1.08     MK        0.98     NY        1.00*    ON        0.99     
!   OV        0.96     PT        0.99     SC        1.00     TS        1.00*    
!   WF        0.99     WZ        0.97     GN        0.96     NL        1.23     
! 
! 
! Correcting IF 3.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.01     GC        1.00*    HH        0.97     
!   HN        1.02     KK        1.06     KP        1.02     LA        1.01     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        0.99     
!   OV        0.98     PT        0.95     SC        1.04     TS        1.00*    
!   WF        1.01     WZ        0.96     GN        0.95     NL        0.96     
! 
! 
! Correcting IF 4.
!  A total of 135 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        0.84     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        1.01     MK        1.00*    NY        1.00*    ON        1.17     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.02     GN        1.00*    NL        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    HH        1.04     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        1.47     MK        1.00*    NY        1.00*    ON        0.98     
!   OV        1.00*    PT        1.00*    SC        1.27     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.00     GC        1.97     HH        0.98     
!   HN        1.01     KK        1.06     KP        1.02     LA        1.02     
!   MC        1.72     MK        1.02     NY        1.00*    ON        0.98     
!   OV        0.93     PT        0.90     SC        1.03     TS        1.00*    
!   WF        1.01     WZ        0.98     GN        0.94     NL        0.97     
! 
! 
! Fit before self-cal, rms=0.316856Jy  sigma=0.002023
! Fit after  self-cal, rms=0.288006Jy  sigma=0.001662
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.443 mas, bmaj=4.767 mas, bpa=0.965 degrees
! Estimated noise=662.435 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.015603 Jy
! Component: 100  -  total flux cleaned = -0.0181579 Jy
! Component: 150  -  total flux cleaned = -0.0188696 Jy
! Component: 200  -  total flux cleaned = -0.0197821 Jy
! Total flux subtracted in 200 components = -0.0197821 Jy
! Clean residual min=-0.020875 max=0.016483 Jy/beam
! Clean residual mean=0.000315 rms=0.004589 Jy/beam
! Combined flux in latest and established models = 2.1384 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 77 components and 2.1384 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.286311Jy  sigma=0.001655
! Fit after  self-cal, rms=0.286787Jy  sigma=0.001654
! 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.286787Jy  sigma=0.001654
! Fit after  self-cal, rms=0.274244Jy  sigma=0.001506
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.451 mas, bmaj=4.755 mas, bpa=1.222 degrees
! Estimated noise=662.136 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0120949 Jy
! Component: 100  -  total flux cleaned = -0.0155039 Jy
! Component: 150  -  total flux cleaned = -0.0185098 Jy
! Component: 200  -  total flux cleaned = -0.0205025 Jy
! Total flux subtracted in 200 components = -0.0205025 Jy
! Clean residual min=-0.008768 max=0.008805 Jy/beam
! Clean residual mean=0.000135 rms=0.002333 Jy/beam
! Combined flux in latest and established models = 2.1179 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 85 components and 2.1179 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273227Jy  sigma=0.001499
! Fit after  self-cal, rms=0.273145Jy  sigma=0.001498
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.00264315 Jy
! Component: 100  -  total flux cleaned = -0.0034733 Jy
! Component: 150  -  total flux cleaned = -0.004206 Jy
! Component: 200  -  total flux cleaned = -0.00487506 Jy
! Total flux subtracted in 200 components = -0.00487506 Jy
! Clean residual min=-0.008816 max=0.008861 Jy/beam
! Clean residual mean=0.000162 rms=0.002262 Jy/beam
! Combined flux in latest and established models = 2.11303 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 90 components and 2.11303 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.272891Jy  sigma=0.001497
! Fit after  self-cal, rms=0.272901Jy  sigma=0.001497
! 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.272901Jy  sigma=0.001497
! Fit after  self-cal, rms=0.273853Jy  sigma=0.001494
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.457 mas, bmaj=4.77 mas, bpa=1.263 degrees
! Estimated noise=662.785 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00794471 Jy
! Component: 100  -  total flux cleaned = -0.0100899 Jy
! Component: 150  -  total flux cleaned = -0.0120077 Jy
! Component: 200  -  total flux cleaned = -0.0134537 Jy
! Total flux subtracted in 200 components = -0.0134537 Jy
! Clean residual min=-0.007533 max=0.008403 Jy/beam
! Clean residual mean=0.000177 rms=0.002063 Jy/beam
! Combined flux in latest and established models = 2.09957 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 95 components and 2.09957 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273339Jy  sigma=0.001490
! Fit after  self-cal, rms=0.273356Jy  sigma=0.001490
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.00193916 Jy
! Component: 100  -  total flux cleaned = -0.00295867 Jy
! Component: 150  -  total flux cleaned = -0.00375322 Jy
! Component: 200  -  total flux cleaned = -0.00416801 Jy
! Total flux subtracted in 200 components = -0.00416801 Jy
! Clean residual min=-0.007547 max=0.008365 Jy/beam
! Clean residual mean=0.000202 rms=0.002013 Jy/beam
! Combined flux in latest and established models = 2.0954 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 98 components and 2.0954 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273208Jy  sigma=0.001490
! Fit after  self-cal, rms=0.273214Jy  sigma=0.001490
! 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.273214Jy  sigma=0.001490
! Fit after  self-cal, rms=0.274126Jy  sigma=0.001488
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.035 mas, bmaj=12.62 mas, bpa=-8.241 degrees
! Estimated noise=857.474 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00808222 Jy
! Component: 100  -  total flux cleaned = -0.011554 Jy
! Component: 150  -  total flux cleaned = -0.0130412 Jy
! Component: 200  -  total flux cleaned = -0.0133115 Jy
! Total flux subtracted in 200 components = -0.0133115 Jy
! Clean residual min=-0.008552 max=0.012276 Jy/beam
! Clean residual mean=0.000615 rms=0.003086 Jy/beam
! Combined flux in latest and established models = 2.08209 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 109 components and 2.08209 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273994Jy  sigma=0.001487
! Fit after  self-cal, rms=0.273996Jy  sigma=0.001486
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.00199883 Jy
! Component: 100  -  total flux cleaned = -0.00214821 Jy
! Component: 150  -  total flux cleaned = -0.00214794 Jy
! Component: 200  -  total flux cleaned = -0.00214614 Jy
! Total flux subtracted in 200 components = -0.00214614 Jy
! Clean residual min=-0.008527 max=0.012159 Jy/beam
! Clean residual mean=0.000641 rms=0.003046 Jy/beam
! Combined flux in latest and established models = 2.07995 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 114 components and 2.07995 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273981Jy  sigma=0.001486
! Fit after  self-cal, rms=0.273982Jy  sigma=0.001486
! 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.462 mas, bmaj=4.781 mas, bpa=1.294 degrees
! Estimated noise=663.29 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.462 x 4.781 at 1.294 degrees (North through East)
! Clean map  min=-0.0063069  max=1.7658 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.273982Jy  sigma=0.001486
! Fit after  self-cal, rms=0.254805Jy  sigma=0.001210
! Inverting map and beam 
! Estimated beam: bmin=2.46 mas, bmaj=4.791 mas, bpa=1.266 degrees
! Estimated noise=661.962 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00472109 Jy
! Component: 100  -  total flux cleaned = -0.00573177 Jy
! Component: 150  -  total flux cleaned = -0.0064598 Jy
! Component: 200  -  total flux cleaned = -0.0069883 Jy
! Total flux subtracted in 200 components = -0.0069883 Jy
! Clean residual min=-0.005928 max=0.007642 Jy/beam
! Clean residual mean=0.000240 rms=0.001641 Jy/beam
! Combined flux in latest and established models = 2.07296 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 120 components and 2.07296 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254655Jy  sigma=0.001209
! Fit after  self-cal, rms=0.254658Jy  sigma=0.001209
! Inverting map 
! Added new window around map position (-6, -30.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00809842 Jy
! Component: 100  -  total flux cleaned = 0.0129761 Jy
! Component: 150  -  total flux cleaned = 0.0163074 Jy
! Component: 200  -  total flux cleaned = 0.0178461 Jy
! Total flux subtracted in 200 components = 0.0178461 Jy
! Clean residual min=-0.005531 max=0.005806 Jy/beam
! Clean residual mean=0.000144 rms=0.001394 Jy/beam
! Combined flux in latest and established models = 2.0908 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 147 components and 2.0908 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254256Jy  sigma=0.001206
! Fit after  self-cal, rms=0.254255Jy  sigma=0.001206
! 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.254255Jy  sigma=0.001206
! Fit after  self-cal, rms=0.255285Jy  sigma=0.001206
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.954 mas, bmaj=3.759 mas, bpa=6.496 degrees
! Estimated noise=1217.95 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.34463 Jy
! Component: 100  -  total flux cleaned = 1.71676 Jy
! Component: 150  -  total flux cleaned = 1.87474 Jy
! Component: 200  -  total flux cleaned = 1.95895 Jy
! Total flux subtracted in 200 components = 1.95895 Jy
! Clean residual min=-0.014889 max=0.040798 Jy/beam
! Clean residual mean=0.000319 rms=0.004522 Jy/beam
! Combined flux in latest and established models = 1.95895 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 26 model components to the UV plane model.
! The established model now contains 26 components and 1.95895 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.463 mas, bmaj=4.798 mas, bpa=1.24 degrees
! Estimated noise=661.88 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.0544667 Jy
! Component: 100  -  total flux cleaned = 0.0789278 Jy
! Component: 150  -  total flux cleaned = 0.0921657 Jy
! Component: 200  -  total flux cleaned = 0.101521 Jy
! Total flux subtracted in 200 components = 0.101521 Jy
! Clean residual min=-0.006355 max=0.008089 Jy/beam
! Clean residual mean=0.000301 rms=0.001710 Jy/beam
! Combined flux in latest and established models = 2.06047 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 45 components and 2.06047 Jy
! Inverting map 
! Added new window around map position (1, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00823777 Jy
! Component: 100  -  total flux cleaned = 0.014502 Jy
! Component: 150  -  total flux cleaned = 0.0185292 Jy
! Component: 200  -  total flux cleaned = 0.0205742 Jy
! Total flux subtracted in 200 components = 0.0205742 Jy
! Clean residual min=-0.006302 max=0.005761 Jy/beam
! Clean residual mean=0.000193 rms=0.001410 Jy/beam
! Combined flux in latest and established models = 2.08104 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 64 components and 2.08104 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.036 mas, bmaj=12.63 mas, bpa=-8.271 degrees
! Estimated noise=854.77 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00574534 Jy
! Component: 100  -  total flux cleaned = 0.00814691 Jy
! Component: 150  -  total flux cleaned = 0.00912075 Jy
! Component: 200  -  total flux cleaned = 0.00974624 Jy
! Total flux subtracted in 200 components = 0.00974624 Jy
! Clean residual min=-0.004768 max=0.006741 Jy/beam
! Clean residual mean=0.000372 rms=0.001773 Jy/beam
! Combined flux in latest and established models = 2.09079 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.000636181 Jy
! Component: 100  -  total flux cleaned = 0.00118402 Jy
! Component: 150  -  total flux cleaned = 0.00165418 Jy
! Component: 200  -  total flux cleaned = 0.00200384 Jy
! Total flux subtracted in 200 components = 0.00200384 Jy
! Clean residual min=-0.004483 max=0.006579 Jy/beam
! Clean residual mean=0.000345 rms=0.001732 Jy/beam
! Combined flux in latest and established models = 2.09279 Jy
! Adding 47 model components to the UV plane model.
! The established model now contains 106 components and 2.09279 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.463 mas, bmaj=4.798 mas, bpa=1.24 degrees
! Estimated noise=661.88 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000804243 Jy
! Component: 100  -  total flux cleaned = -0.000950117 Jy
! Component: 150  -  total flux cleaned = -0.000948726 Jy
! Component: 200  -  total flux cleaned = -0.00094578 Jy
! Total flux subtracted in 200 components = -0.00094578 Jy
! Clean residual min=-0.005602 max=0.005201 Jy/beam
! Clean residual mean=0.000137 rms=0.001268 Jy/beam
! Combined flux in latest and established models = 2.09185 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 115 components and 2.09185 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.255143Jy  sigma=0.001203
! Fit after  self-cal, rms=0.255164Jy  sigma=0.001203
wmodel J2218-0335_S_1999_12_20_pus_map.mod
! Writing 115 model components to file: J2218-0335_S_1999_12_20_pus_map.mod
wobs J2218-0335_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J2218-0335_S_1999_12_20_pus_uvs.fits
wwins J2218-0335_S_1999_12_20_pus_map.win
! wwins: Wrote 4 windows to J2218-0335_S_1999_12_20_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.00162149 Jy
! Component: 100  -  total flux cleaned = 0.00256105 Jy
! Component: 150  -  total flux cleaned = 0.00336933 Jy
! Component: 200  -  total flux cleaned = 0.0040697 Jy
! Component: 250  -  total flux cleaned = 0.00497269 Jy
! Component: 300  -  total flux cleaned = 0.00584868 Jy
! Component: 350  -  total flux cleaned = 0.00663047 Jy
! Component: 400  -  total flux cleaned = 0.00760076 Jy
! Component: 450  -  total flux cleaned = 0.00821043 Jy
! Component: 500  -  total flux cleaned = 0.0088747 Jy
! Component: 550  -  total flux cleaned = 0.00926664 Jy
! Component: 600  -  total flux cleaned = 0.00977908 Jy
! Component: 650  -  total flux cleaned = 0.010156 Jy
! Component: 700  -  total flux cleaned = 0.0104643 Jy
! Component: 750  -  total flux cleaned = 0.0106461 Jy
! Component: 800  -  total flux cleaned = 0.0108259 Jy
! Component: 850  -  total flux cleaned = 0.011003 Jy
! Component: 900  -  total flux cleaned = 0.0112365 Jy
! Component: 950  -  total flux cleaned = 0.0116395 Jy
! Component: 1000  -  total flux cleaned = 0.011923 Jy
! Component: 1050  -  total flux cleaned = 0.0120911 Jy
! Component: 1100  -  total flux cleaned = 0.012369 Jy
! Component: 1150  -  total flux cleaned = 0.0125886 Jy
! Component: 1200  -  total flux cleaned = 0.0129684 Jy
! Component: 1250  -  total flux cleaned = 0.013236 Jy
! Component: 1300  -  total flux cleaned = 0.0133946 Jy
! Component: 1350  -  total flux cleaned = 0.0136568 Jy
! Component: 1400  -  total flux cleaned = 0.0138119 Jy
! Component: 1450  -  total flux cleaned = 0.014017 Jy
! Component: 1500  -  total flux cleaned = 0.0143219 Jy
! Component: 1550  -  total flux cleaned = 0.0146238 Jy
! Component: 1600  -  total flux cleaned = 0.014923 Jy
! Component: 1650  -  total flux cleaned = 0.0151202 Jy
! Component: 1700  -  total flux cleaned = 0.0153161 Jy
! Component: 1750  -  total flux cleaned = 0.0155103 Jy
! Component: 1800  -  total flux cleaned = 0.0158467 Jy
! Component: 1850  -  total flux cleaned = 0.0160372 Jy
! Component: 1900  -  total flux cleaned = 0.016415 Jy
! Component: 1950  -  total flux cleaned = 0.0164618 Jy
! Component: 2000  -  total flux cleaned = 0.0168337 Jy
! Total flux subtracted in 2048 components = 0.017064 Jy
! Clean residual min=-0.002724 max=0.003002 Jy/beam
! Clean residual mean=0.000085 rms=0.000873 Jy/beam
! Combined flux in latest and established models = 2.10891 Jy
keep
! Adding 149 model components to the UV plane model.
! The established model now contains 264 components and 2.10891 Jy
![Exited script file: muppet]
wmap "J2218-0335_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.463 x 4.798 at 1.24 degrees (North through East)
! Clean map  min=-0.00384  max=1.7762 Jy/beam
! Writing clean map to FITS file: J2218-0335_S_1999_12_20_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.77617 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000871785 
device "J2218-0335_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J2218-0335_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.147247 0.147247 0.294494 0.588987 1.17797 2.35595 4.7119 9.42379 18.8476 37.6952 75.3904
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0026 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.776 
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.463 x 4.798 at 1.24 degrees (North through East)
! Clean map  min=-0.00384  max=1.7762 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2218-0335_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J2218-0335_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2218-0335_S_1999_12_20_pus_uvs.log closed on Fri Dec 21 13:39:34 2007