! Started logfile: J0538-4405_X_2003_06_18_pus_uvs.log on Thu Jan 18 13:25:27 2007
obs J0538-4405_X_2003_06_18_pus_uva.fits
! Reading UV FITS file: J0538-4405_X_2003_06_18_pus_uva.fits
! AN table 1: 99 integrations on 153 of 153 possible baselines.
! AN table 2: 72 integrations on 153 of 153 possible baselines.
! AN table 3: 43 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0405901 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0538-4405
! 
! 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  8.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2235 lines of history.
! 
! Reading 5316 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 = 256x256 pixels with 0.200x0.200 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 1436 telescope corrections were flagged in sub-array 1.
!  A total of 1191 telescope corrections were flagged in sub-array 2.
!  A total of 630 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1436 telescope corrections were flagged in sub-array 1.
!  A total of 1191 telescope corrections were flagged in sub-array 2.
!  A total of 630 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1436 telescope corrections were flagged in sub-array 1.
!  A total of 1191 telescope corrections were flagged in sub-array 2.
!  A total of 630 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1436 telescope corrections were flagged in sub-array 1.
!  A total of 1191 telescope corrections were flagged in sub-array 2.
!  A total of 630 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=2.225248Jy  sigma=0.028172
! Fit after  self-cal, rms=1.634237Jy  sigma=0.020879
! 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 
! Your choice of large map pixels excluded 6.82% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1821 milli-arcsec
! Estimated beam: bmin=0.6016 mas, bmaj=0.9687 mas, bpa=24.54 degrees
! Estimated noise=1952.22 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.92027 Jy
! Component: 100  -  total flux cleaned = 2.51153 Jy
! Total flux subtracted in 100 components = 2.51153 Jy
! Clean residual min=-0.129668 max=0.316599 Jy/beam
! Clean residual mean=0.006478 rms=0.063319 Jy/beam
! Combined flux in latest and established models = 2.51153 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 2.51153 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.754536Jy  sigma=0.007198
! Fit after  self-cal, rms=0.752999Jy  sigma=0.007195
! Inverting map 
! Your choice of large map pixels excluded 6.82% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1821 milli-arcsec
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 
! Your choice of large map pixels excluded 6.82% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1821 milli-arcsec
! Estimated beam: bmin=0.7876 mas, bmaj=1.25 mas, bpa=19.93 degrees
! Estimated noise=1066.02 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.395809 Jy
! Component: 100  -  total flux cleaned = 0.563836 Jy
! Component: 150  -  total flux cleaned = 0.63902 Jy
! Component: 200  -  total flux cleaned = 0.662424 Jy
! Total flux subtracted in 200 components = 0.662424 Jy
! Clean residual min=-0.097042 max=0.115628 Jy/beam
! Clean residual mean=-0.013810 rms=0.033177 Jy/beam
! Combined flux in latest and established models = 3.17396 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 18 components and 3.17396 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.636673Jy  sigma=0.004282
! Fit after  self-cal, rms=0.623954Jy  sigma=0.004259
! Inverting map 
! Your choice of large map pixels excluded 6.82% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1821 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.01     GG        1.00*    HN        1.00*    
!   KK        1.00     KP        0.97     LA        1.06     MA        1.00*    
!   MK        0.96     NL        1.00*    ON        1.00*    OV        1.21     
!   PT        1.01     SC        1.00*    TC        2.16     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  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 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        0.89     GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        0.94     LA        0.96     MA        1.00*    
!   MK        0.95     NL        1.00*    ON        1.00*    OV        0.94     
!   PT        1.00*    SC        0.97     TC        0.70     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.99     GG        1.00*    HN        1.00*    
!   KK        1.00     KP        0.93     LA        1.06     MA        1.00*    
!   MK        0.96     NL        1.00*    ON        1.00*    OV        1.21     
!   PT        1.05     SC        1.00*    TC        2.19     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  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 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        0.90     GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        0.89     LA        0.95     MA        1.00*    
!   MK        0.97     NL        1.00*    ON        1.00*    OV        0.94     
!   PT        1.00*    SC        0.95     TC        0.71     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.98     GG        1.00*    HN        1.00*    
!   KK        1.05     KP        0.97     LA        1.07     MA        1.00*    
!   MK        0.96     NL        1.00*    ON        1.00*    OV        1.26     
!   PT        1.08     SC        1.00*    TC        1.80     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  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 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        0.89     GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        0.92     LA        0.97     MA        1.00*    
!   MK        0.96     NL        1.00*    ON        1.00*    OV        0.98     
!   PT        1.00*    SC        0.99     TC        0.70     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.97     GG        1.00*    HN        1.00*    
!   KK        1.02     KP        0.93     LA        1.04     MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        1.25     
!   PT        1.08     SC        1.00*    TC        1.60     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  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 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        0.88     GG        1.00*    HN        1.00*    
!   KK        1.00*    KP        0.89     LA        0.94     MA        1.00*    
!   MK        0.99     NL        1.00*    ON        1.00*    OV        0.97     
!   PT        1.00*    SC        1.03     TC        0.60     TS        1.00*    
!   WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.623954Jy  sigma=0.004259
! Fit after  self-cal, rms=0.708017Jy  sigma=0.002491
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8126 mas, bmaj=1.394 mas, bpa=12.04 degrees
! Estimated noise=1096.65 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.0238647 Jy
! Component: 100  -  total flux cleaned = 0.0233156 Jy
! Component: 150  -  total flux cleaned = 0.0222604 Jy
! Component: 200  -  total flux cleaned = 0.0222679 Jy
! Total flux subtracted in 200 components = 0.0222679 Jy
! Clean residual min=-0.027538 max=0.031382 Jy/beam
! Clean residual mean=-0.001045 rms=0.007960 Jy/beam
! Combined flux in latest and established models = 3.19622 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 23 components and 3.19622 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.705830Jy  sigma=0.002438
! Fit after  self-cal, rms=0.706822Jy  sigma=0.002434
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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.706822Jy  sigma=0.002434
! Fit after  self-cal, rms=0.757922Jy  sigma=0.002421
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8112 mas, bmaj=1.418 mas, bpa=11.11 degrees
! Estimated noise=1099.63 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0164014 Jy
! Component: 100  -  total flux cleaned = 0.0158921 Jy
! Component: 150  -  total flux cleaned = 0.0154208 Jy
! Component: 200  -  total flux cleaned = 0.0154076 Jy
! Total flux subtracted in 200 components = 0.0154076 Jy
! Clean residual min=-0.024133 max=0.027131 Jy/beam
! Clean residual mean=-0.000489 rms=0.007049 Jy/beam
! Combined flux in latest and established models = 3.21163 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 23 components and 3.21163 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.756675Jy  sigma=0.002394
! Fit after  self-cal, rms=0.756629Jy  sigma=0.002392
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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.000410154 Jy
! Component: 100  -  total flux cleaned = -0.000399729 Jy
! Component: 150  -  total flux cleaned = -0.000729418 Jy
! Component: 200  -  total flux cleaned = -0.000740023 Jy
! Total flux subtracted in 200 components = -0.000740023 Jy
! Clean residual min=-0.021269 max=0.025685 Jy/beam
! Clean residual mean=-0.000456 rms=0.006836 Jy/beam
! Combined flux in latest and established models = 3.21089 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 25 components and 3.21089 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.756226Jy  sigma=0.002382
! Fit after  self-cal, rms=0.756179Jy  sigma=0.002381
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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.756179Jy  sigma=0.002381
! Fit after  self-cal, rms=0.826695Jy  sigma=0.002373
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8108 mas, bmaj=1.45 mas, bpa=10.12 degrees
! Estimated noise=1103.25 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0114995 Jy
! Component: 100  -  total flux cleaned = 0.0119333 Jy
! Component: 150  -  total flux cleaned = 0.0115534 Jy
! Component: 200  -  total flux cleaned = 0.0112215 Jy
! Total flux subtracted in 200 components = 0.0112215 Jy
! Clean residual min=-0.020370 max=0.023774 Jy/beam
! Clean residual mean=-0.000049 rms=0.006281 Jy/beam
! Combined flux in latest and established models = 3.22211 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 26 components and 3.22211 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.825997Jy  sigma=0.002358
! Fit after  self-cal, rms=0.825946Jy  sigma=0.002358
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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 = 5.50643e-05 Jy
! Component: 100  -  total flux cleaned = 5.55688e-05 Jy
! Component: 150  -  total flux cleaned = -0.000232582 Jy
! Component: 200  -  total flux cleaned = -0.00023151 Jy
! Total flux subtracted in 200 components = -0.00023151 Jy
! Clean residual min=-0.018714 max=0.022963 Jy/beam
! Clean residual mean=-0.000039 rms=0.006119 Jy/beam
! Combined flux in latest and established models = 3.22188 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 27 components and 3.22188 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.825646Jy  sigma=0.002351
! Fit after  self-cal, rms=0.825596Jy  sigma=0.002350
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 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.825596Jy  sigma=0.002350
! Fit after  self-cal, rms=0.866833Jy  sigma=0.002346
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=3.383 mas, bmaj=11.19 mas, bpa=8.109 degrees
! Estimated noise=1241.26 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00965541 Jy
! Component: 100  -  total flux cleaned = 0.00965487 Jy
! Component: 150  -  total flux cleaned = 0.00965141 Jy
! Component: 200  -  total flux cleaned = 0.00964765 Jy
! Total flux subtracted in 200 components = 0.00964765 Jy
! Clean residual min=-0.009418 max=0.014775 Jy/beam
! Clean residual mean=0.000300 rms=0.006166 Jy/beam
! Combined flux in latest and established models = 3.23153 Jy
selfcal
! Performing phase self-cal
! Adding 2 model components to the UV plane model.
! The established model now contains 27 components and 3.23153 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.866786Jy  sigma=0.002346
! Fit after  self-cal, rms=0.866739Jy  sigma=0.002344
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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.000445572 Jy
! Component: 100  -  total flux cleaned = 0.000453072 Jy
! Component: 150  -  total flux cleaned = 0.000458364 Jy
! Component: 200  -  total flux cleaned = 0.000462707 Jy
! Total flux subtracted in 200 components = 0.000462707 Jy
! Clean residual min=-0.009241 max=0.014962 Jy/beam
! Clean residual mean=0.000258 rms=0.006061 Jy/beam
! Combined flux in latest and established models = 3.23199 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 29 components and 3.23199 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.866810Jy  sigma=0.002347
! Fit after  self-cal, rms=0.866751Jy  sigma=0.002346
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
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 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8103 mas, bmaj=1.467 mas, bpa=9.574 degrees
! Estimated noise=1105.54 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8103 x 1.467 at 9.574 degrees (North through East)
! Clean map  min=-0.01491  max=2.5948 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.866751Jy  sigma=0.002346
! Fit after  self-cal, rms=1.501795Jy  sigma=0.001818
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8106 mas, bmaj=1.472 mas, bpa=9.698 degrees
! Estimated noise=1108.76 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00127056 Jy
! Component: 100  -  total flux cleaned = 0.00102508 Jy
! Component: 150  -  total flux cleaned = 0.00102521 Jy
! Component: 200  -  total flux cleaned = 0.00126338 Jy
! Total flux subtracted in 200 components = 0.00126338 Jy
! Clean residual min=-0.015470 max=0.018166 Jy/beam
! Clean residual mean=-0.000099 rms=0.004252 Jy/beam
! Combined flux in latest and established models = 3.23326 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 30 components and 3.23326 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.501667Jy  sigma=0.001811
! Fit after  self-cal, rms=1.501173Jy  sigma=0.001811
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Added new window around map position (3.4, 9.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00840468 Jy
! Component: 100  -  total flux cleaned = 0.00754377 Jy
! Component: 150  -  total flux cleaned = 0.00752641 Jy
! Component: 200  -  total flux cleaned = 0.00752771 Jy
! Total flux subtracted in 200 components = 0.00752771 Jy
! Clean residual min=-0.014344 max=0.011574 Jy/beam
! Clean residual mean=-0.000491 rms=0.003381 Jy/beam
! Combined flux in latest and established models = 3.24078 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 41 components and 3.24078 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.500582Jy  sigma=0.001794
! Fit after  self-cal, rms=1.500737Jy  sigma=0.001792
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.500737Jy  sigma=0.001792
! Fit after  self-cal, rms=1.442604Jy  sigma=0.001790
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 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.6222 mas, bmaj=1.04 mas, bpa=16.04 degrees
! Estimated noise=1893.11 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.8716 Jy
! Component: 100  -  total flux cleaned = 2.43434 Jy
! Component: 150  -  total flux cleaned = 2.71069 Jy
! Component: 200  -  total flux cleaned = 2.88704 Jy
! Total flux subtracted in 200 components = 2.88704 Jy
! Clean residual min=-0.053545 max=0.120698 Jy/beam
! Clean residual mean=0.004105 rms=0.023043 Jy/beam
! Combined flux in latest and established models = 2.88704 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 17 model components to the UV plane model.
! The established model now contains 17 components and 2.88704 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8102 mas, bmaj=1.477 mas, bpa=9.553 degrees
! Estimated noise=1109.47 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.197743 Jy
! Component: 100  -  total flux cleaned = 0.285447 Jy
! Component: 150  -  total flux cleaned = 0.327154 Jy
! Component: 200  -  total flux cleaned = 0.346417 Jy
! Total flux subtracted in 200 components = 0.346417 Jy
! Clean residual min=-0.017832 max=0.025972 Jy/beam
! Clean residual mean=0.000220 rms=0.005559 Jy/beam
! Combined flux in latest and established models = 3.23346 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 32 components and 3.23346 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Added new window around map position (-1.8, -8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0136145 Jy
! Component: 100  -  total flux cleaned = 0.0130033 Jy
! Component: 150  -  total flux cleaned = 0.0138605 Jy
! Component: 200  -  total flux cleaned = 0.0142039 Jy
! Total flux subtracted in 200 components = 0.0142039 Jy
! Clean residual min=-0.012102 max=0.011393 Jy/beam
! Clean residual mean=-0.000472 rms=0.003131 Jy/beam
! Combined flux in latest and established models = 3.24766 Jy
! Adding 17 model components to the UV plane model.
! The established model now contains 43 components and 3.24766 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=3.385 mas, bmaj=11.2 mas, bpa=8.097 degrees
! Estimated noise=1243.95 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00345642 Jy
! Component: 100  -  total flux cleaned = 0.00318207 Jy
! Component: 150  -  total flux cleaned = 0.00268741 Jy
! Component: 200  -  total flux cleaned = 0.00222973 Jy
! Total flux subtracted in 200 components = 0.00222973 Jy
! Clean residual min=-0.006197 max=0.004379 Jy/beam
! Clean residual mean=-0.001028 rms=0.002216 Jy/beam
! Combined flux in latest and established models = 3.24989 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.000425856 Jy
! Component: 100  -  total flux cleaned = -0.000813222 Jy
! Component: 150  -  total flux cleaned = -0.00116381 Jy
! Component: 200  -  total flux cleaned = -0.00149334 Jy
! Total flux subtracted in 200 components = -0.00149334 Jy
! Clean residual min=-0.006068 max=0.004168 Jy/beam
! Clean residual mean=-0.000860 rms=0.002151 Jy/beam
! Combined flux in latest and established models = 3.2484 Jy
! Adding 5 model components to the UV plane model.
! The established model now contains 47 components and 3.2484 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! Estimated beam: bmin=0.8102 mas, bmaj=1.477 mas, bpa=9.553 degrees
! Estimated noise=1109.47 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000826387 Jy
! Component: 100  -  total flux cleaned = -0.00079169 Jy
! Component: 150  -  total flux cleaned = -0.000791725 Jy
! Component: 200  -  total flux cleaned = -0.000777758 Jy
! Total flux subtracted in 200 components = -0.000777758 Jy
! Clean residual min=-0.010244 max=0.009463 Jy/beam
! Clean residual mean=-0.000436 rms=0.002677 Jy/beam
! Combined flux in latest and established models = 3.24762 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 58 components and 3.24762 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.442668Jy  sigma=0.001757
! Fit after  self-cal, rms=1.442714Jy  sigma=0.001754
wmodel J0538-4405_X_2003_06_18_pus_map.mod
! Writing 58 model components to file: J0538-4405_X_2003_06_18_pus_map.mod
wobs J0538-4405_X_2003_06_18_pus_uvs.fits
! Writing UV FITS file: J0538-4405_X_2003_06_18_pus_uvs.fits
wwins J0538-4405_X_2003_06_18_pus_map.win
! wwins: Wrote 3 windows to J0538-4405_X_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 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.00324756 Jy
! Component: 100  -  total flux cleaned = -0.00485016 Jy
! Component: 150  -  total flux cleaned = -0.00634798 Jy
! Component: 200  -  total flux cleaned = -0.00705591 Jy
! Component: 250  -  total flux cleaned = -0.00733101 Jy
! Component: 300  -  total flux cleaned = -0.00772783 Jy
! Component: 350  -  total flux cleaned = -0.00798129 Jy
! Component: 400  -  total flux cleaned = -0.00822714 Jy
! Component: 450  -  total flux cleaned = -0.0085837 Jy
! Component: 500  -  total flux cleaned = -0.00869731 Jy
! Component: 550  -  total flux cleaned = -0.00892348 Jy
! Component: 600  -  total flux cleaned = -0.00892401 Jy
! Component: 650  -  total flux cleaned = -0.00914042 Jy
! Component: 700  -  total flux cleaned = -0.0089262 Jy
! Component: 750  -  total flux cleaned = -0.00913768 Jy
! Component: 800  -  total flux cleaned = -0.00913722 Jy
! Component: 850  -  total flux cleaned = -0.00913679 Jy
! Component: 900  -  total flux cleaned = -0.00923735 Jy
! Component: 950  -  total flux cleaned = -0.00923703 Jy
! Component: 1000  -  total flux cleaned = -0.00933569 Jy
! Total flux subtracted in 1024 components = -0.00923697 Jy
! Clean residual min=-0.004922 max=0.006287 Jy/beam
! Clean residual mean=-0.000173 rms=0.001805 Jy/beam
! Combined flux in latest and established models = 3.23839 Jy
keep
! Adding 51 model components to the UV plane model.
! The established model now contains 109 components and 3.23839 Jy
wmap "J0538-4405_X_2003_06_18_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8102 x 1.477 at 9.553 degrees (North through East)
! Clean map  min=-0.014681  max=2.5959 Jy/beam
! Writing clean map to FITS file: J0538-4405_X_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 2.59592 
invert
! Inverting map 
! Your choice of large map pixels excluded 0.811% of the data.
!  The x-axis pixel size should ideally be below 0.1955 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.0017872 
device "J0538-4405_X_2003_06_18_pus\_map.eps/VPS"
! Attempting to open device: 'J0538-4405_X_2003_06_18_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.206539 0.206539 0.413079 0.826158 1.65232 3.30463 6.60926 13.2185 26.437 52.8741
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0053 
print "peak=",int(1000*peak_flux)/1000
! peak= 2.595 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8102 x 1.477 at 9.553 degrees (North through East)
! Clean map  min=-0.014681  max=2.5959 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0538-4405_X_2003_06_18_pus\_map.gif/vgif"
! Attempting to open device: 'J0538-4405_X_2003_06_18_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0538-4405_X_2003_06_18_pus_uvs.log closed on Thu Jan 18 13:26:18 2007