! Started logfile: J2139+1423_S_2003_06_18_pus_uvs.log on Wed Jan 24 00:50:10 2007
obs J2139+1423_S_2003_06_18_pus_uva.fits
! Reading UV FITS file: J2139+1423_S_2003_06_18_pus_uva.fits
! AN table 1: 23 integrations on 153 of 153 possible baselines.
! AN table 2: 34 integrations on 153 of 153 possible baselines.
! AN table 3: 84 integrations on 153 of 153 possible baselines.
! AN table 4: 65 integrations on 153 of 153 possible baselines.
! AN table 5: 126 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0459288 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2139+1423
! 
! 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.23697e+09        8e+06          1        8e+06
!  02        2  2.26697e+09        8e+06          1        8e+06
!  03        3  2.35697e+09        8e+06          1        8e+06
!  04        4  2.37697e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2425 lines of history.
! 
! Reading 9332 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
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 414 telescope corrections were flagged in sub-array 1.
!  A total of 612 telescope corrections were flagged in sub-array 2.
!  A total of 1456 telescope corrections were flagged in sub-array 3.
!  A total of 912 telescope corrections were flagged in sub-array 4.
!  A total of 1823 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 414 telescope corrections were flagged in sub-array 1.
!  A total of 612 telescope corrections were flagged in sub-array 2.
!  A total of 1456 telescope corrections were flagged in sub-array 3.
!  A total of 912 telescope corrections were flagged in sub-array 4.
!  A total of 1823 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 414 telescope corrections were flagged in sub-array 1.
!  A total of 612 telescope corrections were flagged in sub-array 2.
!  A total of 1456 telescope corrections were flagged in sub-array 3.
!  A total of 912 telescope corrections were flagged in sub-array 4.
!  A total of 1826 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 414 telescope corrections were flagged in sub-array 1.
!  A total of 612 telescope corrections were flagged in sub-array 2.
!  A total of 1456 telescope corrections were flagged in sub-array 3.
!  A total of 912 telescope corrections were flagged in sub-array 4.
!  A total of 1823 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=1.096502Jy  sigma=0.010303
! Fit after  self-cal, rms=0.651492Jy  sigma=0.005773
! 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.37 mas, bmaj=5.257 mas, bpa=-6.38 degrees
! Estimated noise=1148.07 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.970733 Jy
! Component: 100  -  total flux cleaned = 1.27251 Jy
! Total flux subtracted in 100 components = 1.27251 Jy
! Clean residual min=-0.042380 max=0.127714 Jy/beam
! Clean residual mean=0.001067 rms=0.015128 Jy/beam
! Combined flux in latest and established models = 1.27251 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.27251 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.518708Jy  sigma=0.003856
! Fit after  self-cal, rms=0.519094Jy  sigma=0.003855
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.144303 Jy
! Component: 100  -  total flux cleaned = 0.236411 Jy
! Total flux subtracted in 100 components = 0.236411 Jy
! Clean residual min=-0.032204 max=0.049336 Jy/beam
! Clean residual mean=0.000438 rms=0.009701 Jy/beam
! Combined flux in latest and established models = 1.50892 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 30 components and 1.50892 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.461403Jy  sigma=0.002755
! Fit after  self-cal, rms=0.461161Jy  sigma=0.002750
! 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.986 mas, bmaj=6.334 mas, bpa=-8.577 degrees
! Estimated noise=775.617 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.0845659 Jy
! Component: 100  -  total flux cleaned = 0.127487 Jy
! Component: 150  -  total flux cleaned = 0.150374 Jy
! Component: 200  -  total flux cleaned = 0.162621 Jy
! Total flux subtracted in 200 components = 0.162621 Jy
! Clean residual min=-0.036787 max=0.036081 Jy/beam
! Clean residual mean=-0.000643 rms=0.009462 Jy/beam
! Combined flux in latest and established models = 1.67154 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 48 components and 1.67154 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.448263Jy  sigma=0.002457
! Fit after  self-cal, rms=0.448299Jy  sigma=0.002455
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.35     
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.00*    NL        1.00*    ON        1.15     OV        1.00*    
!   PT        1.00*    SC        1.08     TC        1.00*    TS        1.00*    
!   WF        1.17     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.16     FD        0.88     GG        1.00*    HN        1.00*    
!   KK        1.05     KP        0.78     LA        0.93     MA        1.00*    
!   MK        0.97     NL        0.97     ON        1.00*    OV        1.19     
!   PT        1.01     SC        1.00*    TC        1.00*    TS        1.06     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.01     FD        1.01     GG        1.00*    HN        0.97     
!   KK        1.00*    KP        1.02     LA        1.01     MA        1.00*    
!   MK        1.01     NL        1.03     ON        1.15     OV        0.96     
!   PT        1.01     SC        0.91     TC        1.00*    TS        1.00*    
!   WF        1.16     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.51     
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.00*    NL        1.00*    ON        1.06     OV        1.00*    
!   PT        1.00*    SC        1.07     TC        1.00*    TS        1.00*    
!   WF        1.04     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.06     FD        0.91     GG        1.00*    HN        1.00*    
!   KK        1.08     KP        0.98     LA        0.94     MA        1.00*    
!   MK        1.02     NL        0.92     ON        1.00*    OV        0.90     
!   PT        0.99     SC        1.00*    TC        1.00*    TS        1.08     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.95     FD        1.01     GG        1.00*    HN        1.02     
!   KK        1.00*    KP        1.07     LA        1.01     MA        1.00*    
!   MK        1.08     NL        0.97     ON        1.02     OV        0.96     
!   PT        1.00     SC        0.92     TC        1.00*    TS        1.00*    
!   WF        1.17     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.37     
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.00*    NL        1.00*    ON        1.07     OV        1.00*    
!   PT        1.00*    SC        1.39     TC        1.00*    TS        1.00*    
!   WF        0.93     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.26     FD        0.92     GG        1.00*    HN        1.00*    
!   KK        1.07     KP        0.97     LA        0.90     MA        1.00*    
!   MK        0.97     NL        0.90     ON        1.00*    OV        0.86     
!   PT        1.01     SC        1.00*    TC        1.00*    TS        1.07     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.96     FD        1.00     GG        1.00*    HN        1.03     
!   KK        1.00*    KP        1.04     LA        0.97     MA        1.00*    
!   MK        1.04     NL        0.95     ON        1.01     OV        0.98     
!   PT        1.02     SC        1.06     TC        1.00*    TS        1.00*    
!   WF        1.09     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MA        0.00*    
!   MK        0.00*    NL        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    TC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GG        1.00*    HN        1.39     
!   KK        1.00*    KP        1.00*    LA        1.00*    MA        1.00*    
!   MK        1.00*    NL        1.00*    ON        1.00     OV        1.00*    
!   PT        1.00*    SC        1.22     TC        1.00*    TS        1.00*    
!   WF        0.90     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.91     GG        1.00*    HN        1.00*    
!   KK        1.06     KP        0.97     LA        0.93     MA        1.00*    
!   MK        0.91     NL        0.95     ON        1.00*    OV        0.97     
!   PT        1.03     SC        1.00*    TC        1.00*    TS        1.11     
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.92     FD        0.99     GG        1.00*    HN        0.97     
!   KK        1.00*    KP        1.05     LA        1.01     MA        1.00*    
!   MK        0.96     NL        0.99     ON        0.99     OV        0.89     
!   PT        1.05     SC        1.07     TC        1.00*    TS        1.00*    
!   WF        0.97     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.448299Jy  sigma=0.002455
! Fit after  self-cal, rms=0.276747Jy  sigma=0.002081
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.039 mas, bmaj=6.341 mas, bpa=-8.455 degrees
! Estimated noise=773.544 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.0108943 Jy
! Component: 100  -  total flux cleaned = -0.0121089 Jy
! Component: 150  -  total flux cleaned = -0.0121201 Jy
! Component: 200  -  total flux cleaned = -0.0119275 Jy
! Total flux subtracted in 200 components = -0.0119275 Jy
! Clean residual min=-0.019355 max=0.018327 Jy/beam
! Clean residual mean=0.000870 rms=0.006025 Jy/beam
! Combined flux in latest and established models = 1.65961 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 53 components and 1.65961 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.275461Jy  sigma=0.002076
! Fit after  self-cal, rms=0.275554Jy  sigma=0.002074
! 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.275554Jy  sigma=0.002074
! Fit after  self-cal, rms=0.257917Jy  sigma=0.001801
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.055 mas, bmaj=6.345 mas, bpa=-8.291 degrees
! Estimated noise=773.873 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00865828 Jy
! Component: 100  -  total flux cleaned = -0.00868693 Jy
! Component: 150  -  total flux cleaned = -0.00868849 Jy
! Component: 200  -  total flux cleaned = -0.00869322 Jy
! Total flux subtracted in 200 components = -0.00869322 Jy
! Clean residual min=-0.008012 max=0.009986 Jy/beam
! Clean residual mean=0.000294 rms=0.002207 Jy/beam
! Combined flux in latest and established models = 1.65092 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 58 components and 1.65092 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257402Jy  sigma=0.001796
! Fit after  self-cal, rms=0.257357Jy  sigma=0.001794
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 (9.5, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00729296 Jy
! Component: 100  -  total flux cleaned = 0.00729658 Jy
! Component: 150  -  total flux cleaned = 0.00730565 Jy
! Component: 200  -  total flux cleaned = 0.00750772 Jy
! Total flux subtracted in 200 components = 0.00750772 Jy
! Clean residual min=-0.007337 max=0.007865 Jy/beam
! Clean residual mean=0.000230 rms=0.002004 Jy/beam
! Combined flux in latest and established models = 1.65843 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 76 components and 1.65843 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256625Jy  sigma=0.001787
! Fit after  self-cal, rms=0.256521Jy  sigma=0.001786
! 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.256521Jy  sigma=0.001786
! Fit after  self-cal, rms=0.257430Jy  sigma=0.001763
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.057 mas, bmaj=6.346 mas, bpa=-8.157 degrees
! Estimated noise=773.07 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000908673 Jy
! Component: 100  -  total flux cleaned = 3.22346e-05 Jy
! Component: 150  -  total flux cleaned = 0.000351533 Jy
! Component: 200  -  total flux cleaned = 0.00049646 Jy
! Total flux subtracted in 200 components = 0.00049646 Jy
! Clean residual min=-0.005690 max=0.005465 Jy/beam
! Clean residual mean=0.000039 rms=0.001472 Jy/beam
! Combined flux in latest and established models = 1.65892 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 85 components and 1.65892 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257060Jy  sigma=0.001759
! Fit after  self-cal, rms=0.257067Jy  sigma=0.001759
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.000113421 Jy
! Component: 100  -  total flux cleaned = 0.000991755 Jy
! Component: 150  -  total flux cleaned = 0.00124395 Jy
! Component: 200  -  total flux cleaned = 0.00124472 Jy
! Total flux subtracted in 200 components = 0.00124472 Jy
! Clean residual min=-0.005421 max=0.005159 Jy/beam
! Clean residual mean=0.000028 rms=0.001431 Jy/beam
! Combined flux in latest and established models = 1.66017 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 89 components and 1.66017 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.256851Jy  sigma=0.001757
! Fit after  self-cal, rms=0.256809Jy  sigma=0.001756
! 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.256809Jy  sigma=0.001756
! Fit after  self-cal, rms=0.257202Jy  sigma=0.001756
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=9.134 mas, bmaj=10.95 mas, bpa=-18.59 degrees
! Estimated noise=944.27 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000413208 Jy
! Component: 100  -  total flux cleaned = -0.000143507 Jy
! Component: 150  -  total flux cleaned = -0.00027302 Jy
! Component: 200  -  total flux cleaned = -0.000376988 Jy
! Total flux subtracted in 200 components = -0.000376988 Jy
! Clean residual min=-0.004646 max=0.005389 Jy/beam
! Clean residual mean=0.000038 rms=0.001444 Jy/beam
! Combined flux in latest and established models = 1.65979 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 109 components and 1.65979 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257099Jy  sigma=0.001755
! Fit after  self-cal, rms=0.257077Jy  sigma=0.001755
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.000156316 Jy
! Component: 100  -  total flux cleaned = 0.000531565 Jy
! Component: 150  -  total flux cleaned = 0.000479923 Jy
! Component: 200  -  total flux cleaned = 0.000440462 Jy
! Total flux subtracted in 200 components = 0.000440462 Jy
! Clean residual min=-0.004658 max=0.005413 Jy/beam
! Clean residual mean=0.000028 rms=0.001442 Jy/beam
! Combined flux in latest and established models = 1.66023 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 116 components and 1.66023 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.257015Jy  sigma=0.001755
! Fit after  self-cal, rms=0.256994Jy  sigma=0.001755
! 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=3.062 mas, bmaj=6.349 mas, bpa=-8.141 degrees
! Estimated noise=772.633 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.062 x 6.349 at -8.141 degrees (North through East)
! Clean map  min=-0.0052007  max=1.3096 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.256994Jy  sigma=0.001755
! Fit after  self-cal, rms=0.559606Jy  sigma=0.001535
! Inverting map and beam 
! Estimated beam: bmin=3.065 mas, bmaj=6.349 mas, bpa=-8.114 degrees
! Estimated noise=772.79 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00177526 Jy
! Component: 100  -  total flux cleaned = -0.00177651 Jy
! Component: 150  -  total flux cleaned = -0.00177421 Jy
! Component: 200  -  total flux cleaned = -0.00177231 Jy
! Total flux subtracted in 200 components = -0.00177231 Jy
! Clean residual min=-0.005084 max=0.004650 Jy/beam
! Clean residual mean=0.000025 rms=0.001308 Jy/beam
! Combined flux in latest and established models = 1.65846 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 119 components and 1.65846 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.559557Jy  sigma=0.001534
! Fit after  self-cal, rms=0.559524Jy  sigma=0.001534
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000108244 Jy
! Component: 100  -  total flux cleaned = 0.000317259 Jy
! Component: 150  -  total flux cleaned = 0.00040483 Jy
! Component: 200  -  total flux cleaned = 0.000490279 Jy
! Total flux subtracted in 200 components = 0.000490279 Jy
! Clean residual min=-0.005131 max=0.004579 Jy/beam
! Clean residual mean=0.000020 rms=0.001287 Jy/beam
! Combined flux in latest and established models = 1.65895 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 124 components and 1.65895 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.559489Jy  sigma=0.001533
! Fit after  self-cal, rms=0.559458Jy  sigma=0.001532
! 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.559458Jy  sigma=0.001532
! Fit after  self-cal, rms=0.559718Jy  sigma=0.001532
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.429 mas, bmaj=5.27 mas, bpa=-6.129 degrees
! Estimated noise=1065.81 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.971001 Jy
! Component: 100  -  total flux cleaned = 1.26268 Jy
! Component: 150  -  total flux cleaned = 1.39741 Jy
! Component: 200  -  total flux cleaned = 1.47925 Jy
! Total flux subtracted in 200 components = 1.47925 Jy
! Clean residual min=-0.014695 max=0.043672 Jy/beam
! Clean residual mean=0.000520 rms=0.005344 Jy/beam
! Combined flux in latest and established models = 1.47925 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 32 model components to the UV plane model.
! The established model now contains 32 components and 1.47925 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.069 mas, bmaj=6.354 mas, bpa=-8.12 degrees
! Estimated noise=772.842 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.0809884 Jy
! Component: 100  -  total flux cleaned = 0.120453 Jy
! Component: 150  -  total flux cleaned = 0.142373 Jy
! Component: 200  -  total flux cleaned = 0.155999 Jy
! Total flux subtracted in 200 components = 0.155999 Jy
! Clean residual min=-0.005450 max=0.010268 Jy/beam
! Clean residual mean=0.000257 rms=0.001824 Jy/beam
! Combined flux in latest and established models = 1.63524 Jy
! Adding 49 model components to the UV plane model.
! The established model now contains 66 components and 1.63525 Jy
! Inverting map 
! Added new window around map position (0.5, -7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0098677 Jy
! Component: 100  -  total flux cleaned = 0.0160313 Jy
! Component: 150  -  total flux cleaned = 0.0203081 Jy
! Component: 200  -  total flux cleaned = 0.0222322 Jy
! Total flux subtracted in 200 components = 0.0222322 Jy
! Clean residual min=-0.004569 max=0.004627 Jy/beam
! Clean residual mean=0.000038 rms=0.001249 Jy/beam
! Combined flux in latest and established models = 1.65748 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 88 components and 1.65748 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=9.138 mas, bmaj=10.96 mas, bpa=-18.48 degrees
! Estimated noise=942.931 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00148503 Jy
! Component: 100  -  total flux cleaned = 0.00197108 Jy
! Component: 150  -  total flux cleaned = 0.00218243 Jy
! Component: 200  -  total flux cleaned = 0.00222543 Jy
! Total flux subtracted in 200 components = 0.00222543 Jy
! Clean residual min=-0.004432 max=0.004834 Jy/beam
! Clean residual mean=0.000002 rms=0.001383 Jy/beam
! Combined flux in latest and established models = 1.6597 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 = 8.92225e-07 Jy
! Component: 100  -  total flux cleaned = 1.13779e-06 Jy
! Component: 150  -  total flux cleaned = 2.31696e-06 Jy
! Component: 200  -  total flux cleaned = -2.86551e-05 Jy
! Total flux subtracted in 200 components = -2.86551e-05 Jy
! Clean residual min=-0.004372 max=0.004719 Jy/beam
! Clean residual mean=0.000000 rms=0.001377 Jy/beam
! Combined flux in latest and established models = 1.65967 Jy
! Adding 28 model components to the UV plane model.
! The established model now contains 116 components and 1.65967 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.069 mas, bmaj=6.354 mas, bpa=-8.12 degrees
! Estimated noise=772.842 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000819852 Jy
! Component: 100  -  total flux cleaned = -0.000815618 Jy
! Component: 150  -  total flux cleaned = -0.000727636 Jy
! Component: 200  -  total flux cleaned = -0.000727177 Jy
! Total flux subtracted in 200 components = -0.000727177 Jy
! Clean residual min=-0.004904 max=0.004338 Jy/beam
! Clean residual mean=0.000015 rms=0.001201 Jy/beam
! Combined flux in latest and established models = 1.65895 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 127 components and 1.65895 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.559601Jy  sigma=0.001528
! Fit after  self-cal, rms=0.559505Jy  sigma=0.001528
wmodel J2139+1423_S_2003_06_18_pus_map.mod
! Writing 127 model components to file: J2139+1423_S_2003_06_18_pus_map.mod
wobs J2139+1423_S_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J2139+1423_S_2003_06_18_pus_uvs.fits
wwins J2139+1423_S_2003_06_18_pus_map.win
! wwins: Wrote 3 windows to J2139+1423_S_2003_06_18_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.000791717 Jy
! Component: 100  -  total flux cleaned = -0.00124749 Jy
! Component: 150  -  total flux cleaned = -0.00132307 Jy
! Component: 200  -  total flux cleaned = -0.00118946 Jy
! Component: 250  -  total flux cleaned = -0.000926475 Jy
! Component: 300  -  total flux cleaned = -0.000733618 Jy
! Component: 350  -  total flux cleaned = -0.000418914 Jy
! Component: 400  -  total flux cleaned = 1.131e-05 Jy
! Component: 450  -  total flux cleaned = 0.000192023 Jy
! Component: 500  -  total flux cleaned = 0.000488338 Jy
! Component: 550  -  total flux cleaned = 0.000545619 Jy
! Component: 600  -  total flux cleaned = 0.000602967 Jy
! Component: 650  -  total flux cleaned = 0.000602433 Jy
! Component: 700  -  total flux cleaned = 0.000490521 Jy
! Component: 750  -  total flux cleaned = 0.000545797 Jy
! Component: 800  -  total flux cleaned = 0.000436787 Jy
! Component: 850  -  total flux cleaned = 0.000490745 Jy
! Component: 900  -  total flux cleaned = 0.000544211 Jy
! Component: 950  -  total flux cleaned = 0.000491637 Jy
! Component: 1000  -  total flux cleaned = 0.000645983 Jy
! Component: 1050  -  total flux cleaned = 0.000696928 Jy
! Component: 1100  -  total flux cleaned = 0.000747841 Jy
! Component: 1150  -  total flux cleaned = 0.000997554 Jy
! Component: 1200  -  total flux cleaned = 0.00114576 Jy
! Component: 1250  -  total flux cleaned = 0.00124373 Jy
! Component: 1300  -  total flux cleaned = 0.00138844 Jy
! Component: 1350  -  total flux cleaned = 0.00143621 Jy
! Component: 1400  -  total flux cleaned = 0.00167393 Jy
! Component: 1450  -  total flux cleaned = 0.00167407 Jy
! Component: 1500  -  total flux cleaned = 0.00186059 Jy
! Component: 1550  -  total flux cleaned = 0.00190656 Jy
! Component: 1600  -  total flux cleaned = 0.00195233 Jy
! Component: 1650  -  total flux cleaned = 0.00217966 Jy
! Component: 1700  -  total flux cleaned = 0.00213428 Jy
! Component: 1750  -  total flux cleaned = 0.00226871 Jy
! Component: 1800  -  total flux cleaned = 0.00231289 Jy
! Component: 1850  -  total flux cleaned = 0.00235675 Jy
! Component: 1900  -  total flux cleaned = 0.00235695 Jy
! Component: 1950  -  total flux cleaned = 0.00248687 Jy
! Component: 2000  -  total flux cleaned = 0.00244413 Jy
! Total flux subtracted in 2048 components = 0.00252956 Jy
! Clean residual min=-0.002393 max=0.002458 Jy/beam
! Clean residual mean=0.000004 rms=0.000839 Jy/beam
! Combined flux in latest and established models = 1.66148 Jy
keep
! Adding 129 model components to the UV plane model.
! The established model now contains 256 components and 1.66148 Jy
wmap "J2139+1423_S_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.069 x 6.354 at -8.12 degrees (North through East)
! Clean map  min=-0.0040312  max=1.3127 Jy/beam
! Writing clean map to FITS file: J2139+1423_S_2003_06_18_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.31274 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000831792 
device "J2139+1423_S_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J2139+1423_S_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.190089 0.190089 0.380178 0.760357 1.52071 3.04143 6.08285 12.1657 24.3314 48.6628 97.3256
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0024 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.312 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.069 x 6.354 at -8.12 degrees (North through East)
! Clean map  min=-0.0040312  max=1.3127 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2139+1423_S_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J2139+1423_S_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2139+1423_S_2003_06_18_pus_uvs.log closed on Wed Jan 24 00:53:24 2007