! Started logfile: J0136+4751_X_1999_05_10_pus_uvs.log on Mon Jan 14 17:02:26 2008
obs J0136+4751_X_1999_05_10_pus_uva.fits
! Reading UV FITS file: J0136+4751_X_1999_05_10_pus_uva.fits
! AN table 1: 34 integrations on 153 of 153 possible baselines.
! AN table 2: 194 integrations on 153 of 153 possible baselines.
! AN table 3: 41 integrations on 153 of 153 possible baselines.
! AN table 4: 111 integrations on 153 of 153 possible baselines.
! Apparent sampling: 0.30258 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0136+4751
! 
! 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 1763 lines of history.
! 
! Reading 70368 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 J0136+4751_X_1999_05_10_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 358 telescope corrections were flagged in sub-array 1.
!  A total of 1789 telescope corrections were flagged in sub-array 2.
!  A total of 332 telescope corrections were flagged in sub-array 3.
!  A total of 1311 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 325 telescope corrections were flagged in sub-array 1.
!  A total of 1786 telescope corrections were flagged in sub-array 2.
!  A total of 332 telescope corrections were flagged in sub-array 3.
!  A total of 1302 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 325 telescope corrections were flagged in sub-array 1.
!  A total of 1789 telescope corrections were flagged in sub-array 2.
!  A total of 332 telescope corrections were flagged in sub-array 3.
!  A total of 1302 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 358 telescope corrections were flagged in sub-array 1.
!  A total of 1886 telescope corrections were flagged in sub-array 2.
!  A total of 332 telescope corrections were flagged in sub-array 3.
!  A total of 1400 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.190621Jy  sigma=0.010715
! Fit after  self-cal, rms=0.972641Jy  sigma=0.009277
! 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.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.5518 mas, bmaj=0.7347 mas, bpa=-2.299 degrees
! Estimated noise=657.054 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.39308 Jy
! Component: 100  -  total flux cleaned = 1.72435 Jy
! Total flux subtracted in 100 components = 1.72435 Jy
! Clean residual min=-0.025369 max=0.136067 Jy/beam
! Clean residual mean=0.000845 rms=0.009231 Jy/beam
! Combined flux in latest and established models = 1.72435 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 1.72435 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.414731Jy  sigma=0.003871
! Fit after  self-cal, rms=0.414058Jy  sigma=0.003868
! Inverting map 
! Your choice of large map pixels excluded 2.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.151705 Jy
! Component: 100  -  total flux cleaned = 0.235331 Jy
! Total flux subtracted in 100 components = 0.235331 Jy
! Clean residual min=-0.021762 max=0.059471 Jy/beam
! Clean residual mean=0.000435 rms=0.006411 Jy/beam
! Combined flux in latest and established models = 1.95968 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 1.95968 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320737Jy  sigma=0.002731
! Fit after  self-cal, rms=0.318460Jy  sigma=0.002720
! Inverting map 
! Your choice of large map pixels excluded 2.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Added new window around map position (-0.4, 0.8).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0640547 Jy
! Component: 100  -  total flux cleaned = 0.10421 Jy
! Total flux subtracted in 100 components = 0.10421 Jy
! Clean residual min=-0.019842 max=0.028513 Jy/beam
! Clean residual mean=0.000258 rms=0.005645 Jy/beam
! Combined flux in latest and established models = 2.06389 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 20 components and 2.06389 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.297769Jy  sigma=0.002403
! Fit after  self-cal, rms=0.296873Jy  sigma=0.002397
! Inverting map 
! Your choice of large map pixels excluded 2.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6916 mas, bmaj=0.9332 mas, bpa=-18.27 degrees
! Estimated noise=331.31 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.0712015 Jy
! Component: 100  -  total flux cleaned = 0.109189 Jy
! Component: 150  -  total flux cleaned = 0.132323 Jy
! Component: 200  -  total flux cleaned = 0.146905 Jy
! Total flux subtracted in 200 components = 0.146905 Jy
! Clean residual min=-0.022471 max=0.030842 Jy/beam
! Clean residual mean=-0.000527 rms=0.006519 Jy/beam
! Combined flux in latest and established models = 2.2108 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 34 components and 2.2108 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285994Jy  sigma=0.002158
! Fit after  self-cal, rms=0.285573Jy  sigma=0.002155
! Inverting map 
! Your choice of large map pixels excluded 2.4% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.03     GC        1.15     HH        1.00*    
!   HN        1.02     KK        1.00*    KP        1.12     LA        1.02     
!   MC        0.91     MK        1.00*    NL        1.07     NY        0.99     
!   ON        0.86     OV        1.00*    PT        1.08     SC        1.16     
!   WF        1.00*    WZ        1.09     
! 
!  A total of 36 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.95     GC        1.10     HH        1.00*    
!   HN        0.97     KK        0.93     KP        0.98     LA        0.95     
!   MC        1.23     MK        0.97     NL        1.05     NY        0.94     
!   ON        0.95     OV        0.96     PT        1.01     SC        1.17     
!   WF        0.98     WZ        1.15     
! 
!  A total of 21 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.96     GC        1.03     HH        1.00*    
!   HN        0.96     KK        0.93     KP        0.97     LA        0.94     
!   MC        1.17     MK        0.95     NL        1.02     NY        0.93     
!   ON        0.85     OV        0.96     PT        1.07     SC        1.03     
!   WF        0.97     WZ        1.00*    
! 
!  A total of 93 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.98     GC        1.10     HH        1.00*    
!   HN        0.99     KK        1.09     KP        1.00     LA        0.97     
!   MC        0.96     MK        0.98     NL        1.01     NY        1.01     
!   ON        0.91     OV        0.97     PT        1.03     SC        1.08     
!   WF        1.21     WZ        1.02     
! 
! 
! Correcting IF 2.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        1.02     GC        1.10     HH        1.00*    
!   HN        1.01     KK        1.00*    KP        1.14     LA        1.02     
!   MC        0.92     MK        1.00*    NL        1.03     NY        1.00     
!   ON        0.83     OV        1.00*    PT        1.11     SC        1.14     
!   WF        1.07     WZ        1.12     
! 
!  A total of 39 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.95     GC        1.07     HH        1.00*    
!   HN        0.96     KK        0.94     KP        0.99     LA        0.96     
!   MC        1.26     MK        0.96     NL        1.01     NY        0.95     
!   ON        0.96     OV        0.94     PT        0.96     SC        1.16     
!   WF        1.03     WZ        1.15     
! 
!  A total of 21 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.95     GC        1.02     HH        1.00*    
!   HN        0.96     KK        0.94     KP        0.99     LA        0.95     
!   MC        1.17     MK        0.94     NL        0.98     NY        0.95     
!   ON        0.85     OV        0.93     PT        0.97     SC        1.01     
!   WF        1.01     WZ        1.00*    
! 
!  A total of 78 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.98     GC        1.08     HH        1.00*    
!   HN        0.98     KK        1.11     KP        1.01     LA        0.97     
!   MC        0.96     MK        0.97     NL        0.97     NY        1.03     
!   ON        0.90     OV        0.95     PT        0.95     SC        1.04     
!   WF        1.07     WZ        1.03     
! 
! 
! Correcting IF 3.
!  A total of 6 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.08     FD        1.04     GC        1.18     HH        1.00*    
!   HN        1.02     KK        1.00*    KP        1.15     LA        1.14     
!   MC        0.93     MK        1.00*    NL        1.03     NY        1.03     
!   ON        0.88     OV        1.00*    PT        1.11     SC        1.16     
!   WF        1.04     WZ        1.14     
! 
!  A total of 36 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        0.97     GC        1.06     HH        1.00*    
!   HN        0.98     KK        1.00     KP        1.01     LA        0.95     
!   MC        1.33     MK        0.97     NL        1.01     NY        0.98     
!   ON        0.99     OV        0.96     PT        0.95     SC        1.18     
!   WF        1.03     WZ        1.14     
! 
!  A total of 21 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        0.97     GC        1.02     HH        1.00*    
!   HN        0.96     KK        0.99     KP        1.00     LA        0.94     
!   MC        1.23     MK        0.94     NL        0.97     NY        0.97     
!   ON        0.88     OV        0.87     PT        0.99     SC        1.02     
!   WF        1.01     WZ        1.00*    
! 
!  A total of 78 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        1.00     GC        1.10     HH        1.00*    
!   HN        0.98     KK        1.17     KP        1.03     LA        0.97     
!   MC        0.99     MK        0.95     NL        0.99     NY        1.06     
!   ON        0.95     OV        0.97     PT        0.96     SC        1.05     
!   WF        1.07     WZ        1.04     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.03     GC        1.12     HH        1.00*    
!   HN        1.02     KK        1.00*    KP        1.12     LA        1.14     
!   MC        0.87     MK        1.00*    NL        1.04     NY        1.09     
!   ON        0.86     OV        1.00*    PT        1.15     SC        1.13     
!   WF        1.05     WZ        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.96     GC        1.06     HH        1.00*    
!   HN        0.97     KK        0.97     KP        1.00     LA        0.96     
!   MC        1.32     MK        0.98     NL        1.02     NY        1.02     
!   ON        0.99     OV        0.96     PT        0.94     SC        1.15     
!   WF        1.01     WZ        1.00*    
! 
!  A total of 21 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.96     GC        1.01     HH        1.00*    
!   HN        0.96     KK        0.96     KP        0.98     LA        0.95     
!   MC        1.20     MK        0.95     NL        0.98     NY        1.01     
!   ON        0.88     OV        0.87     PT        1.03     SC        0.98     
!   WF        1.01     WZ        1.00*    
! 
!  A total of 54 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.98     GC        1.11     HH        1.00*    
!   HN        0.98     KK        1.14     KP        1.02     LA        0.98     
!   MC        0.95     MK        0.98     NL        1.00     NY        1.11     
!   ON        0.93     OV        0.98     PT        0.99     SC        1.01     
!   WF        1.07     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.285573Jy  sigma=0.002155
! Fit after  self-cal, rms=0.231815Jy  sigma=0.001570
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6946 mas, bmaj=0.9443 mas, bpa=-19.28 degrees
! Estimated noise=331.519 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.0112759 Jy
! Component: 100  -  total flux cleaned = -0.0128345 Jy
! Component: 150  -  total flux cleaned = -0.0143278 Jy
! Component: 200  -  total flux cleaned = -0.0148743 Jy
! Total flux subtracted in 200 components = -0.0148743 Jy
! Clean residual min=-0.008108 max=0.011045 Jy/beam
! Clean residual mean=-0.000022 rms=0.002360 Jy/beam
! Combined flux in latest and established models = 2.19592 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 38 components and 2.19592 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.230814Jy  sigma=0.001563
! Fit after  self-cal, rms=0.230883Jy  sigma=0.001563
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.230883Jy  sigma=0.001563
! Fit after  self-cal, rms=0.229282Jy  sigma=0.001413
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6951 mas, bmaj=0.9459 mas, bpa=-19.68 degrees
! Estimated noise=331.614 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00833102 Jy
! Component: 100  -  total flux cleaned = -0.00836699 Jy
! Component: 150  -  total flux cleaned = -0.00819946 Jy
! Component: 200  -  total flux cleaned = -0.00770419 Jy
! Total flux subtracted in 200 components = -0.00770419 Jy
! Clean residual min=-0.004017 max=0.010142 Jy/beam
! Clean residual mean=0.000593 rms=0.001292 Jy/beam
! Combined flux in latest and established models = 2.18822 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 39 components and 2.18822 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228503Jy  sigma=0.001407
! Fit after  self-cal, rms=0.228578Jy  sigma=0.001406
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.8, 2.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00988603 Jy
! Component: 100  -  total flux cleaned = 0.0140061 Jy
! Component: 150  -  total flux cleaned = 0.0157349 Jy
! Component: 200  -  total flux cleaned = 0.0167442 Jy
! Total flux subtracted in 200 components = 0.0167442 Jy
! Clean residual min=-0.003214 max=0.004010 Jy/beam
! Clean residual mean=0.000399 rms=0.000945 Jy/beam
! Combined flux in latest and established models = 2.20496 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 61 components and 2.20496 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228157Jy  sigma=0.001399
! Fit after  self-cal, rms=0.228114Jy  sigma=0.001399
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Added new window around map position (-4.2, 3.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00319175 Jy
! Component: 100  -  total flux cleaned = 0.00528754 Jy
! Component: 150  -  total flux cleaned = 0.00649847 Jy
! Component: 200  -  total flux cleaned = 0.00748626 Jy
! Total flux subtracted in 200 components = 0.00748626 Jy
! Clean residual min=-0.003385 max=0.003463 Jy/beam
! Clean residual mean=0.000314 rms=0.000873 Jy/beam
! Combined flux in latest and established models = 2.21245 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 77 components and 2.21245 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.227960Jy  sigma=0.001397
! Fit after  self-cal, rms=0.227951Jy  sigma=0.001396
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.227951Jy  sigma=0.001396
! Fit after  self-cal, rms=0.228432Jy  sigma=0.001393
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6952 mas, bmaj=0.9485 mas, bpa=-19.91 degrees
! Estimated noise=331.719 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00504038 Jy
! Component: 100  -  total flux cleaned = -0.00489132 Jy
! Component: 150  -  total flux cleaned = -0.00379067 Jy
! Component: 200  -  total flux cleaned = -0.00305206 Jy
! Total flux subtracted in 200 components = -0.00305206 Jy
! Clean residual min=-0.002536 max=0.002686 Jy/beam
! Clean residual mean=0.000362 rms=0.000725 Jy/beam
! Combined flux in latest and established models = 2.2094 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 84 components and 2.2094 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228102Jy  sigma=0.001391
! Fit after  self-cal, rms=0.228097Jy  sigma=0.001390
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.000748062 Jy
! Component: 100  -  total flux cleaned = 0.00179989 Jy
! Component: 150  -  total flux cleaned = 0.00266279 Jy
! Component: 200  -  total flux cleaned = 0.0035457 Jy
! Total flux subtracted in 200 components = 0.0035457 Jy
! Clean residual min=-0.002408 max=0.002687 Jy/beam
! Clean residual mean=0.000322 rms=0.000689 Jy/beam
! Combined flux in latest and established models = 2.21294 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 91 components and 2.21294 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228000Jy  sigma=0.001389
! Fit after  self-cal, rms=0.227994Jy  sigma=0.001389
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.227994Jy  sigma=0.001389
! Fit after  self-cal, rms=0.228205Jy  sigma=0.001388
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=2.174 mas, bmaj=2.473 mas, bpa=-46.25 degrees
! Estimated noise=474.295 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00374779 Jy
! Component: 100  -  total flux cleaned = 0.00510152 Jy
! Component: 150  -  total flux cleaned = 0.00602561 Jy
! Component: 200  -  total flux cleaned = 0.00663377 Jy
! Total flux subtracted in 200 components = 0.00663377 Jy
! Clean residual min=-0.002155 max=0.003514 Jy/beam
! Clean residual mean=0.000817 rms=0.000920 Jy/beam
! Combined flux in latest and established models = 2.21957 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 115 components and 2.21957 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228148Jy  sigma=0.001388
! Fit after  self-cal, rms=0.228142Jy  sigma=0.001387
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.000735015 Jy
! Component: 100  -  total flux cleaned = 0.00129611 Jy
! Component: 150  -  total flux cleaned = 0.00171473 Jy
! Component: 200  -  total flux cleaned = 0.00195796 Jy
! Total flux subtracted in 200 components = 0.00195796 Jy
! Clean residual min=-0.002165 max=0.003680 Jy/beam
! Clean residual mean=0.000741 rms=0.000930 Jy/beam
! Combined flux in latest and established models = 2.22153 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 120 components and 2.22153 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.228119Jy  sigma=0.001387
! Fit after  self-cal, rms=0.228119Jy  sigma=0.001387
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6952 mas, bmaj=0.9501 mas, bpa=-20.05 degrees
! Estimated noise=331.796 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6952 x 0.9501 at -20.05 degrees (North through East)
! Clean map  min=-0.0020223  max=1.8987 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.228119Jy  sigma=0.001387
! Fit after  self-cal, rms=0.233639Jy  sigma=0.001234
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6953 mas, bmaj=0.9506 mas, bpa=-20.06 degrees
! Estimated noise=331.422 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00366781 Jy
! Component: 100  -  total flux cleaned = -0.00400414 Jy
! Component: 150  -  total flux cleaned = -0.00400932 Jy
! Component: 200  -  total flux cleaned = -0.0039356 Jy
! Total flux subtracted in 200 components = -0.0039356 Jy
! Clean residual min=-0.002137 max=0.002253 Jy/beam
! Clean residual mean=0.000225 rms=0.000564 Jy/beam
! Combined flux in latest and established models = 2.2176 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 122 components and 2.2176 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233494Jy  sigma=0.001233
! Fit after  self-cal, rms=0.233492Jy  sigma=0.001233
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 3.03626e-05 Jy
! Component: 100  -  total flux cleaned = 0.000158981 Jy
! Component: 150  -  total flux cleaned = 0.00021828 Jy
! Component: 200  -  total flux cleaned = 0.000329287 Jy
! Total flux subtracted in 200 components = 0.000329287 Jy
! Clean residual min=-0.002156 max=0.002281 Jy/beam
! Clean residual mean=0.000221 rms=0.000560 Jy/beam
! Combined flux in latest and established models = 2.21793 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 124 components and 2.21793 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233448Jy  sigma=0.001232
! Fit after  self-cal, rms=0.233448Jy  sigma=0.001232
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.233448Jy  sigma=0.001232
! Fit after  self-cal, rms=0.233746Jy  sigma=0.001232
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.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.5555 mas, bmaj=0.7403 mas, bpa=-4.018 degrees
! Estimated noise=665.251 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.42322 Jy
! Component: 100  -  total flux cleaned = 1.75572 Jy
! Component: 150  -  total flux cleaned = 1.90385 Jy
! Component: 200  -  total flux cleaned = 1.98508 Jy
! Total flux subtracted in 200 components = 1.98508 Jy
! Clean residual min=-0.009749 max=0.041479 Jy/beam
! Clean residual mean=0.000402 rms=0.002958 Jy/beam
! Combined flux in latest and established models = 1.98508 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 12 model components to the UV plane model.
! The established model now contains 12 components and 1.98508 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6953 mas, bmaj=0.9518 mas, bpa=-20.16 degrees
! Estimated noise=331.424 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.0828732 Jy
! Component: 100  -  total flux cleaned = 0.125929 Jy
! Component: 150  -  total flux cleaned = 0.152013 Jy
! Component: 200  -  total flux cleaned = 0.169724 Jy
! Total flux subtracted in 200 components = 0.169724 Jy
! Clean residual min=-0.002899 max=0.009992 Jy/beam
! Clean residual mean=0.000961 rms=0.001531 Jy/beam
! Combined flux in latest and established models = 2.1548 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 36 components and 2.1548 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Added new window around map position (-1, 0.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0125973 Jy
! Component: 100  -  total flux cleaned = 0.0219575 Jy
! Component: 150  -  total flux cleaned = 0.0291575 Jy
! Component: 200  -  total flux cleaned = 0.0349709 Jy
! Total flux subtracted in 200 components = 0.0349709 Jy
! Clean residual min=-0.002404 max=0.003492 Jy/beam
! Clean residual mean=0.000529 rms=0.000791 Jy/beam
! Combined flux in latest and established models = 2.18977 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 68 components and 2.18977 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00475214 Jy
! Component: 100  -  total flux cleaned = 0.00869086 Jy
! Component: 150  -  total flux cleaned = 0.0116186 Jy
! Component: 200  -  total flux cleaned = 0.0136961 Jy
! Total flux subtracted in 200 components = 0.0136961 Jy
! Clean residual min=-0.002394 max=0.002577 Jy/beam
! Clean residual mean=0.000366 rms=0.000608 Jy/beam
! Combined flux in latest and established models = 2.20347 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 86 components and 2.20347 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 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.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=2.174 mas, bmaj=2.474 mas, bpa=-46.19 degrees
! Estimated noise=473.112 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00573191 Jy
! Component: 100  -  total flux cleaned = 0.00912983 Jy
! Component: 150  -  total flux cleaned = 0.0113457 Jy
! Component: 200  -  total flux cleaned = 0.0128228 Jy
! Total flux subtracted in 200 components = 0.0128228 Jy
! Clean residual min=-0.001528 max=0.003547 Jy/beam
! Clean residual mean=0.000762 rms=0.000814 Jy/beam
! Combined flux in latest and established models = 2.21629 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)
! Added new window around map position (4.8, 8.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00347717 Jy
! Component: 100  -  total flux cleaned = 0.00533349 Jy
! Component: 150  -  total flux cleaned = 0.00651744 Jy
! Component: 200  -  total flux cleaned = 0.00720137 Jy
! Total flux subtracted in 200 components = 0.00720137 Jy
! Clean residual min=-0.001537 max=0.002696 Jy/beam
! Clean residual mean=0.000509 rms=0.000680 Jy/beam
! Combined flux in latest and established models = 2.22349 Jy
! Adding 74 model components to the UV plane model.
! The established model now contains 149 components and 2.22349 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! Estimated beam: bmin=0.6953 mas, bmaj=0.9518 mas, bpa=-20.16 degrees
! Estimated noise=331.424 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000129755 Jy
! Component: 100  -  total flux cleaned = 0.000481913 Jy
! Component: 150  -  total flux cleaned = 0.000829997 Jy
! Component: 200  -  total flux cleaned = 0.00102138 Jy
! Total flux subtracted in 200 components = 0.00102138 Jy
! Clean residual min=-0.002296 max=0.002038 Jy/beam
! Clean residual mean=0.000135 rms=0.000514 Jy/beam
! Combined flux in latest and established models = 2.22451 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 162 components and 2.22451 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233828Jy  sigma=0.001233
! Fit after  self-cal, rms=0.233799Jy  sigma=0.001233
wmodel J0136+4751_X_1999_05_10_pus_map.mod
! Writing 162 model components to file: J0136+4751_X_1999_05_10_pus_map.mod
wobs J0136+4751_X_1999_05_10_pus_uvs.fits
! Writing UV FITS file: J0136+4751_X_1999_05_10_pus_uvs.fits
wwins J0136+4751_X_1999_05_10_pus_map.win
! wwins: Wrote 6 windows to J0136+4751_X_1999_05_10_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.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.000603176 Jy
! Component: 100  -  total flux cleaned = -0.000535542 Jy
! Component: 150  -  total flux cleaned = -0.000138706 Jy
! Component: 200  -  total flux cleaned = 0.000210011 Jy
! Component: 250  -  total flux cleaned = 0.000577529 Jy
! Component: 300  -  total flux cleaned = 0.000935355 Jy
! Component: 350  -  total flux cleaned = 0.00125583 Jy
! Component: 400  -  total flux cleaned = 0.00159836 Jy
! Component: 450  -  total flux cleaned = 0.00185026 Jy
! Component: 500  -  total flux cleaned = 0.0020981 Jy
! Component: 550  -  total flux cleaned = 0.00236884 Jy
! Component: 600  -  total flux cleaned = 0.00255572 Jy
! Component: 650  -  total flux cleaned = 0.00281904 Jy
! Component: 700  -  total flux cleaned = 0.0030009 Jy
! Component: 750  -  total flux cleaned = 0.00320637 Jy
! Component: 800  -  total flux cleaned = 0.00338406 Jy
! Component: 850  -  total flux cleaned = 0.00358485 Jy
! Component: 900  -  total flux cleaned = 0.00378356 Jy
! Component: 950  -  total flux cleaned = 0.00398033 Jy
! Component: 1000  -  total flux cleaned = 0.00415069 Jy
! Total flux subtracted in 1024 components = 0.00419907 Jy
! Clean residual min=-0.001209 max=0.001386 Jy/beam
! Clean residual mean=0.000095 rms=0.000444 Jy/beam
! Combined flux in latest and established models = 2.22871 Jy
keep
! Adding 74 model components to the UV plane model.
! The established model now contains 231 components and 2.22871 Jy
![Exited script file: muppet]
wmap "J0136+4751_X_1999_05_10_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6953 x 0.9518 at -20.16 degrees (North through East)
! Clean map  min=-0.001831  max=1.8987 Jy/beam
! Writing clean map to FITS file: J0136+4751_X_1999_05_10_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.89874 
invert
! Inverting map 
! Your choice of large map pixels excluded 2.32% of the data.
!  The x-axis pixel size should ideally be below 0.1646 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1859 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000444389 
device "J0136+4751_X_1999_05_10_pus\_map.eps/VPS"
! Attempting to open device: 'J0136+4751_X_1999_05_10_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0702131 0.0702131 0.140426 0.280853 0.561705 1.12341 2.24682 4.49364 8.98728 17.9746 35.9491 71.8982
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0013 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.898 
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.6953 x 0.9518 at -20.16 degrees (North through East)
! Clean map  min=-0.001831  max=1.8987 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0136+4751_X_1999_05_10_pus\_map.gif/vgif"
! Attempting to open device: 'J0136+4751_X_1999_05_10_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0136+4751_X_1999_05_10_pus_uvs.log closed on Mon Jan 14 17:02:50 2008