! Started logfile: J0457-2324_X_1999_12_20_pus_uvs.log on Fri Dec 14 17:12:27 2007
obs J0457-2324_X_1999_12_20_pus_uva.fits
! Reading UV FITS file: J0457-2324_X_1999_12_20_pus_uva.fits
! AN table 1: 90 integrations on 190 of 190 possible baselines.
! AN table 2: 90 integrations on 190 of 190 possible baselines.
! AN table 3: 11 integrations on 190 of 190 possible baselines.
! AN table 4: 97 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0689876 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0457-2324
! 
! 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 2418 lines of history.
! 
! Reading 15100 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 J0457-2324_X_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 = 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 1386 telescope corrections were flagged in sub-array 1.
!  A total of 1616 telescope corrections were flagged in sub-array 2.
!  A total of 220 telescope corrections were flagged in sub-array 3.
!  A total of 1572 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1386 telescope corrections were flagged in sub-array 1.
!  A total of 1616 telescope corrections were flagged in sub-array 2.
!  A total of 220 telescope corrections were flagged in sub-array 3.
!  A total of 1572 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1386 telescope corrections were flagged in sub-array 1.
!  A total of 1646 telescope corrections were flagged in sub-array 2.
!  A total of 220 telescope corrections were flagged in sub-array 3.
!  A total of 1572 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1386 telescope corrections were flagged in sub-array 1.
!  A total of 1616 telescope corrections were flagged in sub-array 2.
!  A total of 220 telescope corrections were flagged in sub-array 3.
!  A total of 1572 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.997646Jy  sigma=0.008368
! Fit after  self-cal, rms=0.305409Jy  sigma=0.002866
! 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 2.44% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.5926 mas, bmaj=1.508 mas, bpa=3.056 degrees
! Estimated noise=1116.35 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.694832 Jy
! Component: 100  -  total flux cleaned = 0.898883 Jy
! Total flux subtracted in 100 components = 0.898883 Jy
! Clean residual min=-0.039940 max=0.093928 Jy/beam
! Clean residual mean=0.000421 rms=0.012704 Jy/beam
! Combined flux in latest and established models = 0.898883 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 0.898883 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289534Jy  sigma=0.002732
! Fit after  self-cal, rms=0.289529Jy  sigma=0.002732
! Inverting map 
! Your choice of large map pixels excluded 2.44% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.109414 Jy
! Component: 100  -  total flux cleaned = 0.177284 Jy
! Total flux subtracted in 100 components = 0.177284 Jy
! Clean residual min=-0.035166 max=0.046592 Jy/beam
! Clean residual mean=0.000104 rms=0.009324 Jy/beam
! Combined flux in latest and established models = 1.07617 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 17 components and 1.07617 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231110Jy  sigma=0.001922
! Fit after  self-cal, rms=0.231039Jy  sigma=0.001922
! Inverting map 
! Your choice of large map pixels excluded 2.44% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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 2.44% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.771 mas, bmaj=2.209 mas, bpa=-0.8839 degrees
! Estimated noise=667.607 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.0584861 Jy
! Component: 100  -  total flux cleaned = 0.0864474 Jy
! Component: 150  -  total flux cleaned = 0.100266 Jy
! Component: 200  -  total flux cleaned = 0.106139 Jy
! Total flux subtracted in 200 components = 0.106139 Jy
! Clean residual min=-0.019843 max=0.021233 Jy/beam
! Clean residual mean=-0.000884 rms=0.004943 Jy/beam
! Combined flux in latest and established models = 1.18231 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 28 components and 1.18231 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.222694Jy  sigma=0.001697
! Fit after  self-cal, rms=0.222586Jy  sigma=0.001697
! Inverting map 
! Your choice of large map pixels excluded 2.44% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 66 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.99     GC        1.00*    HH        1.00*    
!   HN        1.06     KK        0.99     KP        1.00     LA        1.01     
!   MC        1.00*    MK        0.97     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        0.88     TS        2.42     
!   WF        1.00     WZ        1.00*    GN        0.96     NL        0.95     
! 
!  A total of 45 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.02     GC        1.00*    HH        1.00*    
!   HN        1.05     KK        1.00*    KP        1.02     LA        1.00     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        0.96     TS        1.00*    
!   WF        0.89     WZ        1.00*    GN        1.00*    NL        0.98     
! 
!  Telescope amplitude corrections in sub-array 3:
!   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*    
! 
!  A total of 42 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        0.99     GC        1.00*    HH        1.05     
!   HN        1.22     KK        0.93     KP        1.02     LA        1.02     
!   MC        1.00*    MK        0.94     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        1.09     TS        1.00*    
!   WF        1.02     WZ        1.00*    GN        1.08     NL        1.02     
! 
! 
! Correcting IF 2.
!  A total of 66 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.00     GC        1.00*    HH        1.00*    
!   HN        1.33     KK        0.98     KP        0.95     LA        1.01     
!   MC        1.00*    MK        0.97     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.96     SC        0.83     TS        2.69     
!   WF        1.27     WZ        1.00*    GN        0.96     NL        0.95     
! 
!  A total of 45 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.01     GC        1.00*    HH        1.00*    
!   HN        1.06     KK        1.00*    KP        0.96     LA        1.00     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        0.92     TS        1.00*    
!   WF        0.93     WZ        1.00*    GN        1.00*    NL        0.96     
! 
!  Telescope amplitude corrections in sub-array 3:
!   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*    
! 
!  A total of 42 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        0.99     GC        1.00*    HH        0.94     
!   HN        1.20     KK        0.93     KP        0.97     LA        1.02     
!   MC        1.00*    MK        0.93     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        1.03     TS        1.00*    
!   WF        1.05     WZ        1.00*    GN        1.06     NL        1.03     
! 
! 
! Correcting IF 3.
!  A total of 66 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.00     GC        1.00*    HH        1.00*    
!   HN        1.16     KK        0.99     KP        0.97     LA        1.01     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        0.98     PT        0.98     SC        0.84     TS        2.37     
!   WF        1.09     WZ        1.00*    GN        0.95     NL        0.95     
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.02     GC        1.00*    HH        1.00*    
!   HN        1.09     KK        1.00*    KP        0.99     LA        1.00     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        1.00     PT        0.98     SC        0.90     TS        1.00*    
!   WF        0.94     WZ        1.00*    GN        1.00*    NL        0.97     
! 
!  Telescope amplitude corrections in sub-array 3:
!   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*    
! 
!  A total of 42 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        1.00     GC        1.00*    HH        6.17     
!   HN        1.28     KK        0.93     KP        0.99     LA        1.02     
!   MC        1.00*    MK        0.94     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.98     SC        1.04     TS        1.00*    
!   WF        1.09     WZ        1.00*    GN        1.08     NL        1.02     
! 
! 
! Correcting IF 4.
!  A total of 66 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     GC        1.00*    HH        1.00*    
!   HN        1.09     KK        0.98     KP        0.97     LA        1.03     
!   MC        1.00*    MK        0.95     NY        1.00*    ON        1.00*    
!   OV        0.98     PT        0.97     SC        0.86     TS        3.07     
!   WF        0.98     WZ        1.00*    GN        0.94     NL        0.97     
! 
!  A total of 45 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.03     GC        1.00*    HH        1.00*    
!   HN        1.15     KK        1.00*    KP        0.98     LA        1.01     
!   MC        1.00*    MK        1.00*    NY        1.00*    ON        1.00*    
!   OV        0.98     PT        0.96     SC        0.91     TS        1.00*    
!   WF        0.90     WZ        1.00*    GN        1.00*    NL        0.99     
! 
!  Telescope amplitude corrections in sub-array 3:
!   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*    
! 
!  A total of 42 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.98     GC        1.00*    HH        1.15     
!   HN        1.33     KK        0.93     KP        0.98     LA        1.04     
!   MC        1.00*    MK        0.90     NY        1.00*    ON        1.00*    
!   OV        1.00     PT        0.98     SC        1.04     TS        1.00*    
!   WF        1.01     WZ        1.00*    GN        1.09     NL        1.05     
! 
! 
! Fit before self-cal, rms=0.222586Jy  sigma=0.001697
! Fit after  self-cal, rms=0.307183Jy  sigma=0.001277
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8016 mas, bmaj=2.303 mas, bpa=-1.931 degrees
! Estimated noise=678.025 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.0010498 Jy
! Component: 100  -  total flux cleaned = -0.00126683 Jy
! Component: 150  -  total flux cleaned = -0.00147138 Jy
! Component: 200  -  total flux cleaned = -0.00147458 Jy
! Total flux subtracted in 200 components = -0.00147458 Jy
! Clean residual min=-0.007697 max=0.005734 Jy/beam
! Clean residual mean=-0.000112 rms=0.001775 Jy/beam
! Combined flux in latest and established models = 1.18083 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 32 components and 1.18083 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.306926Jy  sigma=0.001273
! Fit after  self-cal, rms=0.307323Jy  sigma=0.001272
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.307323Jy  sigma=0.001272
! Fit after  self-cal, rms=0.304854Jy  sigma=0.001248
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8049 mas, bmaj=2.305 mas, bpa=-1.87 degrees
! Estimated noise=679.089 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00222204 Jy
! Component: 100  -  total flux cleaned = -0.00239595 Jy
! Component: 150  -  total flux cleaned = -0.00272884 Jy
! Component: 200  -  total flux cleaned = -0.00287496 Jy
! Total flux subtracted in 200 components = -0.00287496 Jy
! Clean residual min=-0.006248 max=0.005575 Jy/beam
! Clean residual mean=0.000535 rms=0.001431 Jy/beam
! Combined flux in latest and established models = 1.17796 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 32 components and 1.17796 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304687Jy  sigma=0.001245
! Fit after  self-cal, rms=0.304650Jy  sigma=0.001245
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.000276872 Jy
! Component: 100  -  total flux cleaned = -0.000409104 Jy
! Component: 150  -  total flux cleaned = -0.00053052 Jy
! Component: 200  -  total flux cleaned = -0.000752923 Jy
! Total flux subtracted in 200 components = -0.000752923 Jy
! Clean residual min=-0.006241 max=0.005341 Jy/beam
! Clean residual mean=0.000555 rms=0.001390 Jy/beam
! Combined flux in latest and established models = 1.1772 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 32 components and 1.1772 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304571Jy  sigma=0.001244
! Fit after  self-cal, rms=0.304562Jy  sigma=0.001244
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.304562Jy  sigma=0.001244
! Fit after  self-cal, rms=0.304618Jy  sigma=0.001243
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8069 mas, bmaj=2.306 mas, bpa=-1.832 degrees
! Estimated noise=679.454 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00144917 Jy
! Component: 100  -  total flux cleaned = -0.00170205 Jy
! Component: 150  -  total flux cleaned = -0.0018218 Jy
! Component: 200  -  total flux cleaned = -0.00203352 Jy
! Total flux subtracted in 200 components = -0.00203352 Jy
! Clean residual min=-0.005475 max=0.005479 Jy/beam
! Clean residual mean=0.000566 rms=0.001321 Jy/beam
! Combined flux in latest and established models = 1.17517 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 32 components and 1.17517 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304553Jy  sigma=0.001242
! Fit after  self-cal, rms=0.304551Jy  sigma=0.001242
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.000194982 Jy
! Component: 100  -  total flux cleaned = -0.000287501 Jy
! Component: 150  -  total flux cleaned = -0.000370944 Jy
! Component: 200  -  total flux cleaned = -0.000452517 Jy
! Total flux subtracted in 200 components = -0.000452517 Jy
! Clean residual min=-0.005510 max=0.005315 Jy/beam
! Clean residual mean=0.000579 rms=0.001300 Jy/beam
! Combined flux in latest and established models = 1.17472 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 32 components and 1.17472 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304523Jy  sigma=0.001241
! Fit after  self-cal, rms=0.304520Jy  sigma=0.001241
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.304520Jy  sigma=0.001241
! Fit after  self-cal, rms=0.304298Jy  sigma=0.001241
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=2.146 mas, bmaj=4.838 mas, bpa=3.384 degrees
! Estimated noise=843.638 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0026375 Jy
! Component: 100  -  total flux cleaned = -0.00263147 Jy
! Component: 150  -  total flux cleaned = -0.00263408 Jy
! Component: 200  -  total flux cleaned = -0.0026685 Jy
! Total flux subtracted in 200 components = -0.0026685 Jy
! Clean residual min=-0.003781 max=0.005956 Jy/beam
! Clean residual mean=0.001372 rms=0.001407 Jy/beam
! Combined flux in latest and established models = 1.17205 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 38 components and 1.17205 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304314Jy  sigma=0.001241
! Fit after  self-cal, rms=0.304314Jy  sigma=0.001240
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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 = 8.37965e-05 Jy
! Component: 100  -  total flux cleaned = 2.81302e-05 Jy
! Component: 150  -  total flux cleaned = 2.46895e-05 Jy
! Component: 200  -  total flux cleaned = -8.43185e-06 Jy
! Total flux subtracted in 200 components = -8.43185e-06 Jy
! Clean residual min=-0.003795 max=0.005964 Jy/beam
! Clean residual mean=0.001372 rms=0.001405 Jy/beam
! Combined flux in latest and established models = 1.17204 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 38 components and 1.17204 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304325Jy  sigma=0.001240
! Fit after  self-cal, rms=0.304319Jy  sigma=0.001240
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Added new window around map position (-3, -4.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00314137 Jy
! Component: 100  -  total flux cleaned = 0.00456977 Jy
! Component: 150  -  total flux cleaned = 0.00492955 Jy
! Component: 200  -  total flux cleaned = 0.00513812 Jy
! Total flux subtracted in 200 components = 0.00513812 Jy
! Clean residual min=-0.001756 max=0.004931 Jy/beam
! Clean residual mean=0.001079 rms=0.001125 Jy/beam
! Combined flux in latest and established models = 1.17718 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 65 components and 1.17718 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304155Jy  sigma=0.001238
! Fit after  self-cal, rms=0.304139Jy  sigma=0.001238
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Added new window around map position (-11.6, -6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00482897 Jy
! Component: 100  -  total flux cleaned = 0.00665351 Jy
! Component: 150  -  total flux cleaned = 0.00761634 Jy
! Component: 200  -  total flux cleaned = 0.00828382 Jy
! Total flux subtracted in 200 components = 0.00828382 Jy
! Clean residual min=-0.002152 max=0.003265 Jy/beam
! Clean residual mean=0.000819 rms=0.000971 Jy/beam
! Combined flux in latest and established models = 1.18546 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 86 components and 1.18546 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.304049Jy  sigma=0.001237
! Fit after  self-cal, rms=0.304038Jy  sigma=0.001237
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8083 mas, bmaj=2.307 mas, bpa=-1.806 degrees
! Estimated noise=679.858 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8083 x 2.307 at -1.806 degrees (North through East)
! Clean map  min=-0.0051618  max=0.98338 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.304038Jy  sigma=0.001237
! Fit after  self-cal, rms=0.356176Jy  sigma=0.001144
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8088 mas, bmaj=2.305 mas, bpa=-1.723 degrees
! Estimated noise=678.937 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000200308 Jy
! Component: 100  -  total flux cleaned = 0.000873829 Jy
! Component: 150  -  total flux cleaned = 0.00118971 Jy
! Component: 200  -  total flux cleaned = 0.00133801 Jy
! Total flux subtracted in 200 components = 0.00133801 Jy
! Clean residual min=-0.003830 max=0.004519 Jy/beam
! Clean residual mean=0.000368 rms=0.000974 Jy/beam
! Combined flux in latest and established models = 1.1868 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 115 components and 1.1868 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.355947Jy  sigma=0.001141
! Fit after  self-cal, rms=0.355936Jy  sigma=0.001141
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Added new window around map position (3, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00129087 Jy
! Component: 100  -  total flux cleaned = 0.00186126 Jy
! Component: 150  -  total flux cleaned = 0.00187019 Jy
! Component: 200  -  total flux cleaned = 0.00212494 Jy
! Total flux subtracted in 200 components = 0.00212494 Jy
! Clean residual min=-0.003629 max=0.003438 Jy/beam
! Clean residual mean=0.000321 rms=0.000903 Jy/beam
! Combined flux in latest and established models = 1.18893 Jy
! Performing phase self-cal
! Adding 43 model components to the UV plane model.
! The established model now contains 135 components and 1.18893 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.355767Jy  sigma=0.001139
! Fit after  self-cal, rms=0.355767Jy  sigma=0.001139
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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.355767Jy  sigma=0.001139
! Fit after  self-cal, rms=0.352341Jy  sigma=0.001138
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 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.6317 mas, bmaj=1.645 mas, bpa=1.07 degrees
! Estimated noise=1147.98 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.724151 Jy
! Component: 100  -  total flux cleaned = 0.910395 Jy
! Component: 150  -  total flux cleaned = 1.00399 Jy
! Component: 200  -  total flux cleaned = 1.06082 Jy
! Total flux subtracted in 200 components = 1.06082 Jy
! Clean residual min=-0.010393 max=0.029533 Jy/beam
! Clean residual mean=0.000298 rms=0.003641 Jy/beam
! Combined flux in latest and established models = 1.06083 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 23 model components to the UV plane model.
! The established model now contains 23 components and 1.06083 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8092 mas, bmaj=2.306 mas, bpa=-1.719 degrees
! Estimated noise=678.921 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.0553964 Jy
! Component: 100  -  total flux cleaned = 0.0816723 Jy
! Component: 150  -  total flux cleaned = 0.0959117 Jy
! Component: 200  -  total flux cleaned = 0.105055 Jy
! Total flux subtracted in 200 components = 0.105055 Jy
! Clean residual min=-0.004396 max=0.005735 Jy/beam
! Clean residual mean=0.000843 rms=0.001362 Jy/beam
! Combined flux in latest and established models = 1.16588 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 56 components and 1.16588 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 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 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=2.145 mas, bmaj=4.835 mas, bpa=3.405 degrees
! Estimated noise=842.083 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00828699 Jy
! Component: 100  -  total flux cleaned = 0.0137883 Jy
! Component: 150  -  total flux cleaned = 0.0178336 Jy
! Component: 200  -  total flux cleaned = 0.0199301 Jy
! Total flux subtracted in 200 components = 0.0199301 Jy
! Clean residual min=-0.002187 max=0.003543 Jy/beam
! Clean residual mean=0.000923 rms=0.000975 Jy/beam
! Combined flux in latest and established models = 1.18581 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.00135966 Jy
! Component: 100  -  total flux cleaned = 0.00246174 Jy
! Component: 150  -  total flux cleaned = 0.00335681 Jy
! Component: 200  -  total flux cleaned = 0.00407837 Jy
! Total flux subtracted in 200 components = 0.00407837 Jy
! Clean residual min=-0.002159 max=0.003243 Jy/beam
! Clean residual mean=0.000750 rms=0.000882 Jy/beam
! Combined flux in latest and established models = 1.18989 Jy
! Adding 55 model components to the UV plane model.
! The established model now contains 109 components and 1.18989 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! Estimated beam: bmin=0.8092 mas, bmaj=2.306 mas, bpa=-1.719 degrees
! Estimated noise=678.921 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000838584 Jy
! Component: 100  -  total flux cleaned = 0.00101505 Jy
! Component: 150  -  total flux cleaned = 0.000703264 Jy
! Component: 200  -  total flux cleaned = 0.000854031 Jy
! Total flux subtracted in 200 components = 0.000854031 Jy
! Clean residual min=-0.004022 max=0.004077 Jy/beam
! Clean residual mean=0.000318 rms=0.000998 Jy/beam
! Combined flux in latest and established models = 1.19074 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 137 components and 1.19074 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353063Jy  sigma=0.001145
! Fit after  self-cal, rms=0.353099Jy  sigma=0.001145
wmodel J0457-2324_X_1999_12_20_pus_map.mod
! Writing 137 model components to file: J0457-2324_X_1999_12_20_pus_map.mod
wobs J0457-2324_X_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J0457-2324_X_1999_12_20_pus_uvs.fits
wwins J0457-2324_X_1999_12_20_pus_map.win
! wwins: Wrote 4 windows to J0457-2324_X_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 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000754009 Jy
! Component: 100  -  total flux cleaned = 0.00165161 Jy
! Component: 150  -  total flux cleaned = 0.00249862 Jy
! Component: 200  -  total flux cleaned = 0.00318824 Jy
! Component: 250  -  total flux cleaned = 0.00384971 Jy
! Component: 300  -  total flux cleaned = 0.00454054 Jy
! Component: 350  -  total flux cleaned = 0.00531361 Jy
! Component: 400  -  total flux cleaned = 0.00586423 Jy
! Component: 450  -  total flux cleaned = 0.00625511 Jy
! Component: 500  -  total flux cleaned = 0.00682763 Jy
! Component: 550  -  total flux cleaned = 0.00729464 Jy
! Component: 600  -  total flux cleaned = 0.00770779 Jy
! Component: 650  -  total flux cleaned = 0.00811471 Jy
! Component: 700  -  total flux cleaned = 0.00833674 Jy
! Component: 750  -  total flux cleaned = 0.00864432 Jy
! Component: 800  -  total flux cleaned = 0.00899087 Jy
! Component: 850  -  total flux cleaned = 0.0092904 Jy
! Component: 900  -  total flux cleaned = 0.00954393 Jy
! Component: 950  -  total flux cleaned = 0.00979477 Jy
! Component: 1000  -  total flux cleaned = 0.0100018 Jy
! Total flux subtracted in 1024 components = 0.0100838 Jy
! Clean residual min=-0.002770 max=0.002380 Jy/beam
! Clean residual mean=0.000148 rms=0.000829 Jy/beam
! Combined flux in latest and established models = 1.20083 Jy
keep
! Adding 63 model components to the UV plane model.
! The established model now contains 186 components and 1.20083 Jy
![Exited script file: muppet]
wmap "J0457-2324_X_1999_12_20_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8092 x 2.306 at -1.719 degrees (North through East)
! Clean map  min=-0.003454  max=0.98477 Jy/beam
! Writing clean map to FITS file: J0457-2324_X_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 0.984767 
invert
! Inverting map 
! Your choice of large map pixels excluded 2.54% of the data.
!  The x-axis pixel size should ideally be below 0.1644 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000828583 
device "J0457-2324_X_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J0457-2324_X_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.25242 0.25242 0.50484 1.00968 2.01936 4.03872 8.07744 16.1549 32.3098 64.6195
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0024 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.984 
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.8092 x 2.306 at -1.719 degrees (North through East)
! Clean map  min=-0.003454  max=0.98477 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0457-2324_X_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J0457-2324_X_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0457-2324_X_1999_12_20_pus_uvs.log closed on Fri Dec 14 17:12:36 2007