! Started logfile: J0818+4222_X_1998_10_01_pus_uvs.log on Wed Feb  6 12:26:40 2008
obs J0818+4222_X_1998_10_01_pus_uva.fits
! Reading UV FITS file: J0818+4222_X_1998_10_01_pus_uva.fits
! AN table 1: 237 integrations on 136 of 136 possible baselines.
! AN table 2: 456 integrations on 136 of 136 possible baselines.
! AN table 3: 153 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.275266 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0818+4222
! 
! 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.40798e+09        4e+06          1        4e+06
!  02        2  8.47798e+09        4e+06          1        4e+06
!  03        3  8.79298e+09        4e+06          1        4e+06
!  04        4  8.89798e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 2049 lines of history.
! 
! Reading 126684 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 J0818+4222_X_1998_10_01_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 2653 telescope corrections were flagged in sub-array 1.
!  A total of 4271 telescope corrections were flagged in sub-array 2.
!  A total of 1529 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 2653 telescope corrections were flagged in sub-array 1.
!  A total of 4271 telescope corrections were flagged in sub-array 2.
!  A total of 1529 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 2653 telescope corrections were flagged in sub-array 1.
!  A total of 4271 telescope corrections were flagged in sub-array 2.
!  A total of 1529 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 2653 telescope corrections were flagged in sub-array 1.
!  A total of 4271 telescope corrections were flagged in sub-array 2.
!  A total of 1529 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.791600Jy  sigma=0.006448
! Fit after  self-cal, rms=0.518392Jy  sigma=0.003799
! 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.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.5888 mas, bmaj=0.765 mas, bpa=-13.07 degrees
! Estimated noise=449.579 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.520207 Jy
! Component: 100  -  total flux cleaned = 0.635618 Jy
! Total flux subtracted in 100 components = 0.635618 Jy
! Clean residual min=-0.014233 max=0.077397 Jy/beam
! Clean residual mean=0.000380 rms=0.004910 Jy/beam
! Combined flux in latest and established models = 0.635618 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.635618 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.414220Jy  sigma=0.003008
! Fit after  self-cal, rms=0.414198Jy  sigma=0.003008
! Inverting map 
! Your choice of large map pixels excluded 1.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Added new window around map position (1.2, 0.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.070825 Jy
! Component: 100  -  total flux cleaned = 0.112338 Jy
! Total flux subtracted in 100 components = 0.112338 Jy
! Clean residual min=-0.012391 max=0.026333 Jy/beam
! Clean residual mean=0.000236 rms=0.003564 Jy/beam
! Combined flux in latest and established models = 0.747956 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 11 components and 0.747956 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.398366Jy  sigma=0.002733
! Fit after  self-cal, rms=0.396387Jy  sigma=0.002715
! Inverting map 
! Your choice of large map pixels excluded 1.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0367929 Jy
! Component: 100  -  total flux cleaned = 0.0614841 Jy
! Total flux subtracted in 100 components = 0.0614841 Jy
! Clean residual min=-0.011667 max=0.015189 Jy/beam
! Clean residual mean=0.000160 rms=0.002801 Jy/beam
! Combined flux in latest and established models = 0.80944 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 17 components and 0.80944 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.391941Jy  sigma=0.002618
! Fit after  self-cal, rms=0.391424Jy  sigma=0.002613
! Inverting map 
! Your choice of large map pixels excluded 1.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0216944 Jy
! Component: 100  -  total flux cleaned = 0.0375068 Jy
! Total flux subtracted in 100 components = 0.0375068 Jy
! Clean residual min=-0.011530 max=0.010477 Jy/beam
! Clean residual mean=0.000114 rms=0.002485 Jy/beam
! Combined flux in latest and established models = 0.846947 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 21 components and 0.846947 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.390012Jy  sigma=0.002573
! Fit after  self-cal, rms=0.389846Jy  sigma=0.002572
! Inverting map 
! Your choice of large map pixels excluded 1.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7607 mas, bmaj=0.9635 mas, bpa=-12.56 degrees
! Estimated noise=237.072 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.2, -0.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.026894 Jy
! Component: 100  -  total flux cleaned = 0.0441887 Jy
! Component: 150  -  total flux cleaned = 0.0563418 Jy
! Component: 200  -  total flux cleaned = 0.0651866 Jy
! Total flux subtracted in 200 components = 0.0651866 Jy
! Clean residual min=-0.009522 max=0.010859 Jy/beam
! Clean residual mean=0.000004 rms=0.002739 Jy/beam
! Combined flux in latest and established models = 0.912133 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 51 components and 0.912133 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.388598Jy  sigma=0.002534
! Fit after  self-cal, rms=0.388457Jy  sigma=0.002532
! Inverting map 
! Your choice of large map pixels excluded 1.03% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 93 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.04     GC        1.03     HN        1.45     
!   KK        0.99     KP        0.97     LA        1.50     MK        1.01     
!   NL        1.01     NY        1.03     ON        1.07     OV        0.99     
!   PT        1.02     SC        1.00*    WF        1.23     MC        1.00*    
!   GN        1.24     
! 
!  A total of 207 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.99     GC        0.93     HN        0.97     
!   KK        1.01     KP        0.96     LA        0.98     MK        1.03     
!   NL        1.00     NY        0.97     ON        1.02     OV        1.00     
!   PT        0.98     SC        1.00     WF        1.00     MC        1.00     
!   GN        0.96     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        0.97     GC        0.95     HN        0.92     
!   KK        1.01     KP        0.95     LA        0.94     MK        0.99     
!   NL        0.92     NY        0.85     ON        1.03     OV        0.98     
!   PT        1.02     SC        1.06     WF        1.04     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 93 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.05     GC        1.06     HN        1.47     
!   KK        0.97     KP        1.01     LA        1.43     MK        1.00     
!   NL        1.02     NY        1.01     ON        1.05     OV        1.00     
!   PT        1.03     SC        1.00*    WF        1.24     MC        1.00*    
!   GN        1.25     
! 
!  A total of 207 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.99     GC        0.95     HN        1.03     
!   KK        1.02     KP        0.97     LA        0.93     MK        1.03     
!   NL        1.02     NY        0.99     ON        1.03     OV        0.99     
!   PT        0.99     SC        0.99     WF        1.01     MC        1.00     
!   GN        0.94     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        0.97     GC        0.99     HN        0.95     
!   KK        1.00     KP        0.96     LA        0.90     MK        1.00     
!   NL        0.94     NY        0.87     ON        1.02     OV        0.96     
!   PT        1.01     SC        1.07     WF        1.03     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 93 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.02     GC        1.05     HN        1.43     
!   KK        0.98     KP        1.03     LA        1.46     MK        1.05     
!   NL        0.99     NY        0.98     ON        1.08     OV        0.97     
!   PT        1.02     SC        1.00*    WF        1.25     MC        1.00*    
!   GN        1.23     
! 
!  A total of 207 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.98     GC        0.95     HN        0.98     
!   KK        1.03     KP        1.00     LA        0.93     MK        1.06     
!   NL        1.00     NY        0.96     ON        1.03     OV        0.95     
!   PT        0.99     SC        1.02     WF        1.03     MC        1.08     
!   GN        0.95     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.95     GC        1.00     HN        0.91     
!   KK        1.03     KP        0.99     LA        0.90     MK        1.01     
!   NL        0.91     NY        0.90     ON        1.07     OV        0.93     
!   PT        1.01     SC        1.06     WF        1.03     MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 93 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.01     GC        1.02     HN        1.47     
!   KK        1.00     KP        1.01     LA        1.53     MK        1.01     
!   NL        1.02     NY        1.01     ON        1.12     OV        0.97     
!   PT        0.98     SC        1.00*    WF        1.19     MC        1.00*    
!   GN        1.21     
! 
!  A total of 207 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.96     GC        0.96     HN        1.02     
!   KK        1.01     KP        0.98     LA        0.95     MK        1.01     
!   NL        1.03     NY        0.98     ON        1.06     OV        0.99     
!   PT        0.96     SC        0.97     WF        1.02     MC        1.05     
!   GN        0.95     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.93     FD        0.94     GC        0.99     HN        0.96     
!   KK        1.04     KP        0.94     LA        0.90     MK        0.98     
!   NL        0.94     NY        0.76     ON        1.11     OV        0.96     
!   PT        0.97     SC        1.05     WF        1.02     MC        1.00*    
!   GN        1.00*    
! 
! 
! Fit before self-cal, rms=0.388457Jy  sigma=0.002532
! Fit after  self-cal, rms=0.418137Jy  sigma=0.002465
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7667 mas, bmaj=0.9742 mas, bpa=-12.95 degrees
! Estimated noise=235.994 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.00277582 Jy
! Component: 100  -  total flux cleaned = 0.00388491 Jy
! Component: 150  -  total flux cleaned = 0.00471765 Jy
! Component: 200  -  total flux cleaned = 0.00555431 Jy
! Total flux subtracted in 200 components = 0.00555432 Jy
! Clean residual min=-0.003553 max=0.004275 Jy/beam
! Clean residual mean=0.000142 rms=0.001041 Jy/beam
! Combined flux in latest and established models = 0.917688 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 60 components and 0.917688 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.417927Jy  sigma=0.002462
! Fit after  self-cal, rms=0.418536Jy  sigma=0.002462
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.418536Jy  sigma=0.002462
! Fit after  self-cal, rms=0.420940Jy  sigma=0.002448
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7664 mas, bmaj=0.9748 mas, bpa=-12.09 degrees
! Estimated noise=236.356 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00401696 Jy
! Component: 100  -  total flux cleaned = 0.00483441 Jy
! Component: 150  -  total flux cleaned = 0.00501324 Jy
! Component: 200  -  total flux cleaned = 0.00516526 Jy
! Total flux subtracted in 200 components = 0.00516526 Jy
! Clean residual min=-0.002092 max=0.003854 Jy/beam
! Clean residual mean=0.000129 rms=0.000687 Jy/beam
! Combined flux in latest and established models = 0.922853 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 66 components and 0.922853 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.420871Jy  sigma=0.002447
! Fit after  self-cal, rms=0.420961Jy  sigma=0.002447
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.2, -2.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00335443 Jy
! Component: 100  -  total flux cleaned = 0.003722 Jy
! Component: 150  -  total flux cleaned = 0.00403478 Jy
! Component: 200  -  total flux cleaned = 0.00424124 Jy
! Total flux subtracted in 200 components = 0.00424124 Jy
! Clean residual min=-0.002030 max=0.003072 Jy/beam
! Clean residual mean=0.000094 rms=0.000638 Jy/beam
! Combined flux in latest and established models = 0.927094 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 76 components and 0.927094 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.420915Jy  sigma=0.002446
! Fit after  self-cal, rms=0.420905Jy  sigma=0.002446
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Added new window around map position (4, -1.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00308612 Jy
! Component: 100  -  total flux cleaned = 0.00391914 Jy
! Component: 150  -  total flux cleaned = 0.00411018 Jy
! Component: 200  -  total flux cleaned = 0.00439427 Jy
! Total flux subtracted in 200 components = 0.00439427 Jy
! Clean residual min=-0.002025 max=0.002288 Jy/beam
! Clean residual mean=0.000058 rms=0.000596 Jy/beam
! Combined flux in latest and established models = 0.931488 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 88 components and 0.931488 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.420874Jy  sigma=0.002446
! Fit after  self-cal, rms=0.420871Jy  sigma=0.002446
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.420871Jy  sigma=0.002446
! Fit after  self-cal, rms=0.422057Jy  sigma=0.002446
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7656 mas, bmaj=0.975 mas, bpa=-12.08 degrees
! Estimated noise=236.518 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00225716 Jy
! Component: 100  -  total flux cleaned = 0.00338177 Jy
! Component: 150  -  total flux cleaned = 0.00395321 Jy
! Component: 200  -  total flux cleaned = 0.00436521 Jy
! Total flux subtracted in 200 components = 0.00436521 Jy
! Clean residual min=-0.001917 max=0.002157 Jy/beam
! Clean residual mean=0.000057 rms=0.000573 Jy/beam
! Combined flux in latest and established models = 0.935854 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 96 components and 0.935854 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422036Jy  sigma=0.002445
! Fit after  self-cal, rms=0.422023Jy  sigma=0.002445
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.000548347 Jy
! Component: 100  -  total flux cleaned = 0.000740117 Jy
! Component: 150  -  total flux cleaned = 0.000874041 Jy
! Component: 200  -  total flux cleaned = 0.00100105 Jy
! Total flux subtracted in 200 components = 0.00100105 Jy
! Clean residual min=-0.001897 max=0.002145 Jy/beam
! Clean residual mean=0.000049 rms=0.000567 Jy/beam
! Combined flux in latest and established models = 0.936855 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 98 components and 0.936855 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422011Jy  sigma=0.002445
! Fit after  self-cal, rms=0.422010Jy  sigma=0.002445
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.422010Jy  sigma=0.002445
! Fit after  self-cal, rms=0.422452Jy  sigma=0.002445
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=2.189 mas, bmaj=2.489 mas, bpa=23.25 degrees
! Estimated noise=332.849 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00230278 Jy
! Component: 100  -  total flux cleaned = 0.00356033 Jy
! Component: 150  -  total flux cleaned = 0.00433999 Jy
! Component: 200  -  total flux cleaned = 0.00462087 Jy
! Total flux subtracted in 200 components = 0.00462087 Jy
! Clean residual min=-0.002108 max=0.002274 Jy/beam
! Clean residual mean=0.000102 rms=0.000748 Jy/beam
! Combined flux in latest and established models = 0.941476 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 103 components and 0.941476 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422445Jy  sigma=0.002445
! Fit after  self-cal, rms=0.422443Jy  sigma=0.002445
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.000693338 Jy
! Component: 100  -  total flux cleaned = 0.000789064 Jy
! Component: 150  -  total flux cleaned = 0.000823329 Jy
! Component: 200  -  total flux cleaned = 0.000854256 Jy
! Total flux subtracted in 200 components = 0.000854256 Jy
! Clean residual min=-0.002174 max=0.002252 Jy/beam
! Clean residual mean=0.000080 rms=0.000749 Jy/beam
! Combined flux in latest and established models = 0.94233 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 108 components and 0.94233 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422443Jy  sigma=0.002445
! Fit after  self-cal, rms=0.422441Jy  sigma=0.002445
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
win_mult = win_mult / 1.2
print "************** FINISHED AMPLITUDE SELF-CAL **************"
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
restore
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7651 mas, bmaj=0.975 mas, bpa=-12.08 degrees
! Estimated noise=236.69 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7651 x 0.975 at -12.08 degrees (North through East)
! Clean map  min=-0.0016049  max=0.67217 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.422441Jy  sigma=0.002445
! Fit after  self-cal, rms=0.905041Jy  sigma=0.002316
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.764 mas, bmaj=0.9741 mas, bpa=-12.1 degrees
! Estimated noise=236.735 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00104827 Jy
! Component: 100  -  total flux cleaned = 0.00137767 Jy
! Component: 150  -  total flux cleaned = 0.00150288 Jy
! Component: 200  -  total flux cleaned = 0.0015397 Jy
! Total flux subtracted in 200 components = 0.0015397 Jy
! Clean residual min=-0.001874 max=0.002074 Jy/beam
! Clean residual mean=0.000055 rms=0.000535 Jy/beam
! Combined flux in latest and established models = 0.94387 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 112 components and 0.94387 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.905031Jy  sigma=0.002316
! Fit after  self-cal, rms=0.905039Jy  sigma=0.002316
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000217424 Jy
! Component: 100  -  total flux cleaned = 0.000181133 Jy
! Component: 150  -  total flux cleaned = 0.000180567 Jy
! Component: 200  -  total flux cleaned = 0.000179751 Jy
! Total flux subtracted in 200 components = 0.000179751 Jy
! Clean residual min=-0.001875 max=0.002062 Jy/beam
! Clean residual mean=0.000054 rms=0.000534 Jy/beam
! Combined flux in latest and established models = 0.944049 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 118 components and 0.944049 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.905035Jy  sigma=0.002315
! Fit after  self-cal, rms=0.905037Jy  sigma=0.002315
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 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.905037Jy  sigma=0.002315
! Fit after  self-cal, rms=1.345726Jy  sigma=0.002315
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.59 mas, bmaj=0.7717 mas, bpa=-11.89 degrees
! Estimated noise=446.008 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.512094 Jy
! Component: 100  -  total flux cleaned = 0.648124 Jy
! Component: 150  -  total flux cleaned = 0.722196 Jy
! Component: 200  -  total flux cleaned = 0.770238 Jy
! Total flux subtracted in 200 components = 0.770238 Jy
! Clean residual min=-0.007026 max=0.026012 Jy/beam
! Clean residual mean=0.000210 rms=0.002295 Jy/beam
! Combined flux in latest and established models = 0.770238 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 11 model components to the UV plane model.
! The established model now contains 11 components and 0.770238 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7635 mas, bmaj=0.9741 mas, bpa=-12.05 degrees
! Estimated noise=236.886 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.0573507 Jy
! Component: 100  -  total flux cleaned = 0.0897818 Jy
! Component: 150  -  total flux cleaned = 0.11008 Jy
! Component: 200  -  total flux cleaned = 0.124178 Jy
! Total flux subtracted in 200 components = 0.124178 Jy
! Clean residual min=-0.002513 max=0.007970 Jy/beam
! Clean residual mean=0.000467 rms=0.001425 Jy/beam
! Combined flux in latest and established models = 0.894416 Jy
! Adding 46 model components to the UV plane model.
! The established model now contains 48 components and 0.894416 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0102866 Jy
! Component: 100  -  total flux cleaned = 0.0180359 Jy
! Component: 150  -  total flux cleaned = 0.0241105 Jy
! Component: 200  -  total flux cleaned = 0.0289888 Jy
! Total flux subtracted in 200 components = 0.0289888 Jy
! Clean residual min=-0.001890 max=0.003730 Jy/beam
! Clean residual mean=0.000233 rms=0.000770 Jy/beam
! Combined flux in latest and established models = 0.923404 Jy
! Adding 47 model components to the UV plane model.
! The established model now contains 74 components and 0.923404 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Added new window around map position (2.6, -1.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00412044 Jy
! Component: 100  -  total flux cleaned = 0.0073969 Jy
! Component: 150  -  total flux cleaned = 0.0101156 Jy
! Component: 200  -  total flux cleaned = 0.0123879 Jy
! Total flux subtracted in 200 components = 0.0123879 Jy
! Clean residual min=-0.001835 max=0.002134 Jy/beam
! Clean residual mean=0.000133 rms=0.000590 Jy/beam
! Combined flux in latest and established models = 0.935792 Jy
! Adding 44 model components to the UV plane model.
! The established model now contains 91 components and 0.935792 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=2.188 mas, bmaj=2.488 mas, bpa=23.09 degrees
! Estimated noise=333.947 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00433275 Jy
! Component: 100  -  total flux cleaned = 0.00693661 Jy
! Component: 150  -  total flux cleaned = 0.00861282 Jy
! Component: 200  -  total flux cleaned = 0.00970748 Jy
! Total flux subtracted in 200 components = 0.00970748 Jy
! Clean residual min=-0.002121 max=0.002315 Jy/beam
! Clean residual mean=0.000183 rms=0.000725 Jy/beam
! Combined flux in latest and established models = 0.9455 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.000721318 Jy
! Component: 100  -  total flux cleaned = 0.0011993 Jy
! Component: 150  -  total flux cleaned = 0.00132669 Jy
! Component: 200  -  total flux cleaned = 0.00142187 Jy
! Total flux subtracted in 200 components = 0.00142187 Jy
! Clean residual min=-0.002112 max=0.002295 Jy/beam
! Clean residual mean=0.000145 rms=0.000710 Jy/beam
! Combined flux in latest and established models = 0.946922 Jy
! Adding 62 model components to the UV plane model.
! The established model now contains 137 components and 0.946921 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! Estimated beam: bmin=0.7635 mas, bmaj=0.9741 mas, bpa=-12.05 degrees
! Estimated noise=236.886 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00102765 Jy
! Component: 100  -  total flux cleaned = -0.00110529 Jy
! Component: 150  -  total flux cleaned = -0.00110652 Jy
! Component: 200  -  total flux cleaned = -0.00107579 Jy
! Total flux subtracted in 200 components = -0.00107579 Jy
! Clean residual min=-0.001817 max=0.001958 Jy/beam
! Clean residual mean=0.000053 rms=0.000529 Jy/beam
! Combined flux in latest and established models = 0.945846 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 149 components and 0.945846 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.345715Jy  sigma=0.002315
! Fit after  self-cal, rms=1.345753Jy  sigma=0.002315
wmodel J0818+4222_X_1998_10_01_pus_map.mod
! Writing 149 model components to file: J0818+4222_X_1998_10_01_pus_map.mod
wobs J0818+4222_X_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J0818+4222_X_1998_10_01_pus_uvs.fits
wwins J0818+4222_X_1998_10_01_pus_map.win
! wwins: Wrote 6 windows to J0818+4222_X_1998_10_01_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000288755 Jy
! Component: 100  -  total flux cleaned = 0.000646524 Jy
! Component: 150  -  total flux cleaned = 0.000991243 Jy
! Component: 200  -  total flux cleaned = 0.0012957 Jy
! Component: 250  -  total flux cleaned = 0.00150376 Jy
! Component: 300  -  total flux cleaned = 0.00179403 Jy
! Component: 350  -  total flux cleaned = 0.0020213 Jy
! Component: 400  -  total flux cleaned = 0.00224409 Jy
! Component: 450  -  total flux cleaned = 0.00235352 Jy
! Component: 500  -  total flux cleaned = 0.00251538 Jy
! Component: 550  -  total flux cleaned = 0.00264839 Jy
! Component: 600  -  total flux cleaned = 0.00275368 Jy
! Component: 650  -  total flux cleaned = 0.002858 Jy
! Component: 700  -  total flux cleaned = 0.00301207 Jy
! Component: 750  -  total flux cleaned = 0.00311326 Jy
! Component: 800  -  total flux cleaned = 0.00316336 Jy
! Component: 850  -  total flux cleaned = 0.00321326 Jy
! Component: 900  -  total flux cleaned = 0.00331189 Jy
! Component: 950  -  total flux cleaned = 0.00333627 Jy
! Component: 1000  -  total flux cleaned = 0.00336074 Jy
! Total flux subtracted in 1024 components = 0.00340904 Jy
! Clean residual min=-0.001302 max=0.001206 Jy/beam
! Clean residual mean=0.000030 rms=0.000473 Jy/beam
! Combined flux in latest and established models = 0.949255 Jy
keep
! Adding 86 model components to the UV plane model.
! The established model now contains 235 components and 0.949255 Jy
![Exited script file: muppet]
wmap "J0818+4222_X_1998_10_01_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7635 x 0.9741 at -12.05 degrees (North through East)
! Clean map  min=-0.0014491  max=0.67217 Jy/beam
! Writing clean map to FITS file: J0818+4222_X_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.672173 
invert
! Inverting map 
! Your choice of large map pixels excluded 0.973% of the data.
!  The x-axis pixel size should ideally be below 0.1656 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000473298 
device "J0818+4222_X_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J0818+4222_X_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.211239 0.211239 0.422478 0.844956 1.68991 3.37982 6.75965 13.5193 27.0386 54.0772
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.672 
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.7635 x 0.9741 at -12.05 degrees (North through East)
! Clean map  min=-0.0014491  max=0.67217 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0818+4222_X_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J0818+4222_X_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0818+4222_X_1998_10_01_pus_uvs.log closed on Wed Feb  6 12:27:18 2008