! Started logfile: J1517-2422_S_1999_12_20_pus_uvs.log on Thu Dec 20 15:20:55 2007
obs J1517-2422_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J1517-2422_S_1999_12_20_pus_uva.fits
! AN table 1: 128 integrations on 190 of 190 possible baselines.
! AN table 2: 70 integrations on 190 of 190 possible baselines.
! AN table 3: 90 integrations on 190 of 190 possible baselines.
! AN table 4: 29 integrations on 190 of 190 possible baselines.
! AN table 5: 10 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0454692 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1517-2422
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2298 lines of history.
! 
! Reading 11300 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J1517-2422_S_1999_12_20_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 2476 telescope corrections were flagged in sub-array 1.
!  A total of 860 telescope corrections were flagged in sub-array 2.
!  A total of 1639 telescope corrections were flagged in sub-array 3.
!  A total of 511 telescope corrections were flagged in sub-array 4.
!  A total of 200 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 2530 telescope corrections were flagged in sub-array 1.
!  A total of 860 telescope corrections were flagged in sub-array 2.
!  A total of 1639 telescope corrections were flagged in sub-array 3.
!  A total of 511 telescope corrections were flagged in sub-array 4.
!  A total of 200 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 2485 telescope corrections were flagged in sub-array 1.
!  A total of 860 telescope corrections were flagged in sub-array 2.
!  A total of 1666 telescope corrections were flagged in sub-array 3.
!  A total of 511 telescope corrections were flagged in sub-array 4.
!  A total of 200 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 2530 telescope corrections were flagged in sub-array 1.
!  A total of 860 telescope corrections were flagged in sub-array 2.
!  A total of 1639 telescope corrections were flagged in sub-array 3.
!  A total of 511 telescope corrections were flagged in sub-array 4.
!  A total of 200 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=1.399108Jy  sigma=0.011509
! Fit after  self-cal, rms=0.876417Jy  sigma=0.007378
! 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.419 mas, bmaj=6.071 mas, bpa=-0.4439 degrees
! Estimated noise=1525.59 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.21247 Jy
! Component: 100  -  total flux cleaned = 1.5997 Jy
! Total flux subtracted in 100 components = 1.5997 Jy
! Clean residual min=-0.048466 max=0.156519 Jy/beam
! Clean residual mean=0.000941 rms=0.019106 Jy/beam
! Combined flux in latest and established models = 1.5997 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 10 components and 1.5997 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.424938Jy  sigma=0.003502
! Fit after  self-cal, rms=0.424028Jy  sigma=0.003498
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.171005 Jy
! Component: 100  -  total flux cleaned = 0.262732 Jy
! Total flux subtracted in 100 components = 0.262732 Jy
! Clean residual min=-0.036819 max=0.071525 Jy/beam
! Clean residual mean=0.000531 rms=0.011728 Jy/beam
! Combined flux in latest and established models = 1.86244 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 20 components and 1.86244 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.300060Jy  sigma=0.002345
! Fit after  self-cal, rms=0.299516Jy  sigma=0.002340
! 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=3.426 mas, bmaj=9.465 mas, bpa=-1.821 degrees
! Estimated noise=867.177 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.108652 Jy
! Component: 100  -  total flux cleaned = 0.157415 Jy
! Component: 150  -  total flux cleaned = 0.1806 Jy
! Component: 200  -  total flux cleaned = 0.187074 Jy
! Total flux subtracted in 200 components = 0.187074 Jy
! Clean residual min=-0.030202 max=0.111120 Jy/beam
! Clean residual mean=0.003929 rms=0.017665 Jy/beam
! Combined flux in latest and established models = 2.04951 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 39 components and 2.04951 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265318Jy  sigma=0.001997
! Fit after  self-cal, rms=0.264534Jy  sigma=0.001990
! Inverting map 
! Added new window around map position (6.5, -15.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.102298 Jy
! Component: 100  -  total flux cleaned = 0.150852 Jy
! Component: 150  -  total flux cleaned = 0.168734 Jy
! Component: 200  -  total flux cleaned = 0.174006 Jy
! Total flux subtracted in 200 components = 0.174006 Jy
! Clean residual min=-0.021180 max=0.047474 Jy/beam
! Clean residual mean=0.001697 rms=0.009277 Jy/beam
! Combined flux in latest and established models = 2.22352 Jy
! Performing phase self-cal
! Adding 41 model components to the UV plane model.
! The established model now contains 79 components and 2.22352 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.227410Jy  sigma=0.001615
! Fit after  self-cal, rms=0.221170Jy  sigma=0.001549
! Inverting map 
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.00*    GC        1.00*    HH        1.09     
!   HN        1.00*    KK        1.00*    KP        1.00*    LA        1.00*    
!   MC        0.94     MK        1.00*    NY        1.00*    ON        1.01     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        0.96     GN        1.00*    NL        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.01     GC        1.00*    HH        1.00*    
!   HN        1.04     KK        1.03     KP        0.99     LA        0.99     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        1.01     PT        1.00     SC        0.95     TS        1.00*    
!   WF        0.99     WZ        1.00*    GN        1.00*    NL        1.02     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.11     FD        1.01     GC        1.00*    HH        1.00*    
!   HN        0.99     KK        1.00*    KP        0.91     LA        0.98     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        1.00     PT        1.01     SC        1.02     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.05     GC        1.00*    HH        1.00*    
!   HN        1.10     KK        1.01     KP        0.99     LA        0.95     
!   MC        1.00*    MK        0.95     NY        1.00*    ON        1.00*    
!   OV        0.98     PT        0.98     SC        0.95     TS        1.00*    
!   WF        1.00     WZ        1.00*    GN        1.00*    NL        1.03     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.11     FD        1.05     GC        1.00*    HH        1.00*    
!   HN        1.04     KK        1.00*    KP        0.97     LA        0.95     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        1.00     PT        0.98     SC        1.01     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 75 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.04     GC        1.00*    HH        1.00*    
!   HN        1.05     KK        1.04     KP        1.00     LA        0.99     
!   MC        1.00*    MK        0.96     NY        1.00*    ON        1.00*    
!   OV        1.01     PT        0.96     SC        0.96     TS        1.00*    
!   WF        1.00     WZ        1.00*    GN        1.00*    NL        0.99     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.11     FD        1.04     GC        1.00*    HH        1.00*    
!   HN        1.02     KK        1.00*    KP        0.98     LA        0.98     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        1.01     PT        0.98     SC        1.03     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 30 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.01     GC        1.00*    HH        1.00*    
!   HN        1.06     KK        1.05     KP        0.99     LA        0.98     
!   MC        1.00*    MK        1.01     NY        1.00*    ON        1.00*    
!   OV        0.97     PT        1.03     SC        0.97     TS        1.00*    
!   WF        1.01     WZ        1.00*    GN        1.00*    NL        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.05     FD        1.01     GC        1.00*    HH        1.00*    
!   HN        1.00     KK        1.00*    KP        0.97     LA        0.99     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        0.98     PT        1.09     SC        1.00     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.00*    FD        0.00*    GC        0.00*    HH        0.00*    
!   HN        0.00*    KK        0.00*    KP        0.00*    LA        0.00*    
!   MC        0.00*    MK        0.00*    NY        0.00*    ON        0.00*    
!   OV        0.00*    PT        0.00*    SC        0.00*    TS        0.00*    
!   WF        0.00*    WZ        0.00*    GN        0.00*    NL        0.00*    
! 
! 
! Fit before self-cal, rms=0.221170Jy  sigma=0.001549
! Fit after  self-cal, rms=0.190767Jy  sigma=0.001379
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.27 mas, bpa=-3.792 degrees
! Estimated noise=879.012 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.0269998 Jy
! Component: 100  -  total flux cleaned = 0.0382179 Jy
! Component: 150  -  total flux cleaned = 0.0405728 Jy
! Component: 200  -  total flux cleaned = 0.0415048 Jy
! Total flux subtracted in 200 components = 0.0415048 Jy
! Clean residual min=-0.013031 max=0.030817 Jy/beam
! Clean residual mean=0.001391 rms=0.005374 Jy/beam
! Combined flux in latest and established models = 2.26502 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 105 components and 2.26502 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.186595Jy  sigma=0.001342
! Fit after  self-cal, rms=0.185889Jy  sigma=0.001336
! Inverting map 
! Added new window around map position (24, -30.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0248258 Jy
! Component: 100  -  total flux cleaned = 0.0332346 Jy
! Component: 150  -  total flux cleaned = 0.0383587 Jy
! Component: 200  -  total flux cleaned = 0.0408798 Jy
! Total flux subtracted in 200 components = 0.0408798 Jy
! Clean residual min=-0.015405 max=0.015428 Jy/beam
! Clean residual mean=0.000856 rms=0.003841 Jy/beam
! Combined flux in latest and established models = 2.3059 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 132 components and 2.3059 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.181958Jy  sigma=0.001301
! Fit after  self-cal, rms=0.181460Jy  sigma=0.001297
! 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.181460Jy  sigma=0.001297
! Fit after  self-cal, rms=0.178607Jy  sigma=0.001274
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.28 mas, bpa=-3.782 degrees
! Estimated noise=878.689 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0137701 Jy
! Component: 100  -  total flux cleaned = 0.0227747 Jy
! Component: 150  -  total flux cleaned = 0.0268162 Jy
! Component: 200  -  total flux cleaned = 0.0291924 Jy
! Total flux subtracted in 200 components = 0.0291924 Jy
! Clean residual min=-0.011239 max=0.012024 Jy/beam
! Clean residual mean=0.000446 rms=0.002960 Jy/beam
! Combined flux in latest and established models = 2.33509 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 159 components and 2.33509 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.176986Jy  sigma=0.001261
! Fit after  self-cal, rms=0.176827Jy  sigma=0.001260
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.00300203 Jy
! Component: 100  -  total flux cleaned = 0.00416244 Jy
! Component: 150  -  total flux cleaned = 0.00480349 Jy
! Component: 200  -  total flux cleaned = 0.00519477 Jy
! Total flux subtracted in 200 components = 0.00519477 Jy
! Clean residual min=-0.011457 max=0.011599 Jy/beam
! Clean residual mean=0.000377 rms=0.002796 Jy/beam
! Combined flux in latest and established models = 2.34029 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 166 components and 2.34029 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.176287Jy  sigma=0.001255
! Fit after  self-cal, rms=0.176195Jy  sigma=0.001255
! 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.176195Jy  sigma=0.001255
! Fit after  self-cal, rms=0.175793Jy  sigma=0.001252
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.29 mas, bpa=-3.796 degrees
! Estimated noise=878.537 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00750621 Jy
! Component: 100  -  total flux cleaned = 0.0101391 Jy
! Component: 150  -  total flux cleaned = 0.0118169 Jy
! Component: 200  -  total flux cleaned = 0.0123096 Jy
! Total flux subtracted in 200 components = 0.0123096 Jy
! Clean residual min=-0.009526 max=0.010188 Jy/beam
! Clean residual mean=0.000250 rms=0.002543 Jy/beam
! Combined flux in latest and established models = 2.3526 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 186 components and 2.3526 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.175262Jy  sigma=0.001248
! Fit after  self-cal, rms=0.175186Jy  sigma=0.001248
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.00122201 Jy
! Component: 100  -  total flux cleaned = 0.00137423 Jy
! Component: 150  -  total flux cleaned = 0.00151893 Jy
! Component: 200  -  total flux cleaned = 0.00165707 Jy
! Total flux subtracted in 200 components = 0.00165707 Jy
! Clean residual min=-0.009740 max=0.009991 Jy/beam
! Clean residual mean=0.000228 rms=0.002473 Jy/beam
! Combined flux in latest and established models = 2.35425 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 199 components and 2.35425 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.174920Jy  sigma=0.001246
! Fit after  self-cal, rms=0.174865Jy  sigma=0.001246
! 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.174865Jy  sigma=0.001246
! Fit after  self-cal, rms=0.174619Jy  sigma=0.001245
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.857 mas, bmaj=20.78 mas, bpa=8.266 degrees
! Estimated noise=1044.02 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00743119 Jy
! Component: 100  -  total flux cleaned = 0.0091967 Jy
! Component: 150  -  total flux cleaned = 0.00967765 Jy
! Component: 200  -  total flux cleaned = 0.00967962 Jy
! Total flux subtracted in 200 components = 0.00967962 Jy
! Clean residual min=-0.007320 max=0.010245 Jy/beam
! Clean residual mean=0.000222 rms=0.002888 Jy/beam
! Combined flux in latest and established models = 2.36393 Jy
selfcal
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 218 components and 2.36393 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.174447Jy  sigma=0.001243
! Fit after  self-cal, rms=0.174379Jy  sigma=0.001243
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.000880054 Jy
! Component: 100  -  total flux cleaned = 0.00101474 Jy
! Component: 150  -  total flux cleaned = 0.00101185 Jy
! Component: 200  -  total flux cleaned = 0.00100651 Jy
! Total flux subtracted in 200 components = 0.00100651 Jy
! Clean residual min=-0.007192 max=0.010160 Jy/beam
! Clean residual mean=0.000195 rms=0.002850 Jy/beam
! Combined flux in latest and established models = 2.36494 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 227 components and 2.36494 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.174317Jy  sigma=0.001242
! Fit after  self-cal, rms=0.174277Jy  sigma=0.001242
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
win_mult = win_mult / 1.2
print "************** FINISHED AMPLITUDE SELF-CAL **************"
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
restore
! Inverting map and beam 
! Estimated beam: bmin=3.492 mas, bmaj=11.29 mas, bpa=-3.807 degrees
! Estimated noise=878.207 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.492 x 11.29 at -3.807 degrees (North through East)
! Clean map  min=-0.010398  max=1.7069 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.174277Jy  sigma=0.001242
! Fit after  self-cal, rms=0.164068Jy  sigma=0.001107
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.31 mas, bpa=-3.841 degrees
! Estimated noise=877.925 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00131908 Jy
! Component: 100  -  total flux cleaned = 0.00159177 Jy
! Component: 150  -  total flux cleaned = 0.00158978 Jy
! Component: 200  -  total flux cleaned = 0.00183318 Jy
! Total flux subtracted in 200 components = 0.00183318 Jy
! Clean residual min=-0.008009 max=0.008634 Jy/beam
! Clean residual mean=0.000073 rms=0.002173 Jy/beam
! Combined flux in latest and established models = 2.36677 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 242 components and 2.36677 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.163834Jy  sigma=0.001106
! Fit after  self-cal, rms=0.163794Jy  sigma=0.001105
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -3.21845e-05 Jy
! Component: 100  -  total flux cleaned = 8.81669e-05 Jy
! Component: 150  -  total flux cleaned = 9.367e-05 Jy
! Component: 200  -  total flux cleaned = 9.70207e-05 Jy
! Total flux subtracted in 200 components = 9.70207e-05 Jy
! Clean residual min=-0.007886 max=0.008431 Jy/beam
! Clean residual mean=0.000073 rms=0.002140 Jy/beam
! Combined flux in latest and established models = 2.36687 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 249 components and 2.36687 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.163630Jy  sigma=0.001104
! Fit after  self-cal, rms=0.163592Jy  sigma=0.001104
! 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.163592Jy  sigma=0.001104
! Fit after  self-cal, rms=0.163513Jy  sigma=0.001104
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.516 mas, bmaj=7.567 mas, bpa=-4.402 degrees
! Estimated noise=1553.45 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.26695 Jy
! Component: 100  -  total flux cleaned = 1.65372 Jy
! Component: 150  -  total flux cleaned = 1.82059 Jy
! Component: 200  -  total flux cleaned = 1.91938 Jy
! Total flux subtracted in 200 components = 1.91938 Jy
! Clean residual min=-0.023078 max=0.053861 Jy/beam
! Clean residual mean=0.000494 rms=0.010066 Jy/beam
! Combined flux in latest and established models = 1.91938 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 25 model components to the UV plane model.
! The established model now contains 25 components and 1.91938 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.31 mas, bpa=-3.846 degrees
! Estimated noise=877.666 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.129841 Jy
! Component: 100  -  total flux cleaned = 0.211293 Jy
! Component: 150  -  total flux cleaned = 0.265737 Jy
! Component: 200  -  total flux cleaned = 0.305673 Jy
! Total flux subtracted in 200 components = 0.305673 Jy
! Clean residual min=-0.013720 max=0.027495 Jy/beam
! Clean residual mean=0.001884 rms=0.007486 Jy/beam
! Combined flux in latest and established models = 2.22506 Jy
! Adding 82 model components to the UV plane model.
! The established model now contains 103 components and 2.22506 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.853 mas, bmaj=20.77 mas, bpa=8.255 degrees
! Estimated noise=1043.59 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0468491 Jy
! Component: 100  -  total flux cleaned = 0.0772843 Jy
! Component: 150  -  total flux cleaned = 0.0979845 Jy
! Component: 200  -  total flux cleaned = 0.112293 Jy
! Total flux subtracted in 200 components = 0.112293 Jy
! Clean residual min=-0.009077 max=0.013256 Jy/beam
! Clean residual mean=0.000779 rms=0.003953 Jy/beam
! Combined flux in latest and established models = 2.33735 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.00999518 Jy
! Component: 100  -  total flux cleaned = 0.0157958 Jy
! Component: 150  -  total flux cleaned = 0.0182896 Jy
! Component: 200  -  total flux cleaned = 0.0203636 Jy
! Total flux subtracted in 200 components = 0.0203636 Jy
! Clean residual min=-0.006823 max=0.010530 Jy/beam
! Clean residual mean=0.000331 rms=0.002888 Jy/beam
! Combined flux in latest and established models = 2.35771 Jy
! Adding 101 model components to the UV plane model.
! The established model now contains 190 components and 2.35771 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=11.31 mas, bpa=-3.846 degrees
! Estimated noise=877.666 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00273174 Jy
! Component: 100  -  total flux cleaned = 0.00366614 Jy
! Component: 150  -  total flux cleaned = 0.00388185 Jy
! Component: 200  -  total flux cleaned = 0.00369695 Jy
! Total flux subtracted in 200 components = 0.00369695 Jy
! Clean residual min=-0.006822 max=0.008930 Jy/beam
! Clean residual mean=0.000129 rms=0.002243 Jy/beam
! Combined flux in latest and established models = 2.36141 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 212 components and 2.36141 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.164083Jy  sigma=0.001111
! Fit after  self-cal, rms=0.163725Jy  sigma=0.001108
wmodel J1517-2422_S_1999_12_20_pus_map.mod
! Writing 212 model components to file: J1517-2422_S_1999_12_20_pus_map.mod
wobs J1517-2422_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J1517-2422_S_1999_12_20_pus_uvs.fits
wwins J1517-2422_S_1999_12_20_pus_map.win
! wwins: Wrote 3 windows to J1517-2422_S_1999_12_20_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.00386769 Jy
! Component: 100  -  total flux cleaned = 0.0067283 Jy
! Component: 150  -  total flux cleaned = 0.00788056 Jy
! Component: 200  -  total flux cleaned = 0.00851106 Jy
! Component: 250  -  total flux cleaned = 0.0085135 Jy
! Component: 300  -  total flux cleaned = 0.00851353 Jy
! Component: 350  -  total flux cleaned = 0.00860662 Jy
! Component: 400  -  total flux cleaned = 0.00887469 Jy
! Component: 450  -  total flux cleaned = 0.00861239 Jy
! Component: 500  -  total flux cleaned = 0.00861215 Jy
! Component: 550  -  total flux cleaned = 0.00852906 Jy
! Component: 600  -  total flux cleaned = 0.00820714 Jy
! Component: 650  -  total flux cleaned = 0.00797218 Jy
! Component: 700  -  total flux cleaned = 0.00781842 Jy
! Component: 750  -  total flux cleaned = 0.00751775 Jy
! Component: 800  -  total flux cleaned = 0.00744341 Jy
! Component: 850  -  total flux cleaned = 0.00737061 Jy
! Component: 900  -  total flux cleaned = 0.00730025 Jy
! Component: 950  -  total flux cleaned = 0.00736824 Jy
! Component: 1000  -  total flux cleaned = 0.00723144 Jy
! Component: 1050  -  total flux cleaned = 0.00703114 Jy
! Component: 1100  -  total flux cleaned = 0.00696494 Jy
! Component: 1150  -  total flux cleaned = 0.00683505 Jy
! Component: 1200  -  total flux cleaned = 0.00664368 Jy
! Component: 1250  -  total flux cleaned = 0.00645613 Jy
! Component: 1300  -  total flux cleaned = 0.0063945 Jy
! Component: 1350  -  total flux cleaned = 0.00621145 Jy
! Component: 1400  -  total flux cleaned = 0.00597172 Jy
! Component: 1450  -  total flux cleaned = 0.00603172 Jy
! Component: 1500  -  total flux cleaned = 0.00585574 Jy
! Component: 1550  -  total flux cleaned = 0.00574006 Jy
! Component: 1600  -  total flux cleaned = 0.00568375 Jy
! Component: 1650  -  total flux cleaned = 0.00545896 Jy
! Component: 1700  -  total flux cleaned = 0.00534788 Jy
! Component: 1750  -  total flux cleaned = 0.0051834 Jy
! Component: 1800  -  total flux cleaned = 0.00512941 Jy
! Component: 1850  -  total flux cleaned = 0.00507514 Jy
! Component: 1900  -  total flux cleaned = 0.00496814 Jy
! Component: 1950  -  total flux cleaned = 0.00486275 Jy
! Component: 2000  -  total flux cleaned = 0.00475837 Jy
! Total flux subtracted in 2048 components = 0.00475811 Jy
! Clean residual min=-0.003094 max=0.002892 Jy/beam
! Clean residual mean=0.000019 rms=0.001077 Jy/beam
! Combined flux in latest and established models = 2.36617 Jy
keep
! Adding 121 model components to the UV plane model.
! The established model now contains 331 components and 2.36617 Jy
![Exited script file: muppet]
wmap "J1517-2422_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.491 x 11.31 at -3.846 degrees (North through East)
! Clean map  min=-0.0067348  max=1.7086 Jy/beam
! Writing clean map to FITS file: J1517-2422_S_1999_12_20_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.70855 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00107296 
device "J1517-2422_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J1517-2422_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.188398 0.188398 0.376796 0.753591 1.50718 3.01437 6.02873 12.0575 24.1149 48.2298 96.4597
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0032 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.708 
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.491 x 11.31 at -3.846 degrees (North through East)
! Clean map  min=-0.0067348  max=1.7086 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1517-2422_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J1517-2422_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1517-2422_S_1999_12_20_pus_uvs.log closed on Thu Dec 20 15:21:15 2007