! Started logfile: J0824+5552_S_2003_06_18_pus_uvs.log on Wed Jan 24 17:45:32 2007
obs J0824+5552_S_2003_06_18_pus_uva.fits
! Reading UV FITS file: J0824+5552_S_2003_06_18_pus_uva.fits
! AN table 1: 143 integrations on 153 of 153 possible baselines.
! AN table 2: 153 integrations on 153 of 153 possible baselines.
! AN table 3: 109 integrations on 153 of 153 possible baselines.
! AN table 4: 19 integrations on 153 of 153 possible baselines.
! AN table 5: 89 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.133127 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0824+5552
! 
! 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 2429 lines of history.
! 
! Reading 41796 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 1675 telescope corrections were flagged in sub-array 1.
!  A total of 1965 telescope corrections were flagged in sub-array 2.
!  A total of 1339 telescope corrections were flagged in sub-array 3.
!  A total of 342 telescope corrections were flagged in sub-array 4.
!  A total of 1393 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 1675 telescope corrections were flagged in sub-array 1.
!  A total of 1965 telescope corrections were flagged in sub-array 2.
!  A total of 1339 telescope corrections were flagged in sub-array 3.
!  A total of 342 telescope corrections were flagged in sub-array 4.
!  A total of 1393 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 1783 telescope corrections were flagged in sub-array 1.
!  A total of 1965 telescope corrections were flagged in sub-array 2.
!  A total of 1339 telescope corrections were flagged in sub-array 3.
!  A total of 342 telescope corrections were flagged in sub-array 4.
!  A total of 1393 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 1783 telescope corrections were flagged in sub-array 1.
!  A total of 1965 telescope corrections were flagged in sub-array 2.
!  A total of 1339 telescope corrections were flagged in sub-array 3.
!  A total of 342 telescope corrections were flagged in sub-array 4.
!  A total of 1393 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=0.954756Jy  sigma=0.010886
! Fit after  self-cal, rms=0.436101Jy  sigma=0.004291
! 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.065 mas, bmaj=2.675 mas, bpa=-2.227 degrees
! Estimated noise=754.713 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.492222 Jy
! Component: 100  -  total flux cleaned = 0.664677 Jy
! Total flux subtracted in 100 components = 0.664677 Jy
! Clean residual min=-0.023960 max=0.082834 Jy/beam
! Clean residual mean=0.000754 rms=0.007532 Jy/beam
! Combined flux in latest and established models = 0.664677 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 0.664677 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333658Jy  sigma=0.003492
! Fit after  self-cal, rms=0.333047Jy  sigma=0.003489
! Inverting map 
! Added new window around map position (2.5, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0860037 Jy
! Component: 100  -  total flux cleaned = 0.133023 Jy
! Total flux subtracted in 100 components = 0.133023 Jy
! Clean residual min=-0.018432 max=0.047027 Jy/beam
! Clean residual mean=0.000535 rms=0.005374 Jy/beam
! Combined flux in latest and established models = 0.7977 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 20 components and 0.7977 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.292548Jy  sigma=0.002899
! Fit after  self-cal, rms=0.291512Jy  sigma=0.002891
! Inverting map 
! Added new window around map position (5.5, 1.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0411315 Jy
! Component: 100  -  total flux cleaned = 0.0662311 Jy
! Total flux subtracted in 100 components = 0.0662311 Jy
! Clean residual min=-0.014974 max=0.030353 Jy/beam
! Clean residual mean=0.000422 rms=0.004475 Jy/beam
! Combined flux in latest and established models = 0.863931 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 31 components and 0.863931 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.279836Jy  sigma=0.002701
! Fit after  self-cal, rms=0.279183Jy  sigma=0.002695
! Inverting map 
! Added new window around map position (16.5, 5.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0312574 Jy
! Component: 100  -  total flux cleaned = 0.0528704 Jy
! Total flux subtracted in 100 components = 0.0528704 Jy
! Clean residual min=-0.013692 max=0.019127 Jy/beam
! Clean residual mean=0.000341 rms=0.003995 Jy/beam
! Combined flux in latest and established models = 0.916802 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 46 components and 0.916802 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271013Jy  sigma=0.002571
! Fit after  self-cal, rms=0.270679Jy  sigma=0.002567
! 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.972 mas, bmaj=3.55 mas, bpa=24.91 degrees
! Estimated noise=342.873 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.0507466 Jy
! Component: 100  -  total flux cleaned = 0.0842283 Jy
! Component: 150  -  total flux cleaned = 0.107232 Jy
! Component: 200  -  total flux cleaned = 0.12328 Jy
! Total flux subtracted in 200 components = 0.12328 Jy
! Clean residual min=-0.013256 max=0.023792 Jy/beam
! Clean residual mean=0.000994 rms=0.004738 Jy/beam
! Combined flux in latest and established models = 1.04008 Jy
! Performing phase self-cal
! Adding 50 model components to the UV plane model.
! The established model now contains 80 components and 1.04008 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.261269Jy  sigma=0.002398
! Fit after  self-cal, rms=0.260488Jy  sigma=0.002387
! Inverting map 
! Added new window around map position (23.5, 5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0268714 Jy
! Component: 100  -  total flux cleaned = 0.0418709 Jy
! Component: 150  -  total flux cleaned = 0.0521101 Jy
! Component: 200  -  total flux cleaned = 0.0594738 Jy
! Total flux subtracted in 200 components = 0.0594738 Jy
! Clean residual min=-0.011105 max=0.015032 Jy/beam
! Clean residual mean=0.000124 rms=0.003613 Jy/beam
! Combined flux in latest and established models = 1.09956 Jy
! Performing phase self-cal
! Adding 47 model components to the UV plane model.
! The established model now contains 123 components and 1.09956 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258030Jy  sigma=0.002343
! Fit after  self-cal, rms=0.257620Jy  sigma=0.002337
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        0.92     GG        1.00*    HN        0.87     
!   KK        1.00*    KP        0.95     LA        0.95     MA        1.00*    
!   MK        1.00     NL        0.97     ON        0.98     OV        1.12     
!   PT        0.94     SC        0.94     TC        1.00*    TS        1.00*    
!   WF        1.07     WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.98     GG        1.00*    HN        0.97     
!   KK        1.02     KP        0.96     LA        0.98     MA        1.00*    
!   MK        0.89     NL        1.03     ON        1.08     OV        1.21     
!   PT        0.97     SC        1.00*    TC        1.00*    TS        1.01     
!   WF        1.01     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.07     FD        1.02     GG        1.00*    HN        0.99     
!   KK        1.00*    KP        1.01     LA        0.98     MA        1.00*    
!   MK        1.00*    NL        1.00     ON        1.18     OV        1.33     
!   PT        1.02     SC        0.92     TC        1.00*    TS        0.98     
!   WF        1.04     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   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 129 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.03     FD        1.00*    GG        1.00*    HN        0.99     
!   KK        1.00*    KP        1.00*    LA        1.06     MA        1.00*    
!   MK        1.00*    NL        0.98     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.08     
!   WF        1.07     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 60 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.95     GG        1.00*    HN        2.63     
!   KK        1.00*    KP        1.02     LA        0.96     MA        1.00*    
!   MK        1.08     NL        0.96     ON        0.94     OV        0.97     
!   PT        0.94     SC        0.96     TC        1.00*    TS        1.00*    
!   WF        0.96     WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.98     GG        1.00*    HN        1.04     
!   KK        1.03     KP        1.05     LA        0.98     MA        1.00*    
!   MK        1.01     NL        0.98     ON        1.03     OV        1.03     
!   PT        0.98     SC        1.00*    TC        1.00*    TS        0.99     
!   WF        0.96     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.04     GG        1.00*    HN        1.03     
!   KK        1.00*    KP        1.12     LA        1.01     MA        1.00*    
!   MK        1.00*    NL        0.98     ON        1.04     OV        1.14     
!   PT        1.02     SC        0.96     TC        1.00*    TS        0.97     
!   WF        0.96     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   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 129 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.11     FD        1.00*    GG        1.00*    HN        0.94     
!   KK        1.00*    KP        1.00*    LA        1.10     MA        1.00*    
!   MK        1.00*    NL        1.06     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        0.92     
!   WF        1.03     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 33 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.95     GG        1.00*    HN        1.05     
!   KK        1.00*    KP        1.00     LA        0.92     MA        1.00*    
!   MK        1.05     NL        0.96     ON        1.00*    OV        1.00     
!   PT        0.95     SC        1.09     TC        1.00*    TS        1.00*    
!   WF        1.01     WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.01     GG        1.00*    HN        1.04     
!   KK        1.03     KP        1.01     LA        0.95     MA        1.00*    
!   MK        0.98     NL        0.98     ON        1.01     OV        1.11     
!   PT        0.99     SC        1.00*    TC        1.00*    TS        1.04     
!   WF        0.97     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.04     GG        1.00*    HN        1.05     
!   KK        1.00*    KP        1.10     LA        0.98     MA        1.00*    
!   MK        1.00*    NL        0.98     ON        1.07     OV        1.09     
!   PT        1.04     SC        1.12     TC        1.00*    TS        0.98     
!   WF        1.03     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   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 129 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.99     FD        1.00*    GG        1.00*    HN        1.08     
!   KK        1.00*    KP        1.00*    LA        1.07     MA        1.00*    
!   MK        1.00*    NL        0.94     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.22     
!   WF        0.92     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 33 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.95     GG        1.00*    HN        0.75     
!   KK        1.00*    KP        1.03     LA        0.96     MA        1.00*    
!   MK        0.99     NL        0.95     ON        1.00*    OV        0.92     
!   PT        1.02     SC        1.10     TC        1.00*    TS        1.00*    
!   WF        1.09     WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        1.00     GG        1.00*    HN        1.03     
!   KK        1.04     KP        1.02     LA        0.99     MA        1.00*    
!   MK        0.93     NL        1.01     ON        1.02     OV        1.04     
!   PT        1.04     SC        1.00*    TC        1.00*    TS        1.00     
!   WF        1.00     WZ        1.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.04     GG        1.00*    HN        1.04     
!   KK        1.00*    KP        1.09     LA        1.01     MA        1.00*    
!   MK        1.00*    NL        1.03     ON        1.01     OV        0.98     
!   PT        1.10     SC        1.11     TC        1.00*    TS        0.97     
!   WF        1.00     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 4:
!   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 129 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.05     
!   KK        1.00*    KP        1.00*    LA        1.04     MA        1.00*    
!   MK        1.00*    NL        1.04     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    TC        1.00*    TS        1.17     
!   WF        0.93     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.257620Jy  sigma=0.002337
! Fit after  self-cal, rms=0.284993Jy  sigma=0.002122
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.999 mas, bmaj=3.554 mas, bpa=22.68 degrees
! Estimated noise=345.119 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.00817844 Jy
! Component: 100  -  total flux cleaned = 0.011022 Jy
! Component: 150  -  total flux cleaned = 0.0114727 Jy
! Component: 200  -  total flux cleaned = 0.0115998 Jy
! Total flux subtracted in 200 components = 0.0115998 Jy
! Clean residual min=-0.005236 max=0.005619 Jy/beam
! Clean residual mean=0.000162 rms=0.001442 Jy/beam
! Combined flux in latest and established models = 1.11116 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 146 components and 1.11116 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284747Jy  sigma=0.002117
! Fit after  self-cal, rms=0.285603Jy  sigma=0.002115
! 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.285603Jy  sigma=0.002115
! Fit after  self-cal, rms=0.287703Jy  sigma=0.002114
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.996 mas, bmaj=3.551 mas, bpa=22.62 degrees
! Estimated noise=345.495 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00432887 Jy
! Component: 100  -  total flux cleaned = 0.00518685 Jy
! Component: 150  -  total flux cleaned = 0.00539654 Jy
! Component: 200  -  total flux cleaned = 0.00548894 Jy
! Total flux subtracted in 200 components = 0.00548894 Jy
! Clean residual min=-0.004948 max=0.005748 Jy/beam
! Clean residual mean=0.000109 rms=0.001375 Jy/beam
! Combined flux in latest and established models = 1.11664 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 153 components and 1.11664 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287609Jy  sigma=0.002113
! Fit after  self-cal, rms=0.287623Jy  sigma=0.002113
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 (11, 5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00525857 Jy
! Component: 100  -  total flux cleaned = 0.00596719 Jy
! Component: 150  -  total flux cleaned = 0.00608974 Jy
! Component: 200  -  total flux cleaned = 0.00619641 Jy
! Total flux subtracted in 200 components = 0.00619641 Jy
! Clean residual min=-0.004562 max=0.004869 Jy/beam
! Clean residual mean=0.000032 rms=0.001284 Jy/beam
! Combined flux in latest and established models = 1.12284 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 177 components and 1.12284 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287477Jy  sigma=0.002110
! Fit after  self-cal, rms=0.287459Jy  sigma=0.002110
! 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.287459Jy  sigma=0.002110
! Fit after  self-cal, rms=0.287753Jy  sigma=0.002108
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.995 mas, bmaj=3.549 mas, bpa=22.51 degrees
! Estimated noise=345.933 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00342552 Jy
! Component: 100  -  total flux cleaned = 0.00431152 Jy
! Component: 150  -  total flux cleaned = 0.00468827 Jy
! Component: 200  -  total flux cleaned = 0.00494734 Jy
! Total flux subtracted in 200 components = 0.00494734 Jy
! Clean residual min=-0.004598 max=0.004645 Jy/beam
! Clean residual mean=-0.000041 rms=0.001172 Jy/beam
! Combined flux in latest and established models = 1.12779 Jy
selfcal
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 187 components and 1.12779 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287664Jy  sigma=0.002107
! Fit after  self-cal, rms=0.287658Jy  sigma=0.002107
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.000602499 Jy
! Component: 100  -  total flux cleaned = 0.000767705 Jy
! Component: 150  -  total flux cleaned = 0.000843813 Jy
! Component: 200  -  total flux cleaned = 0.000917318 Jy
! Total flux subtracted in 200 components = 0.000917318 Jy
! Clean residual min=-0.004550 max=0.004369 Jy/beam
! Clean residual mean=-0.000053 rms=0.001148 Jy/beam
! Combined flux in latest and established models = 1.12871 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 194 components and 1.12871 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.287616Jy  sigma=0.002106
! Fit after  self-cal, rms=0.287615Jy  sigma=0.002106
! 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.287615Jy  sigma=0.002106
! Fit after  self-cal, rms=0.288067Jy  sigma=0.002106
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.075 mas, bmaj=10.94 mas, bpa=69.5 degrees
! Estimated noise=453.226 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00402884 Jy
! Component: 100  -  total flux cleaned = 0.00465737 Jy
! Component: 150  -  total flux cleaned = 0.00510892 Jy
! Component: 200  -  total flux cleaned = 0.00522835 Jy
! Total flux subtracted in 200 components = 0.00522835 Jy
! Clean residual min=-0.005313 max=0.005242 Jy/beam
! Clean residual mean=-0.000199 rms=0.001625 Jy/beam
! Combined flux in latest and established models = 1.13393 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 206 components and 1.13393 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.288056Jy  sigma=0.002106
! Fit after  self-cal, rms=0.288047Jy  sigma=0.002106
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.000739387 Jy
! Component: 100  -  total flux cleaned = 0.000902576 Jy
! Component: 150  -  total flux cleaned = 0.000949777 Jy
! Component: 200  -  total flux cleaned = 0.00107366 Jy
! Total flux subtracted in 200 components = 0.00107366 Jy
! Clean residual min=-0.005514 max=0.005096 Jy/beam
! Clean residual mean=-0.000235 rms=0.001622 Jy/beam
! Combined flux in latest and established models = 1.13501 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 212 components and 1.13501 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.288053Jy  sigma=0.002105
! Fit after  self-cal, rms=0.288050Jy  sigma=0.002105
! 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.998 mas, bmaj=3.549 mas, bpa=22.5 degrees
! Estimated noise=346.298 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.998 x 3.549 at 22.5 degrees (North through East)
! Clean map  min=-0.0044394  max=0.68146 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.288050Jy  sigma=0.002105
! Fit after  self-cal, rms=0.319941Jy  sigma=0.001876
! Inverting map and beam 
! Estimated beam: bmin=2.997 mas, bmaj=3.55 mas, bpa=22.55 degrees
! Estimated noise=345.536 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000937466 Jy
! Component: 100  -  total flux cleaned = 0.000678827 Jy
! Component: 150  -  total flux cleaned = 0.000604514 Jy
! Component: 200  -  total flux cleaned = 0.000607743 Jy
! Total flux subtracted in 200 components = 0.000607743 Jy
! Clean residual min=-0.003844 max=0.004460 Jy/beam
! Clean residual mean=0.000128 rms=0.000971 Jy/beam
! Combined flux in latest and established models = 1.13562 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 221 components and 1.13562 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319886Jy  sigma=0.001875
! Fit after  self-cal, rms=0.319895Jy  sigma=0.001875
! Inverting map 
! Added new window around map position (11.5, -7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00317181 Jy
! Component: 100  -  total flux cleaned = 0.0037207 Jy
! Component: 150  -  total flux cleaned = 0.00407502 Jy
! Component: 200  -  total flux cleaned = 0.00414623 Jy
! Total flux subtracted in 200 components = 0.00414623 Jy
! Clean residual min=-0.003772 max=0.003639 Jy/beam
! Clean residual mean=0.000074 rms=0.000923 Jy/beam
! Combined flux in latest and established models = 1.13976 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 232 components and 1.13976 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319811Jy  sigma=0.001874
! Fit after  self-cal, rms=0.319800Jy  sigma=0.001874
! 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.319800Jy  sigma=0.001874
! Fit after  self-cal, rms=0.320403Jy  sigma=0.001874
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.039 mas, bmaj=2.682 mas, bpa=-3.301 degrees
! Estimated noise=770.921 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.49543 Jy
! Component: 100  -  total flux cleaned = 0.674946 Jy
! Component: 150  -  total flux cleaned = 0.762257 Jy
! Component: 200  -  total flux cleaned = 0.812872 Jy
! Total flux subtracted in 200 components = 0.812872 Jy
! Clean residual min=-0.011234 max=0.029179 Jy/beam
! Clean residual mean=0.000539 rms=0.003946 Jy/beam
! Combined flux in latest and established models = 0.812872 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 0.812871 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.001 mas, bmaj=3.552 mas, bpa=22.58 degrees
! Estimated noise=345.62 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)
! Added new window around map position (18.5, 4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0865641 Jy
! Component: 100  -  total flux cleaned = 0.146066 Jy
! Component: 150  -  total flux cleaned = 0.188604 Jy
! Component: 200  -  total flux cleaned = 0.219589 Jy
! Total flux subtracted in 200 components = 0.219589 Jy
! Clean residual min=-0.005928 max=0.019029 Jy/beam
! Clean residual mean=0.001491 rms=0.003700 Jy/beam
! Combined flux in latest and established models = 1.03246 Jy
! Adding 106 model components to the UV plane model.
! The established model now contains 115 components and 1.03246 Jy
! Inverting map 
! Added new window around map position (-2.5, -1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0235234 Jy
! Component: 100  -  total flux cleaned = 0.0414845 Jy
! Component: 150  -  total flux cleaned = 0.0553941 Jy
! Component: 200  -  total flux cleaned = 0.0662934 Jy
! Total flux subtracted in 200 components = 0.0662934 Jy
! Clean residual min=-0.004107 max=0.007221 Jy/beam
! Clean residual mean=0.000618 rms=0.001623 Jy/beam
! Combined flux in latest and established models = 1.09875 Jy
! Adding 92 model components to the UV plane model.
! The established model now contains 194 components and 1.09875 Jy
! Inverting map 
! Added new window around map position (17, -2.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00876166 Jy
! Component: 100  -  total flux cleaned = 0.0157053 Jy
! Component: 150  -  total flux cleaned = 0.0212796 Jy
! Component: 200  -  total flux cleaned = 0.0257983 Jy
! Total flux subtracted in 200 components = 0.0257983 Jy
! Clean residual min=-0.003500 max=0.003914 Jy/beam
! Clean residual mean=0.000282 rms=0.001026 Jy/beam
! Combined flux in latest and established models = 1.12455 Jy
! Adding 50 model components to the UV plane model.
! The established model now contains 219 components and 1.12455 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=8.071 mas, bmaj=10.92 mas, bpa=69.46 degrees
! Estimated noise=452.119 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00684859 Jy
! Component: 100  -  total flux cleaned = 0.0109913 Jy
! Component: 150  -  total flux cleaned = 0.0137917 Jy
! Component: 200  -  total flux cleaned = 0.0157199 Jy
! Total flux subtracted in 200 components = 0.0157199 Jy
! Clean residual min=-0.003712 max=0.003589 Jy/beam
! Clean residual mean=0.000177 rms=0.001316 Jy/beam
! Combined flux in latest and established models = 1.14027 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.00133942 Jy
! Component: 100  -  total flux cleaned = 0.00162937 Jy
! Component: 150  -  total flux cleaned = 0.00184462 Jy
! Component: 200  -  total flux cleaned = 0.00203015 Jy
! Total flux subtracted in 200 components = 0.00203015 Jy
! Clean residual min=-0.003654 max=0.003563 Jy/beam
! Clean residual mean=0.000114 rms=0.001274 Jy/beam
! Combined flux in latest and established models = 1.1423 Jy
! Adding 92 model components to the UV plane model.
! The established model now contains 287 components and 1.1423 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.001 mas, bmaj=3.552 mas, bpa=22.58 degrees
! Estimated noise=345.62 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000649621 Jy
! Component: 100  -  total flux cleaned = -0.000724515 Jy
! Component: 150  -  total flux cleaned = -0.000727927 Jy
! Component: 200  -  total flux cleaned = -0.000666514 Jy
! Total flux subtracted in 200 components = -0.000666514 Jy
! Clean residual min=-0.003291 max=0.003276 Jy/beam
! Clean residual mean=0.000064 rms=0.000831 Jy/beam
! Combined flux in latest and established models = 1.14164 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 301 components and 1.14164 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320273Jy  sigma=0.001872
! Fit after  self-cal, rms=0.320220Jy  sigma=0.001872
wmodel J0824+5552_S_2003_06_18_pus_map.mod
! Writing 301 model components to file: J0824+5552_S_2003_06_18_pus_map.mod
wobs J0824+5552_S_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J0824+5552_S_2003_06_18_pus_uvs.fits
wwins J0824+5552_S_2003_06_18_pus_map.win
! wwins: Wrote 10 windows to J0824+5552_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 = 2.88989e-05 Jy
! Component: 100  -  total flux cleaned = -0.000590684 Jy
! Component: 150  -  total flux cleaned = -0.00101523 Jy
! Component: 200  -  total flux cleaned = -0.0011662 Jy
! Component: 250  -  total flux cleaned = -0.00135725 Jy
! Component: 300  -  total flux cleaned = -0.00149599 Jy
! Component: 350  -  total flux cleaned = -0.00163153 Jy
! Component: 400  -  total flux cleaned = -0.00176304 Jy
! Component: 450  -  total flux cleaned = -0.00180584 Jy
! Component: 500  -  total flux cleaned = -0.00188887 Jy
! Component: 550  -  total flux cleaned = -0.00188924 Jy
! Component: 600  -  total flux cleaned = -0.00192864 Jy
! Component: 650  -  total flux cleaned = -0.00181256 Jy
! Component: 700  -  total flux cleaned = -0.00185132 Jy
! Component: 750  -  total flux cleaned = -0.00173915 Jy
! Component: 800  -  total flux cleaned = -0.00170223 Jy
! Component: 850  -  total flux cleaned = -0.00162969 Jy
! Component: 900  -  total flux cleaned = -0.00148706 Jy
! Component: 950  -  total flux cleaned = -0.00141728 Jy
! Component: 1000  -  total flux cleaned = -0.00138251 Jy
! Component: 1050  -  total flux cleaned = -0.0012796 Jy
! Component: 1100  -  total flux cleaned = -0.00117847 Jy
! Component: 1150  -  total flux cleaned = -0.00114506 Jy
! Component: 1200  -  total flux cleaned = -0.00117773 Jy
! Component: 1250  -  total flux cleaned = -0.00107977 Jy
! Component: 1300  -  total flux cleaned = -0.00117595 Jy
! Component: 1350  -  total flux cleaned = -0.00107989 Jy
! Component: 1400  -  total flux cleaned = -0.00107945 Jy
! Component: 1450  -  total flux cleaned = -0.00101663 Jy
! Component: 1500  -  total flux cleaned = -0.000954973 Jy
! Component: 1550  -  total flux cleaned = -0.000924647 Jy
! Component: 1600  -  total flux cleaned = -0.00098511 Jy
! Component: 1650  -  total flux cleaned = -0.00101485 Jy
! Component: 1700  -  total flux cleaned = -0.00101458 Jy
! Component: 1750  -  total flux cleaned = -0.00104391 Jy
! Component: 1800  -  total flux cleaned = -0.00104376 Jy
! Component: 1850  -  total flux cleaned = -0.0011013 Jy
! Component: 1900  -  total flux cleaned = -0.00110104 Jy
! Component: 1950  -  total flux cleaned = -0.00110111 Jy
! Component: 2000  -  total flux cleaned = -0.00115754 Jy
! Total flux subtracted in 2048 components = -0.00118541 Jy
! Clean residual min=-0.002262 max=0.001684 Jy/beam
! Clean residual mean=0.000038 rms=0.000529 Jy/beam
! Combined flux in latest and established models = 1.14045 Jy
keep
! Adding 152 model components to the UV plane model.
! The established model now contains 451 components and 1.14045 Jy
wmap "J0824+5552_S_2003_06_18_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.001 x 3.552 at 22.58 degrees (North through East)
! Clean map  min=-0.0024801  max=0.67719 Jy/beam
! Writing clean map to FITS file: J0824+5552_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 0.677192 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000527428 
device "J0824+5552_S_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J0824+5552_S_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.233654 0.233654 0.467308 0.934615 1.86923 3.73846 7.47692 14.9538 29.9077 59.8154
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.677 
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.001 x 3.552 at 22.58 degrees (North through East)
! Clean map  min=-0.0024801  max=0.67719 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0824+5552_S_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J0824+5552_S_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0824+5552_S_2003_06_18_pus_uvs.log closed on Wed Jan 24 17:51:07 2007