! Started logfile: J1640+3946_X_1999_12_20_pus_uvs.log on Fri Dec 14 17:25:54 2007
obs J1640+3946_X_1999_12_20_pus_uva.fits
! Reading UV FITS file: J1640+3946_X_1999_12_20_pus_uva.fits
! AN table 1: 284 integrations on 190 of 190 possible baselines.
! AN table 2: 224 integrations on 190 of 190 possible baselines.
! AN table 3: 345 integrations on 190 of 190 possible baselines.
! AN table 4: 130 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.146239 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1640+3946
! 
! 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 109252 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 J1640+3946_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 3822 telescope corrections were flagged in sub-array 1.
!  A total of 3551 telescope corrections were flagged in sub-array 2.
!  A total of 4407 telescope corrections were flagged in sub-array 3.
!  A total of 1628 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 3821 telescope corrections were flagged in sub-array 1.
!  A total of 3551 telescope corrections were flagged in sub-array 2.
!  A total of 4407 telescope corrections were flagged in sub-array 3.
!  A total of 1628 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 3822 telescope corrections were flagged in sub-array 1.
!  A total of 3551 telescope corrections were flagged in sub-array 2.
!  A total of 4407 telescope corrections were flagged in sub-array 3.
!  A total of 1628 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 3822 telescope corrections were flagged in sub-array 1.
!  A total of 3551 telescope corrections were flagged in sub-array 2.
!  A total of 4406 telescope corrections were flagged in sub-array 3.
!  A total of 1628 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.821854Jy  sigma=0.007202
! Fit after  self-cal, rms=0.496535Jy  sigma=0.004093
! 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.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.5638 mas, bmaj=0.7415 mas, bpa=-3.943 degrees
! Estimated noise=640.774 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.397676 Jy
! Component: 100  -  total flux cleaned = 0.509179 Jy
! Total flux subtracted in 100 components = 0.509179 Jy
! Clean residual min=-0.012126 max=0.052690 Jy/beam
! Clean residual mean=0.000366 rms=0.004075 Jy/beam
! Combined flux in latest and established models = 0.509179 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 0.509179 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.268828Jy  sigma=0.002021
! Fit after  self-cal, rms=0.268703Jy  sigma=0.002021
! Inverting map 
! Your choice of large map pixels excluded 2.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0647318 Jy
! Component: 100  -  total flux cleaned = 0.108633 Jy
! Total flux subtracted in 100 components = 0.108633 Jy
! Clean residual min=-0.008401 max=0.024275 Jy/beam
! Clean residual mean=0.000174 rms=0.002568 Jy/beam
! Combined flux in latest and established models = 0.617812 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 18 components and 0.617812 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.239235Jy  sigma=0.001513
! Fit after  self-cal, rms=0.239124Jy  sigma=0.001512
! Inverting map 
! Your choice of large map pixels excluded 2.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0312149 Jy
! Component: 100  -  total flux cleaned = 0.0533649 Jy
! Total flux subtracted in 100 components = 0.0533649 Jy
! Clean residual min=-0.007236 max=0.012376 Jy/beam
! Clean residual mean=0.000080 rms=0.002039 Jy/beam
! Combined flux in latest and established models = 0.671177 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 21 components and 0.671177 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.231982Jy  sigma=0.001363
! Fit after  self-cal, rms=0.231943Jy  sigma=0.001363
! Inverting map 
! Your choice of large map pixels excluded 2.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0161632 Jy
! Component: 100  -  total flux cleaned = 0.0278136 Jy
! Total flux subtracted in 100 components = 0.0278136 Jy
! Clean residual min=-0.007173 max=0.009136 Jy/beam
! Clean residual mean=0.000031 rms=0.001863 Jy/beam
! Combined flux in latest and established models = 0.698991 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 23 components and 0.698991 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.230151Jy  sigma=0.001320
! Fit after  self-cal, rms=0.230150Jy  sigma=0.001320
! Inverting map 
! Your choice of large map pixels excluded 2.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8629 mas, bmaj=0.9685 mas, bpa=4.509 degrees
! Estimated noise=236.99 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.0147068 Jy
! Component: 100  -  total flux cleaned = 0.0211597 Jy
! Component: 150  -  total flux cleaned = 0.0242635 Jy
! Component: 200  -  total flux cleaned = 0.0257159 Jy
! Total flux subtracted in 200 components = 0.0257159 Jy
! Clean residual min=-0.005225 max=0.005567 Jy/beam
! Clean residual mean=-0.000085 rms=0.001494 Jy/beam
! Combined flux in latest and established models = 0.724706 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 24 components and 0.724706 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.229347Jy  sigma=0.001304
! Fit after  self-cal, rms=0.229329Jy  sigma=0.001304
! Inverting map 
! Your choice of large map pixels excluded 2.76% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.00*    GC        0.98     HH        1.00*    
!   HN        0.99     KK        0.96     KP        1.00     LA        0.98     
!   MC        1.10     MK        0.98     NY        0.96     ON        1.00*    
!   OV        0.99     PT        1.02     SC        1.03     TS        1.14     
!   WF        1.00*    WZ        1.00*    GN        0.80     NL        1.00*    
! 
!  A total of 297 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.96     GC        1.01     HH        1.00*    
!   HN        1.10     KK        0.94     KP        0.99     LA        0.98     
!   MC        1.00*    MK        0.96     NY        1.03     ON        1.09     
!   OV        0.99     PT        1.00     SC        1.20     TS        1.08     
!   WF        1.02     WZ        1.00*    GN        1.02     NL        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.01     GC        1.05     HH        1.20     
!   HN        0.95     KK        1.00*    KP        1.03     LA        1.01     
!   MC        0.95     MK        1.00*    NY        1.01     ON        0.97     
!   OV        0.97     PT        1.01     SC        1.04     TS        1.00*    
!   WF        1.02     WZ        0.87     GN        1.02     NL        1.00     
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.02     FD        0.96     GC        0.98     HH        1.00*    
!   HN        0.95     KK        0.88     KP        0.99     LA        0.96     
!   MC        1.27     MK        1.01     NY        0.96     ON        1.01     
!   OV        0.98     PT        1.00*    SC        1.08     TS        1.00*    
!   WF        0.97     WZ        1.17     GN        0.97     NL        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.00*    GC        0.94     HH        1.00*    
!   HN        0.98     KK        0.97     KP        0.95     LA        0.99     
!   MC        1.16     MK        0.98     NY        0.96     ON        1.00*    
!   OV        1.00     PT        1.01     SC        0.98     TS        1.11     
!   WF        1.00*    WZ        1.00*    GN        0.96     NL        1.00*    
! 
!  A total of 297 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.96     GC        0.97     HH        1.00*    
!   HN        1.13     KK        0.94     KP        0.93     LA        0.98     
!   MC        1.00*    MK        0.97     NY        1.03     ON        1.11     
!   OV        0.98     PT        1.00     SC        1.13     TS        1.06     
!   WF        1.02     WZ        1.00*    GN        1.04     NL        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.01     GC        1.01     HH        1.39     
!   HN        0.94     KK        1.00*    KP        0.98     LA        1.00     
!   MC        0.94     MK        1.00*    NY        1.01     ON        0.98     
!   OV        0.98     PT        1.00     SC        0.99     TS        1.00*    
!   WF        1.03     WZ        0.81     GN        1.02     NL        1.00     
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.98     GC        0.94     HH        1.00*    
!   HN        0.94     KK        0.87     KP        0.95     LA        0.96     
!   MC        1.27     MK        1.02     NY        0.97     ON        0.98     
!   OV        0.99     PT        1.00*    SC        1.04     TS        1.00*    
!   WF        0.97     WZ        1.13     GN        0.96     NL        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.00*    GC        0.97     HH        1.00*    
!   HN        1.00     KK        0.99     KP        0.98     LA        0.99     
!   MC        1.15     MK        0.98     NY        0.93     ON        1.00*    
!   OV        1.00     PT        1.01     SC        0.98     TS        1.11     
!   WF        1.00*    WZ        1.00*    GN        1.14     NL        1.00*    
! 
!  A total of 297 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.96     GC        1.01     HH        1.00*    
!   HN        1.16     KK        0.94     KP        0.97     LA        0.99     
!   MC        1.00*    MK        0.97     NY        0.99     ON        1.04     
!   OV        0.98     PT        1.02     SC        1.17     TS        1.11     
!   WF        1.09     WZ        1.00*    GN        1.03     NL        0.99     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.02     GC        1.05     HH        1.74     
!   HN        0.97     KK        1.00*    KP        1.01     LA        1.01     
!   MC        0.95     MK        1.00*    NY        0.98     ON        0.98     
!   OV        0.98     PT        1.03     SC        1.00     TS        1.00*    
!   WF        1.05     WZ        0.85     GN        1.03     NL        1.01     
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        0.98     GC        0.97     HH        1.00*    
!   HN        0.95     KK        0.87     KP        0.97     LA        0.95     
!   MC        1.29     MK        1.02     NY        0.94     ON        1.05     
!   OV        0.99     PT        1.00*    SC        1.08     TS        1.00*    
!   WF        0.98     WZ        1.21     GN        0.98     NL        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 12 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.00*    GC        0.98     HH        1.00*    
!   HN        1.01     KK        0.93     KP        0.97     LA        1.00     
!   MC        1.14     MK        0.97     NY        0.97     ON        1.00*    
!   OV        1.01     PT        1.00     SC        1.00     TS        1.10     
!   WF        1.00*    WZ        1.00*    GN        1.00     NL        1.00*    
! 
!  A total of 297 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.98     GC        1.01     HH        1.00*    
!   HN        1.25     KK        1.65     KP        0.95     LA        1.00     
!   MC        1.00*    MK        0.95     NY        1.02     ON        1.12     
!   OV        0.98     PT        1.00     SC        1.14     TS        1.30     
!   WF        1.06     WZ        1.00*    GN        1.03     NL        1.00     
! 
!  A total of 30 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.03     GC        1.07     HH        1.34     
!   HN        0.98     KK        1.00*    KP        0.99     LA        1.02     
!   MC        0.98     MK        1.00*    NY        1.02     ON        1.00     
!   OV        0.98     PT        1.03     SC        1.01     TS        1.00*    
!   WF        1.04     WZ        0.89     GN        1.03     NL        1.02     
! 
!  A total of 12 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        0.99     GC        0.99     HH        1.00*    
!   HN        0.98     KK        0.87     KP        0.97     LA        0.99     
!   MC        1.30     MK        1.00     NY        1.00     ON        1.47     
!   OV        0.97     PT        1.00*    SC        1.05     TS        1.00*    
!   WF        1.00     WZ        1.70     GN        1.00     NL        1.00*    
! 
! 
! Fit before self-cal, rms=0.229329Jy  sigma=0.001304
! Fit after  self-cal, rms=0.249305Jy  sigma=0.001263
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8685 mas, bmaj=0.9776 mas, bpa=2.316 degrees
! Estimated noise=238.441 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.8, -2.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00424996 Jy
! Component: 100  -  total flux cleaned = 0.00491271 Jy
! Component: 150  -  total flux cleaned = 0.00500659 Jy
! Component: 200  -  total flux cleaned = 0.004838 Jy
! Total flux subtracted in 200 components = 0.004838 Jy
! Clean residual min=-0.002705 max=0.003148 Jy/beam
! Clean residual mean=0.000051 rms=0.000767 Jy/beam
! Combined flux in latest and established models = 0.729544 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 37 components and 0.729544 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.249158Jy  sigma=0.001260
! Fit after  self-cal, rms=0.249245Jy  sigma=0.001260
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.249245Jy  sigma=0.001260
! Fit after  self-cal, rms=0.265356Jy  sigma=0.001246
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8686 mas, bmaj=0.9792 mas, bpa=2.796 degrees
! Estimated noise=238.42 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000881634 Jy
! Component: 100  -  total flux cleaned = 0.00122525 Jy
! Component: 150  -  total flux cleaned = 0.00152078 Jy
! Component: 200  -  total flux cleaned = 0.00171556 Jy
! Total flux subtracted in 200 components = 0.00171556 Jy
! Clean residual min=-0.001239 max=0.002406 Jy/beam
! Clean residual mean=0.000259 rms=0.000457 Jy/beam
! Combined flux in latest and established models = 0.73126 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 42 components and 0.73126 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265275Jy  sigma=0.001246
! Fit after  self-cal, rms=0.265330Jy  sigma=0.001245
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-1.6, -0.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00188293 Jy
! Component: 100  -  total flux cleaned = 0.00277046 Jy
! Component: 150  -  total flux cleaned = 0.00319499 Jy
! Component: 200  -  total flux cleaned = 0.00346223 Jy
! Total flux subtracted in 200 components = 0.00346223 Jy
! Clean residual min=-0.001215 max=0.001773 Jy/beam
! Clean residual mean=0.000195 rms=0.000412 Jy/beam
! Combined flux in latest and established models = 0.734722 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 54 components and 0.734722 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265249Jy  sigma=0.001245
! Fit after  self-cal, rms=0.265234Jy  sigma=0.001245
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Added new window around map position (-6.4, -3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00130565 Jy
! Component: 100  -  total flux cleaned = 0.00186916 Jy
! Component: 150  -  total flux cleaned = 0.00216258 Jy
! Component: 200  -  total flux cleaned = 0.00225329 Jy
! Total flux subtracted in 200 components = 0.00225329 Jy
! Clean residual min=-0.001113 max=0.001605 Jy/beam
! Clean residual mean=0.000153 rms=0.000392 Jy/beam
! Combined flux in latest and established models = 0.736975 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 65 components and 0.736975 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265181Jy  sigma=0.001245
! Fit after  self-cal, rms=0.265170Jy  sigma=0.001245
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.265170Jy  sigma=0.001245
! Fit after  self-cal, rms=0.270426Jy  sigma=0.001243
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8674 mas, bmaj=0.9805 mas, bpa=2.99 degrees
! Estimated noise=238.335 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000773456 Jy
! Component: 100  -  total flux cleaned = 0.00125191 Jy
! Component: 150  -  total flux cleaned = 0.00165998 Jy
! Component: 200  -  total flux cleaned = 0.00188782 Jy
! Total flux subtracted in 200 components = 0.00188782 Jy
! Clean residual min=-0.001019 max=0.001548 Jy/beam
! Clean residual mean=0.000152 rms=0.000352 Jy/beam
! Combined flux in latest and established models = 0.738863 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 71 components and 0.738863 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270375Jy  sigma=0.001242
! Fit after  self-cal, rms=0.270366Jy  sigma=0.001242
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-3.2, -10.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00102995 Jy
! Component: 100  -  total flux cleaned = 0.00163599 Jy
! Component: 150  -  total flux cleaned = 0.00200551 Jy
! Component: 200  -  total flux cleaned = 0.00219664 Jy
! Total flux subtracted in 200 components = 0.00219664 Jy
! Clean residual min=-0.001095 max=0.001314 Jy/beam
! Clean residual mean=0.000110 rms=0.000335 Jy/beam
! Combined flux in latest and established models = 0.74106 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 84 components and 0.74106 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270330Jy  sigma=0.001242
! Fit after  self-cal, rms=0.270325Jy  sigma=0.001242
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.270325Jy  sigma=0.001242
! Fit after  self-cal, rms=0.270149Jy  sigma=0.001242
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=2.27 mas, bmaj=2.557 mas, bpa=80.95 degrees
! Estimated noise=312.937 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00168107 Jy
! Component: 100  -  total flux cleaned = 0.0026637 Jy
! Component: 150  -  total flux cleaned = 0.00331932 Jy
! Component: 200  -  total flux cleaned = 0.00373144 Jy
! Total flux subtracted in 200 components = 0.00373144 Jy
! Clean residual min=-0.000855 max=0.001289 Jy/beam
! Clean residual mean=0.000170 rms=0.000348 Jy/beam
! Combined flux in latest and established models = 0.744791 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 106 components and 0.744791 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270143Jy  sigma=0.001242
! Fit after  self-cal, rms=0.270139Jy  sigma=0.001242
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.000319269 Jy
! Component: 100  -  total flux cleaned = 0.000514231 Jy
! Component: 150  -  total flux cleaned = 0.00067074 Jy
! Component: 200  -  total flux cleaned = 0.000755471 Jy
! Total flux subtracted in 200 components = 0.000755471 Jy
! Clean residual min=-0.000912 max=0.001264 Jy/beam
! Clean residual mean=0.000130 rms=0.000350 Jy/beam
! Combined flux in latest and established models = 0.745547 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 112 components and 0.745547 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.270137Jy  sigma=0.001242
! Fit after  self-cal, rms=0.270136Jy  sigma=0.001242
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8669 mas, bmaj=0.9811 mas, bpa=3.107 degrees
! Estimated noise=238.309 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8669 x 0.9811 at 3.107 degrees (North through East)
! Clean map  min=-0.00098984  max=0.59076 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.270136Jy  sigma=0.001242
! Fit after  self-cal, rms=0.593893Jy  sigma=0.001158
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8663 mas, bmaj=0.9805 mas, bpa=2.86 degrees
! Estimated noise=238.293 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.0001465 Jy
! Component: 100  -  total flux cleaned = -2.84316e-05 Jy
! Component: 150  -  total flux cleaned = 0.000116407 Jy
! Component: 200  -  total flux cleaned = 0.000249932 Jy
! Total flux subtracted in 200 components = 0.000249932 Jy
! Clean residual min=-0.001103 max=0.001254 Jy/beam
! Clean residual mean=0.000079 rms=0.000290 Jy/beam
! Combined flux in latest and established models = 0.745797 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 118 components and 0.745797 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.593883Jy  sigma=0.001158
! Fit after  self-cal, rms=0.593898Jy  sigma=0.001158
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000227895 Jy
! Component: 100  -  total flux cleaned = 0.000380109 Jy
! Component: 150  -  total flux cleaned = 0.000496041 Jy
! Component: 200  -  total flux cleaned = 0.000578784 Jy
! Total flux subtracted in 200 components = 0.000578784 Jy
! Clean residual min=-0.001127 max=0.001174 Jy/beam
! Clean residual mean=0.000068 rms=0.000287 Jy/beam
! Combined flux in latest and established models = 0.746376 Jy
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 128 components and 0.746376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.593892Jy  sigma=0.001158
! Fit after  self-cal, rms=0.593877Jy  sigma=0.001158
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.593877Jy  sigma=0.001158
! Fit after  self-cal, rms=0.609884Jy  sigma=0.001158
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.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.5717 mas, bmaj=0.7528 mas, bpa=-2.909 degrees
! Estimated noise=659.273 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.407832 Jy
! Component: 100  -  total flux cleaned = 0.51709 Jy
! Component: 150  -  total flux cleaned = 0.577962 Jy
! Component: 200  -  total flux cleaned = 0.619382 Jy
! Total flux subtracted in 200 components = 0.619382 Jy
! Clean residual min=-0.005444 max=0.022768 Jy/beam
! Clean residual mean=0.000213 rms=0.001965 Jy/beam
! Combined flux in latest and established models = 0.619382 Jy
uvw 0,-1
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 17 model components to the UV plane model.
! The established model now contains 17 components and 0.619382 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8658 mas, bmaj=0.9811 mas, bpa=2.943 degrees
! Estimated noise=238.24 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.0508891 Jy
! Component: 100  -  total flux cleaned = 0.0764784 Jy
! Component: 150  -  total flux cleaned = 0.0908753 Jy
! Component: 200  -  total flux cleaned = 0.0998573 Jy
! Total flux subtracted in 200 components = 0.0998573 Jy
! Clean residual min=-0.001676 max=0.005606 Jy/beam
! Clean residual mean=0.000573 rms=0.000899 Jy/beam
! Combined flux in latest and established models = 0.719239 Jy
! Adding 37 model components to the UV plane model.
! The established model now contains 42 components and 0.719239 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Added new window around map position (0.6, -0.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00628228 Jy
! Component: 100  -  total flux cleaned = 0.0107971 Jy
! Component: 150  -  total flux cleaned = 0.0142107 Jy
! Component: 200  -  total flux cleaned = 0.0163417 Jy
! Total flux subtracted in 200 components = 0.0163417 Jy
! Clean residual min=-0.001678 max=0.002044 Jy/beam
! Clean residual mean=0.000270 rms=0.000450 Jy/beam
! Combined flux in latest and established models = 0.735581 Jy
! Adding 37 model components to the UV plane model.
! The established model now contains 67 components and 0.735581 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Added new window around map position (-1.2, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00151453 Jy
! Component: 100  -  total flux cleaned = 0.00258787 Jy
! Component: 150  -  total flux cleaned = 0.00365163 Jy
! Component: 200  -  total flux cleaned = 0.00470294 Jy
! Total flux subtracted in 200 components = 0.00470294 Jy
! Clean residual min=-0.001167 max=0.001554 Jy/beam
! Clean residual mean=0.000183 rms=0.000364 Jy/beam
! Combined flux in latest and established models = 0.740284 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 79 components and 0.740284 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Added new window around map position (-4, -0.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00110582 Jy
! Component: 100  -  total flux cleaned = 0.00194118 Jy
! Component: 150  -  total flux cleaned = 0.00271476 Jy
! Component: 200  -  total flux cleaned = 0.00337938 Jy
! Total flux subtracted in 200 components = 0.00337938 Jy
! Clean residual min=-0.000987 max=0.001356 Jy/beam
! Clean residual mean=0.000120 rms=0.000326 Jy/beam
! Combined flux in latest and established models = 0.743664 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 90 components and 0.743664 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 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.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=2.269 mas, bmaj=2.555 mas, bpa=80.78 degrees
! Estimated noise=313.189 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00183808 Jy
! Component: 100  -  total flux cleaned = 0.00298598 Jy
! Component: 150  -  total flux cleaned = 0.00376707 Jy
! Component: 200  -  total flux cleaned = 0.00430947 Jy
! Total flux subtracted in 200 components = 0.00430947 Jy
! Clean residual min=-0.000762 max=0.001039 Jy/beam
! Clean residual mean=0.000116 rms=0.000274 Jy/beam
! Combined flux in latest and established models = 0.747973 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.000214761 Jy
! Component: 100  -  total flux cleaned = 0.0003239 Jy
! Component: 150  -  total flux cleaned = 0.000407583 Jy
! Component: 200  -  total flux cleaned = 0.000458266 Jy
! Total flux subtracted in 200 components = 0.000458266 Jy
! Clean residual min=-0.000699 max=0.001007 Jy/beam
! Clean residual mean=0.000091 rms=0.000269 Jy/beam
! Combined flux in latest and established models = 0.748431 Jy
! Adding 40 model components to the UV plane model.
! The established model now contains 124 components and 0.748432 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! Estimated beam: bmin=0.8658 mas, bmaj=0.9811 mas, bpa=2.943 degrees
! Estimated noise=238.24 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000633965 Jy
! Component: 100  -  total flux cleaned = -0.00063403 Jy
! Component: 150  -  total flux cleaned = -0.000634192 Jy
! Component: 200  -  total flux cleaned = -0.000591501 Jy
! Total flux subtracted in 200 components = -0.000591501 Jy
! Clean residual min=-0.001051 max=0.001125 Jy/beam
! Clean residual mean=0.000042 rms=0.000289 Jy/beam
! Combined flux in latest and established models = 0.74784 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 132 components and 0.74784 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.609957Jy  sigma=0.001160
! Fit after  self-cal, rms=0.610619Jy  sigma=0.001160
wmodel J1640+3946_X_1999_12_20_pus_map.mod
! Writing 132 model components to file: J1640+3946_X_1999_12_20_pus_map.mod
wobs J1640+3946_X_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J1640+3946_X_1999_12_20_pus_uvs.fits
wwins J1640+3946_X_1999_12_20_pus_map.win
! wwins: Wrote 8 windows to J1640+3946_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.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 5.73247e-05 Jy
! Component: 100  -  total flux cleaned = 0.000279909 Jy
! Component: 150  -  total flux cleaned = 0.000438838 Jy
! Component: 200  -  total flux cleaned = 0.000574441 Jy
! Component: 250  -  total flux cleaned = 0.000656789 Jy
! Component: 300  -  total flux cleaned = 0.000769688 Jy
! Component: 350  -  total flux cleaned = 0.000864686 Jy
! Component: 400  -  total flux cleaned = 0.000958332 Jy
! Component: 450  -  total flux cleaned = 0.00106606 Jy
! Component: 500  -  total flux cleaned = 0.00115692 Jy
! Component: 550  -  total flux cleaned = 0.00120191 Jy
! Component: 600  -  total flux cleaned = 0.00127617 Jy
! Component: 650  -  total flux cleaned = 0.00134978 Jy
! Component: 700  -  total flux cleaned = 0.00142282 Jy
! Component: 750  -  total flux cleaned = 0.00148068 Jy
! Component: 800  -  total flux cleaned = 0.00156684 Jy
! Component: 850  -  total flux cleaned = 0.00163806 Jy
! Component: 900  -  total flux cleaned = 0.00170873 Jy
! Component: 950  -  total flux cleaned = 0.0017649 Jy
! Component: 1000  -  total flux cleaned = 0.00184849 Jy
! Total flux subtracted in 1024 components = 0.00186238 Jy
! Clean residual min=-0.000803 max=0.000761 Jy/beam
! Clean residual mean=0.000019 rms=0.000263 Jy/beam
! Combined flux in latest and established models = 0.749702 Jy
keep
! Adding 76 model components to the UV plane model.
! The established model now contains 202 components and 0.749702 Jy
![Exited script file: muppet]
wmap "J1640+3946_X_1999_12_20_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.8658 x 0.9811 at 2.943 degrees (North through East)
! Clean map  min=-0.00094487  max=0.59081 Jy/beam
! Writing clean map to FITS file: J1640+3946_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.590812 
invert
! Inverting map 
! Your choice of large map pixels excluded 2.79% of the data.
!  The x-axis pixel size should ideally be below 0.1537 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1577 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000263611 
device "J1640+3946_X_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J1640+3946_X_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.133855 0.133855 0.26771 0.53542 1.07084 2.14168 4.28336 8.56672 17.1334 34.2669 68.5338
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0007 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.59 
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.8658 x 0.9811 at 2.943 degrees (North through East)
! Clean map  min=-0.00094487  max=0.59081 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1640+3946_X_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J1640+3946_X_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1640+3946_X_1999_12_20_pus_uvs.log closed on Fri Dec 14 17:26:38 2007