! Started logfile: J1147-3812_X_1999_12_20_pus_uvs.log on Mon Dec 17 12:38:10 2007
obs J1147-3812_X_1999_12_20_pus_uva.fits
! Reading UV FITS file: J1147-3812_X_1999_12_20_pus_uva.fits
! AN table 1: 23 integrations on 190 of 190 possible baselines.
! AN table 2: 70 integrations on 190 of 190 possible baselines.
! AN table 3: 10 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0602453 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1147-3812
! 
! 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 2422 lines of history.
! 
! Reading 4716 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 J1147-3812_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 388 telescope corrections were flagged in sub-array 1.
!  A total of 1090 telescope corrections were flagged in sub-array 2.
!  A total of 200 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 389 telescope corrections were flagged in sub-array 1.
!  A total of 1090 telescope corrections were flagged in sub-array 2.
!  A total of 200 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 389 telescope corrections were flagged in sub-array 1.
!  A total of 1090 telescope corrections were flagged in sub-array 2.
!  A total of 200 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 389 telescope corrections were flagged in sub-array 1.
!  A total of 1090 telescope corrections were flagged in sub-array 2.
!  A total of 200 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.853212Jy  sigma=0.021675
! Fit after  self-cal, rms=0.603673Jy  sigma=0.007420
! 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.3% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.6083 mas, bmaj=1.931 mas, bpa=-4.488 degrees
! Estimated noise=1380.47 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.20534 Jy
! Component: 100  -  total flux cleaned = 1.47385 Jy
! Total flux subtracted in 100 components = 1.47385 Jy
! Clean residual min=-0.064470 max=0.138150 Jy/beam
! Clean residual mean=0.004802 rms=0.024564 Jy/beam
! Combined flux in latest and established models = 1.47385 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.47385 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.294975Jy  sigma=0.003183
! Fit after  self-cal, rms=0.294970Jy  sigma=0.003183
! Inverting map 
! Your choice of large map pixels excluded 1.3% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.3% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7632 mas, bmaj=2.187 mas, bpa=-8.796 degrees
! Estimated noise=921.617 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.119241 Jy
! Component: 100  -  total flux cleaned = 0.17275 Jy
! Component: 150  -  total flux cleaned = 0.197233 Jy
! Component: 200  -  total flux cleaned = 0.208157 Jy
! Total flux subtracted in 200 components = 0.208157 Jy
! Clean residual min=-0.048615 max=0.095342 Jy/beam
! Clean residual mean=0.000908 rms=0.020550 Jy/beam
! Combined flux in latest and established models = 1.682 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 26 components and 1.682 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.254321Jy  sigma=0.002524
! Fit after  self-cal, rms=0.254285Jy  sigma=0.002523
! Inverting map 
! Your choice of large map pixels excluded 1.3% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.91     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.35     KP        0.94     LA        0.94     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        0.96     PT        0.97     SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        0.96     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.37     KP        1.00     LA        1.02     
!   MC        1.00*    MK        0.93     NY        1.00*    ON        1.00*    
!   OV        1.04     PT        0.95     SC        1.08     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.24     
! 
!  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*    
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.92     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        0.89     LA        0.94     
!   MC        1.00*    MK        0.98     NY        1.00*    ON        1.00*    
!   OV        0.98     PT        0.96     SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        0.96     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.40     KP        0.96     LA        1.02     
!   MC        1.00*    MK        0.93     NY        1.00*    ON        1.00*    
!   OV        1.03     PT        0.94     SC        1.02     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.24     
! 
!  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*    
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.93     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        0.92     LA        0.94     
!   MC        1.00*    MK        0.97     NY        1.00*    ON        1.00*    
!   OV        0.99     PT        0.97     SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        0.97     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.49     KP        0.98     LA        1.02     
!   MC        1.00*    MK        0.93     NY        1.00*    ON        1.00*    
!   OV        1.04     PT        0.96     SC        1.05     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.24     
! 
!  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*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        0.91     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.00*    KP        0.91     LA        0.95     
!   MC        1.00*    MK        0.95     NY        1.00*    ON        1.00*    
!   OV        0.94     PT        0.96     SC        1.00*    TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        0.96     GC        1.00*    HH        1.00*    
!   HN        1.00*    KK        1.44     KP        0.97     LA        1.04     
!   MC        1.00*    MK        0.90     NY        1.00*    ON        1.00*    
!   OV        1.04     PT        0.96     SC        1.03     TS        1.00*    
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.24     
! 
!  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*    
! 
! 
! Fit before self-cal, rms=0.254285Jy  sigma=0.002523
! Fit after  self-cal, rms=0.151440Jy  sigma=0.001259
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7781 mas, bmaj=2.304 mas, bpa=-10.8 degrees
! Estimated noise=940.176 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 (1.8, -5.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0118065 Jy
! Component: 100  -  total flux cleaned = 0.0110205 Jy
! Component: 150  -  total flux cleaned = 0.011024 Jy
! Component: 200  -  total flux cleaned = 0.0110134 Jy
! Total flux subtracted in 200 components = 0.0110134 Jy
! Clean residual min=-0.010131 max=0.010348 Jy/beam
! Clean residual mean=0.000714 rms=0.002523 Jy/beam
! Combined flux in latest and established models = 1.69302 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 39 components and 1.69302 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.148092Jy  sigma=0.001231
! Fit after  self-cal, rms=0.148206Jy  sigma=0.001228
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.148206Jy  sigma=0.001228
! Fit after  self-cal, rms=0.147730Jy  sigma=0.001226
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7772 mas, bmaj=2.304 mas, bpa=-10.84 degrees
! Estimated noise=939.984 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00539909 Jy
! Component: 100  -  total flux cleaned = 0.00589314 Jy
! Component: 150  -  total flux cleaned = 0.0063348 Jy
! Component: 200  -  total flux cleaned = 0.00653942 Jy
! Total flux subtracted in 200 components = 0.00653942 Jy
! Clean residual min=-0.008584 max=0.009001 Jy/beam
! Clean residual mean=0.000619 rms=0.002167 Jy/beam
! Combined flux in latest and established models = 1.69956 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 48 components and 1.69956 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.146144Jy  sigma=0.001216
! Fit after  self-cal, rms=0.146117Jy  sigma=0.001215
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.00163825 Jy
! Component: 100  -  total flux cleaned = 0.00181608 Jy
! Component: 150  -  total flux cleaned = 0.00197924 Jy
! Component: 200  -  total flux cleaned = 0.00227698 Jy
! Total flux subtracted in 200 components = 0.00227698 Jy
! Clean residual min=-0.008241 max=0.008377 Jy/beam
! Clean residual mean=0.000571 rms=0.002012 Jy/beam
! Combined flux in latest and established models = 1.70183 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 53 components and 1.70183 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.145354Jy  sigma=0.001211
! Fit after  self-cal, rms=0.145352Jy  sigma=0.001211
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.145352Jy  sigma=0.001211
! Fit after  self-cal, rms=0.144824Jy  sigma=0.001209
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7763 mas, bmaj=2.304 mas, bpa=-10.87 degrees
! Estimated noise=939.825 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00420824 Jy
! Component: 100  -  total flux cleaned = 0.00436734 Jy
! Component: 150  -  total flux cleaned = 0.0046555 Jy
! Component: 200  -  total flux cleaned = 0.00491255 Jy
! Total flux subtracted in 200 components = 0.00491255 Jy
! Clean residual min=-0.006873 max=0.007696 Jy/beam
! Clean residual mean=0.000497 rms=0.001868 Jy/beam
! Combined flux in latest and established models = 1.70675 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 60 components and 1.70675 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.144117Jy  sigma=0.001206
! Fit after  self-cal, rms=0.144102Jy  sigma=0.001206
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.00056626 Jy
! Component: 100  -  total flux cleaned = 0.000799375 Jy
! Component: 150  -  total flux cleaned = 0.00101114 Jy
! Component: 200  -  total flux cleaned = 0.00111286 Jy
! Total flux subtracted in 200 components = 0.00111286 Jy
! Clean residual min=-0.006539 max=0.007223 Jy/beam
! Clean residual mean=0.000474 rms=0.001795 Jy/beam
! Combined flux in latest and established models = 1.70786 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 64 components and 1.70786 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.143740Jy  sigma=0.001204
! Fit after  self-cal, rms=0.143734Jy  sigma=0.001204
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.143734Jy  sigma=0.001204
! Fit after  self-cal, rms=0.143369Jy  sigma=0.001203
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=2.694 mas, bmaj=8.824 mas, bpa=-2.599 degrees
! Estimated noise=1189.58 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00311323 Jy
! Component: 100  -  total flux cleaned = 0.00372093 Jy
! Component: 150  -  total flux cleaned = 0.00372313 Jy
! Component: 200  -  total flux cleaned = 0.00368562 Jy
! Total flux subtracted in 200 components = 0.00368562 Jy
! Clean residual min=-0.003221 max=0.004756 Jy/beam
! Clean residual mean=0.000906 rms=0.001630 Jy/beam
! Combined flux in latest and established models = 1.71154 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 74 components and 1.71154 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.143248Jy  sigma=0.001203
! Fit after  self-cal, rms=0.143257Jy  sigma=0.001203
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.000374413 Jy
! Component: 100  -  total flux cleaned = 0.000416553 Jy
! Component: 150  -  total flux cleaned = 0.000416505 Jy
! Component: 200  -  total flux cleaned = 0.000375832 Jy
! Total flux subtracted in 200 components = 0.000375832 Jy
! Clean residual min=-0.003059 max=0.004716 Jy/beam
! Clean residual mean=0.000892 rms=0.001612 Jy/beam
! Combined flux in latest and established models = 1.71192 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 77 components and 1.71192 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.143159Jy  sigma=0.001202
! Fit after  self-cal, rms=0.143164Jy  sigma=0.001202
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7754 mas, bmaj=2.304 mas, bpa=-10.91 degrees
! Estimated noise=939.907 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7754 x 2.304 at -10.91 degrees (North through East)
! Clean map  min=-0.010111  max=1.5457 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.143164Jy  sigma=0.001202
! Fit after  self-cal, rms=0.133360Jy  sigma=0.001078
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7753 mas, bmaj=2.304 mas, bpa=-10.93 degrees
! Estimated noise=940.695 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00309791 Jy
! Component: 100  -  total flux cleaned = 0.00298394 Jy
! Component: 150  -  total flux cleaned = 0.00298492 Jy
! Component: 200  -  total flux cleaned = 0.00289041 Jy
! Total flux subtracted in 200 components = 0.00289041 Jy
! Clean residual min=-0.005459 max=0.006681 Jy/beam
! Clean residual mean=0.000323 rms=0.001655 Jy/beam
! Combined flux in latest and established models = 1.71481 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 79 components and 1.71481 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.132972Jy  sigma=0.001076
! Fit after  self-cal, rms=0.132960Jy  sigma=0.001076
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -9.27571e-05 Jy
! Component: 100  -  total flux cleaned = -9.28643e-05 Jy
! Component: 150  -  total flux cleaned = -0.000175734 Jy
! Component: 200  -  total flux cleaned = -0.000177187 Jy
! Total flux subtracted in 200 components = -0.000177187 Jy
! Clean residual min=-0.005136 max=0.006447 Jy/beam
! Clean residual mean=0.000328 rms=0.001598 Jy/beam
! Combined flux in latest and established models = 1.71463 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 80 components and 1.71463 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.132766Jy  sigma=0.001075
! Fit after  self-cal, rms=0.132759Jy  sigma=0.001075
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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.132759Jy  sigma=0.001075
! Fit after  self-cal, rms=0.132538Jy  sigma=0.001074
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 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.6362 mas, bmaj=2.195 mas, bpa=-9.073 degrees
! Estimated noise=1353.25 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.19492 Jy
! Component: 100  -  total flux cleaned = 1.461 Jy
! Component: 150  -  total flux cleaned = 1.56331 Jy
! Component: 200  -  total flux cleaned = 1.6201 Jy
! Total flux subtracted in 200 components = 1.6201 Jy
! Clean residual min=-0.017905 max=0.028304 Jy/beam
! Clean residual mean=0.001553 rms=0.006563 Jy/beam
! Combined flux in latest and established models = 1.6201 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 19 model components to the UV plane model.
! The established model now contains 19 components and 1.6201 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7746 mas, bmaj=2.303 mas, bpa=-10.96 degrees
! Estimated noise=940.885 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.0452583 Jy
! Component: 100  -  total flux cleaned = 0.0683103 Jy
! Component: 150  -  total flux cleaned = 0.0809057 Jy
! Component: 200  -  total flux cleaned = 0.0882006 Jy
! Total flux subtracted in 200 components = 0.0882006 Jy
! Clean residual min=-0.005510 max=0.007022 Jy/beam
! Clean residual mean=0.000504 rms=0.001846 Jy/beam
! Combined flux in latest and established models = 1.7083 Jy
! Adding 29 model components to the UV plane model.
! The established model now contains 41 components and 1.7083 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 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 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=2.692 mas, bmaj=8.813 mas, bpa=-2.622 degrees
! Estimated noise=1192.56 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00517725 Jy
! Component: 100  -  total flux cleaned = 0.00732306 Jy
! Component: 150  -  total flux cleaned = 0.00758916 Jy
! Component: 200  -  total flux cleaned = 0.00783075 Jy
! Total flux subtracted in 200 components = 0.00783075 Jy
! Clean residual min=-0.004030 max=0.003810 Jy/beam
! Clean residual mean=0.000684 rms=0.001643 Jy/beam
! Combined flux in latest and established models = 1.71613 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.000170745 Jy
! Component: 100  -  total flux cleaned = 0.000329399 Jy
! Component: 150  -  total flux cleaned = 0.000523668 Jy
! Component: 200  -  total flux cleaned = 0.000658844 Jy
! Total flux subtracted in 200 components = 0.000658844 Jy
! Clean residual min=-0.003963 max=0.003821 Jy/beam
! Clean residual mean=0.000647 rms=0.001604 Jy/beam
! Combined flux in latest and established models = 1.71679 Jy
! Adding 12 model components to the UV plane model.
! The established model now contains 50 components and 1.71679 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! Estimated beam: bmin=0.7746 mas, bmaj=2.303 mas, bpa=-10.96 degrees
! Estimated noise=940.885 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 6.38108e-05 Jy
! Component: 100  -  total flux cleaned = 0.00045848 Jy
! Component: 150  -  total flux cleaned = 0.000801679 Jy
! Component: 200  -  total flux cleaned = 0.000903065 Jy
! Total flux subtracted in 200 components = 0.000903065 Jy
! Clean residual min=-0.005875 max=0.005764 Jy/beam
! Clean residual mean=0.000288 rms=0.001525 Jy/beam
! Combined flux in latest and established models = 1.7177 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 66 components and 1.7177 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.132299Jy  sigma=0.001075
! Fit after  self-cal, rms=0.132258Jy  sigma=0.001074
wmodel J1147-3812_X_1999_12_20_pus_map.mod
! Writing 66 model components to file: J1147-3812_X_1999_12_20_pus_map.mod
wobs J1147-3812_X_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J1147-3812_X_1999_12_20_pus_uvs.fits
wwins J1147-3812_X_1999_12_20_pus_map.win
! wwins: Wrote 2 windows to J1147-3812_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 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.000521083 Jy
! Component: 100  -  total flux cleaned = 0.000364915 Jy
! Component: 150  -  total flux cleaned = 0.00153583 Jy
! Component: 200  -  total flux cleaned = 0.00275112 Jy
! Component: 250  -  total flux cleaned = 0.00341926 Jy
! Component: 300  -  total flux cleaned = 0.00386229 Jy
! Component: 350  -  total flux cleaned = 0.00428199 Jy
! Component: 400  -  total flux cleaned = 0.00462403 Jy
! Component: 450  -  total flux cleaned = 0.00489877 Jy
! Component: 500  -  total flux cleaned = 0.00521785 Jy
! Component: 550  -  total flux cleaned = 0.00547379 Jy
! Component: 600  -  total flux cleaned = 0.00567165 Jy
! Component: 650  -  total flux cleaned = 0.00586313 Jy
! Component: 700  -  total flux cleaned = 0.00604987 Jy
! Component: 750  -  total flux cleaned = 0.00623196 Jy
! Component: 800  -  total flux cleaned = 0.00636506 Jy
! Component: 850  -  total flux cleaned = 0.00645118 Jy
! Component: 900  -  total flux cleaned = 0.00649285 Jy
! Component: 950  -  total flux cleaned = 0.00653313 Jy
! Component: 1000  -  total flux cleaned = 0.00653337 Jy
! Total flux subtracted in 1024 components = 0.00661163 Jy
! Clean residual min=-0.002157 max=0.002269 Jy/beam
! Clean residual mean=0.000174 rms=0.000822 Jy/beam
! Combined flux in latest and established models = 1.72431 Jy
keep
! Adding 51 model components to the UV plane model.
! The established model now contains 117 components and 1.72431 Jy
![Exited script file: muppet]
wmap "J1147-3812_X_1999_12_20_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7746 x 2.303 at -10.96 degrees (North through East)
! Clean map  min=-0.0039419  max=1.5492 Jy/beam
! Writing clean map to FITS file: J1147-3812_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 1.54921 
invert
! Inverting map 
! Your choice of large map pixels excluded 1.34% of the data.
!  The x-axis pixel size should ideally be below 0.1954 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000813232 
device "J1147-3812_X_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J1147-3812_X_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.15748 0.15748 0.314959 0.629919 1.25984 2.51967 5.03935 10.0787 20.1574 40.3148 80.6296
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0024 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.549 
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.7746 x 2.303 at -10.96 degrees (North through East)
! Clean map  min=-0.0039419  max=1.5492 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1147-3812_X_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J1147-3812_X_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1147-3812_X_1999_12_20_pus_uvs.log closed on Mon Dec 17 12:38:13 2007