! Started logfile: J1316-3338_X_2001_10_29_pus_uvs.log on Mon Feb 25 16:14:57 2008
obs J1316-3338_X_2001_10_29_pus_uva.fits
! Reading UV FITS file: J1316-3338_X_2001_10_29_pus_uva.fits
! AN table 1: 82 integrations on 153 of 153 possible baselines.
! AN table 2: 42 integrations on 153 of 153 possible baselines.
! AN table 3: 126 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.0406013 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1316-3338
! 
! 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 1970 lines of history.
! 
! Reading 6212 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 256 
print "field_cell =",field_cell
! field_cell = 0.2 
print "taper_size =",taper_size
! taper_size = 70 
![@muppet J1316-3338_X_2001_10_29_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 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 1287 telescope corrections were flagged in sub-array 1.
!  A total of 693 telescope corrections were flagged in sub-array 2.
!  A total of 1796 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1287 telescope corrections were flagged in sub-array 1.
!  A total of 693 telescope corrections were flagged in sub-array 2.
!  A total of 1796 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1287 telescope corrections were flagged in sub-array 1.
!  A total of 693 telescope corrections were flagged in sub-array 2.
!  A total of 1796 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1287 telescope corrections were flagged in sub-array 1.
!  A total of 693 telescope corrections were flagged in sub-array 2.
!  A total of 1796 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.954925Jy  sigma=0.007320
! Fit after  self-cal, rms=0.394099Jy  sigma=0.002642
! 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 1.09% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.6873 mas, bmaj=1.365 mas, bpa=5.846 degrees
! Estimated noise=2242.71 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.852174 Jy
! Component: 100  -  total flux cleaned = 1.09263 Jy
! Total flux subtracted in 100 components = 1.09263 Jy
! Clean residual min=-0.072957 max=0.111615 Jy/beam
! Clean residual mean=-0.000703 rms=0.021253 Jy/beam
! Combined flux in latest and established models = 1.09263 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.09263 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.344343Jy  sigma=0.002274
! Fit after  self-cal, rms=0.343642Jy  sigma=0.002273
! Inverting map 
! Your choice of large map pixels excluded 1.09% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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 1.09% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.9199 mas, bmaj=1.75 mas, bpa=-0.5172 degrees
! Estimated noise=1202.82 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.123607 Jy
! Component: 100  -  total flux cleaned = 0.172871 Jy
! Component: 150  -  total flux cleaned = 0.178437 Jy
! Component: 200  -  total flux cleaned = 0.178416 Jy
! Total flux subtracted in 200 components = 0.178416 Jy
! Clean residual min=-0.046462 max=0.071214 Jy/beam
! Clean residual mean=0.000486 rms=0.015605 Jy/beam
! Combined flux in latest and established models = 1.27105 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 16 components and 1.27105 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.291105Jy  sigma=0.001872
! Fit after  self-cal, rms=0.290597Jy  sigma=0.001871
! Inverting map 
! Your choice of large map pixels excluded 1.09% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 129 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.78     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        0.90     MC        1.08     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.22     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.00*    GG        1.00*    HH        0.79     
!   HN        1.33     KK        1.00*    KP        0.93     LA        0.95     
!   MA        1.02     MC        1.33     MK        0.84     NL        1.12     
!   OV        1.00     PT        0.94     SC        0.98     TS        1.00*    
!   WF        0.97     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 129 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.74     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        0.91     MC        1.12     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.17     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.00*    GG        1.00*    HH        0.84     
!   HN        1.33     KK        1.00*    KP        0.95     LA        0.93     
!   MA        0.96     MC        1.25     MK        0.82     NL        1.10     
!   OV        1.00     PT        0.92     SC        0.93     TS        1.00*    
!   WF        0.93     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 129 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.76     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        0.89     MC        1.07     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.16     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        1.00*    GG        1.00*    HH        0.77     
!   HN        1.30     KK        1.00*    KP        0.94     LA        0.97     
!   MA        0.97     MC        1.23     MK        0.85     NL        1.12     
!   OV        0.99     PT        0.95     SC        0.97     TS        1.00*    
!   WF        0.97     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 129 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GG        1.00*    HH        0.77     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MA        0.92     MC        1.08     MK        1.00*    NL        1.00*    
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.13     
! 
!  A total of 63 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GG        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MA        0.00*    MC        0.00*    MK        0.00*    NL        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.00*    GG        1.00*    HH        0.84     
!   HN        1.32     KK        1.00*    KP        0.97     LA        0.94     
!   MA        0.89     MC        1.26     MK        0.88     NL        1.14     
!   OV        0.97     PT        0.95     SC        0.99     TS        1.00*    
!   WF        0.92     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.290597Jy  sigma=0.001871
! Fit after  self-cal, rms=0.212119Jy  sigma=0.001405
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.9029 mas, bmaj=1.87 mas, bpa=-4.195 degrees
! Estimated noise=1225.76 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.00703039 Jy
! Component: 100  -  total flux cleaned = 0.00653058 Jy
! Component: 150  -  total flux cleaned = 0.00559248 Jy
! Component: 200  -  total flux cleaned = 0.00515627 Jy
! Total flux subtracted in 200 components = 0.00515627 Jy
! Clean residual min=-0.020519 max=0.030456 Jy/beam
! Clean residual mean=0.001138 rms=0.007847 Jy/beam
! Combined flux in latest and established models = 1.27621 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 19 components and 1.27621 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208226Jy  sigma=0.001389
! Fit after  self-cal, rms=0.207437Jy  sigma=0.001387
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.207437Jy  sigma=0.001387
! Fit after  self-cal, rms=0.283922Jy  sigma=0.001247
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.942 mas, bmaj=1.872 mas, bpa=-4.123 degrees
! Estimated noise=1240.08 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00296101 Jy
! Component: 100  -  total flux cleaned = -0.00296115 Jy
! Component: 150  -  total flux cleaned = -0.00282478 Jy
! Component: 200  -  total flux cleaned = -0.00282602 Jy
! Total flux subtracted in 200 components = -0.00282602 Jy
! Clean residual min=-0.012255 max=0.026602 Jy/beam
! Clean residual mean=0.001456 rms=0.006025 Jy/beam
! Combined flux in latest and established models = 1.27338 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 24 components and 1.27338 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.283720Jy  sigma=0.001245
! Fit after  self-cal, rms=0.285372Jy  sigma=0.001244
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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)
! Added new window around map position (-3.2, -1.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0254415 Jy
! Component: 100  -  total flux cleaned = 0.0375823 Jy
! Component: 150  -  total flux cleaned = 0.0434303 Jy
! Component: 200  -  total flux cleaned = 0.0438401 Jy
! Total flux subtracted in 200 components = 0.0438401 Jy
! Clean residual min=-0.010809 max=0.013502 Jy/beam
! Clean residual mean=0.000112 rms=0.003441 Jy/beam
! Combined flux in latest and established models = 1.31722 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 45 components and 1.31722 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.283198Jy  sigma=0.001205
! Fit after  self-cal, rms=0.282669Jy  sigma=0.001200
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.282669Jy  sigma=0.001200
! Fit after  self-cal, rms=0.284758Jy  sigma=0.001198
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.9434 mas, bmaj=1.869 mas, bpa=-4.068 degrees
! Estimated noise=1239.27 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00800441 Jy
! Component: 100  -  total flux cleaned = 0.00992444 Jy
! Component: 150  -  total flux cleaned = 0.0104535 Jy
! Component: 200  -  total flux cleaned = 0.0104531 Jy
! Total flux subtracted in 200 components = 0.0104531 Jy
! Clean residual min=-0.009136 max=0.009754 Jy/beam
! Clean residual mean=-0.000160 rms=0.002772 Jy/beam
! Combined flux in latest and established models = 1.32767 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 50 components and 1.32767 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284335Jy  sigma=0.001191
! Fit after  self-cal, rms=0.284239Jy  sigma=0.001190
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.00370349 Jy
! Component: 100  -  total flux cleaned = 0.0044111 Jy
! Component: 150  -  total flux cleaned = 0.00441368 Jy
! Component: 200  -  total flux cleaned = 0.00430091 Jy
! Total flux subtracted in 200 components = 0.00430091 Jy
! Clean residual min=-0.009035 max=0.008425 Jy/beam
! Clean residual mean=-0.000299 rms=0.002572 Jy/beam
! Combined flux in latest and established models = 1.33197 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 57 components and 1.33197 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284081Jy  sigma=0.001188
! Fit after  self-cal, rms=0.284085Jy  sigma=0.001188
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.284085Jy  sigma=0.001188
! Fit after  self-cal, rms=0.282182Jy  sigma=0.001187
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=2.257 mas, bmaj=6.095 mas, bpa=-5.686 degrees
! Estimated noise=1517.54 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00196706 Jy
! Component: 100  -  total flux cleaned = 0.00276314 Jy
! Component: 150  -  total flux cleaned = 0.00286013 Jy
! Component: 200  -  total flux cleaned = 0.00294476 Jy
! Total flux subtracted in 200 components = 0.00294476 Jy
! Clean residual min=-0.009022 max=0.009871 Jy/beam
! Clean residual mean=-0.000737 rms=0.003004 Jy/beam
! Combined flux in latest and established models = 1.33492 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 64 components and 1.33492 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.282140Jy  sigma=0.001186
! Fit after  self-cal, rms=0.282056Jy  sigma=0.001186
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.000528185 Jy
! Component: 100  -  total flux cleaned = 0.000978724 Jy
! Component: 150  -  total flux cleaned = 0.000981574 Jy
! Component: 200  -  total flux cleaned = 0.0010508 Jy
! Total flux subtracted in 200 components = 0.0010508 Jy
! Clean residual min=-0.008933 max=0.009905 Jy/beam
! Clean residual mean=-0.000805 rms=0.003007 Jy/beam
! Combined flux in latest and established models = 1.33597 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 64 components and 1.33597 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.282046Jy  sigma=0.001186
! Fit after  self-cal, rms=0.282022Jy  sigma=0.001185
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.9445 mas, bmaj=1.867 mas, bpa=-4.025 degrees
! Estimated noise=1238.39 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.9445 x 1.867 at -4.025 degrees (North through East)
! Clean map  min=-0.0074972  max=1.1349 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.282022Jy  sigma=0.001185
! Fit after  self-cal, rms=0.533878Jy  sigma=0.001038
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.945 mas, bmaj=1.865 mas, bpa=-3.969 degrees
! Estimated noise=1237.78 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00100959 Jy
! Component: 100  -  total flux cleaned = -0.00214392 Jy
! Component: 150  -  total flux cleaned = -0.00268888 Jy
! Component: 200  -  total flux cleaned = -0.00288833 Jy
! Total flux subtracted in 200 components = -0.00288833 Jy
! Clean residual min=-0.007638 max=0.007856 Jy/beam
! Clean residual mean=-0.000049 rms=0.002213 Jy/beam
! Combined flux in latest and established models = 1.33308 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 75 components and 1.33308 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.533705Jy  sigma=0.001037
! Fit after  self-cal, rms=0.534005Jy  sigma=0.001037
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000487087 Jy
! Component: 100  -  total flux cleaned = 0.000482565 Jy
! Component: 150  -  total flux cleaned = 0.000479965 Jy
! Component: 200  -  total flux cleaned = 0.000392158 Jy
! Total flux subtracted in 200 components = 0.000392158 Jy
! Clean residual min=-0.007406 max=0.007612 Jy/beam
! Clean residual mean=-0.000063 rms=0.002144 Jy/beam
! Combined flux in latest and established models = 1.33347 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 78 components and 1.33347 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.533877Jy  sigma=0.001036
! Fit after  self-cal, rms=0.533984Jy  sigma=0.001036
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.533984Jy  sigma=0.001036
! Fit after  self-cal, rms=0.504584Jy  sigma=0.001035
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.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.7534 mas, bmaj=1.301 mas, bpa=5.127 degrees
! Estimated noise=2379.25 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.858959 Jy
! Component: 100  -  total flux cleaned = 1.0712 Jy
! Component: 150  -  total flux cleaned = 1.17002 Jy
! Component: 200  -  total flux cleaned = 1.222 Jy
! Total flux subtracted in 200 components = 1.222 Jy
! Clean residual min=-0.019530 max=0.026535 Jy/beam
! Clean residual mean=0.000413 rms=0.006557 Jy/beam
! Combined flux in latest and established models = 1.222 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 12 model components to the UV plane model.
! The established model now contains 12 components and 1.222 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.946 mas, bmaj=1.864 mas, bpa=-3.958 degrees
! Estimated noise=1237.25 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.0421168 Jy
! Component: 100  -  total flux cleaned = 0.0676715 Jy
! Component: 150  -  total flux cleaned = 0.0847276 Jy
! Component: 200  -  total flux cleaned = 0.0965811 Jy
! Total flux subtracted in 200 components = 0.0965811 Jy
! Clean residual min=-0.009018 max=0.009805 Jy/beam
! Clean residual mean=0.000328 rms=0.002962 Jy/beam
! Combined flux in latest and established models = 1.31858 Jy
! Adding 22 model components to the UV plane model.
! The established model now contains 28 components and 1.31858 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 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.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=2.258 mas, bmaj=6.089 mas, bpa=-5.657 degrees
! Estimated noise=1513.32 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0103433 Jy
! Component: 100  -  total flux cleaned = 0.0153617 Jy
! Component: 150  -  total flux cleaned = 0.015976 Jy
! Component: 200  -  total flux cleaned = 0.0159758 Jy
! Total flux subtracted in 200 components = 0.0159758 Jy
! Clean residual min=-0.008404 max=0.009640 Jy/beam
! Clean residual mean=-0.000265 rms=0.002947 Jy/beam
! Combined flux in latest and established models = 1.33456 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.000177015 Jy
! Component: 100  -  total flux cleaned = 0.000176408 Jy
! Component: 150  -  total flux cleaned = 0.000259713 Jy
! Component: 200  -  total flux cleaned = 0.000334769 Jy
! Total flux subtracted in 200 components = 0.000334769 Jy
! Clean residual min=-0.007963 max=0.009606 Jy/beam
! Clean residual mean=-0.000288 rms=0.002864 Jy/beam
! Combined flux in latest and established models = 1.33489 Jy
! Adding 19 model components to the UV plane model.
! The established model now contains 44 components and 1.33489 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! Estimated beam: bmin=0.946 mas, bmaj=1.864 mas, bpa=-3.958 degrees
! Estimated noise=1237.25 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00256961 Jy
! Component: 100  -  total flux cleaned = 0.00203957 Jy
! Component: 150  -  total flux cleaned = 0.00156762 Jy
! Component: 200  -  total flux cleaned = 0.00127601 Jy
! Total flux subtracted in 200 components = 0.00127601 Jy
! Clean residual min=-0.009581 max=0.008149 Jy/beam
! Clean residual mean=-0.000189 rms=0.002302 Jy/beam
! Combined flux in latest and established models = 1.33617 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 53 components and 1.33617 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.504748Jy  sigma=0.001044
! Fit after  self-cal, rms=0.502177Jy  sigma=0.001043
wmodel J1316-3338_X_2001_10_29_pus_map.mod
! Writing 53 model components to file: J1316-3338_X_2001_10_29_pus_map.mod
wobs J1316-3338_X_2001_10_29_pus_uvs.fits
! Writing UV FITS file: J1316-3338_X_2001_10_29_pus_uvs.fits
wwins J1316-3338_X_2001_10_29_pus_map.win
! wwins: Wrote 2 windows to J1316-3338_X_2001_10_29_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.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.00136119 Jy
! Component: 100  -  total flux cleaned = -0.0022348 Jy
! Component: 150  -  total flux cleaned = -0.00346243 Jy
! Component: 200  -  total flux cleaned = -0.00448086 Jy
! Component: 250  -  total flux cleaned = -0.00513622 Jy
! Component: 300  -  total flux cleaned = -0.00549541 Jy
! Component: 350  -  total flux cleaned = -0.00558041 Jy
! Component: 400  -  total flux cleaned = -0.00581997 Jy
! Component: 450  -  total flux cleaned = -0.00605027 Jy
! Component: 500  -  total flux cleaned = -0.00634792 Jy
! Component: 550  -  total flux cleaned = -0.00649002 Jy
! Component: 600  -  total flux cleaned = -0.00642015 Jy
! Component: 650  -  total flux cleaned = -0.00655518 Jy
! Component: 700  -  total flux cleaned = -0.00668537 Jy
! Component: 750  -  total flux cleaned = -0.00706636 Jy
! Component: 800  -  total flux cleaned = -0.00743874 Jy
! Component: 850  -  total flux cleaned = -0.00780336 Jy
! Component: 900  -  total flux cleaned = -0.0081604 Jy
! Component: 950  -  total flux cleaned = -0.00850877 Jy
! Component: 1000  -  total flux cleaned = -0.00879343 Jy
! Total flux subtracted in 1024 components = -0.00885015 Jy
! Clean residual min=-0.002927 max=0.002790 Jy/beam
! Clean residual mean=-0.000105 rms=0.001157 Jy/beam
! Combined flux in latest and established models = 1.32732 Jy
keep
! Adding 58 model components to the UV plane model.
! The established model now contains 111 components and 1.32732 Jy
![Exited script file: muppet]
wmap "J1316-3338_X_2001_10_29_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.946 x 1.864 at -3.958 degrees (North through East)
! Clean map  min=-0.0057997  max=1.1269 Jy/beam
! Writing clean map to FITS file: J1316-3338_X_2001_10_29_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.12694 
invert
! Inverting map 
! Your choice of large map pixels excluded 0.989% of the data.
!  The x-axis pixel size should ideally be below 0.1974 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00114628 
device "J1316-3338_X_2001_10_29_pus\_map.eps/VPS"
! Attempting to open device: 'J1316-3338_X_2001_10_29_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.305148 0.305148 0.610295 1.22059 2.44118 4.88236 9.76473 19.5295 39.0589 78.1178
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0034 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.126 
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.946 x 1.864 at -3.958 degrees (North through East)
! Clean map  min=-0.0057997  max=1.1269 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1316-3338_X_2001_10_29_pus\_map.gif/vgif"
! Attempting to open device: 'J1316-3338_X_2001_10_29_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1316-3338_X_2001_10_29_pus_uvs.log closed on Mon Feb 25 16:15:03 2008