! Started logfile: J0958+4725_X_1999_03_08_pus_uvs.log on Thu Jan  3 14:40:19 2008
obs J0958+4725_X_1999_03_08_pus_uva.fits
! Reading UV FITS file: J0958+4725_X_1999_03_08_pus_uva.fits
! AN table 1: 207 integrations on 190 of 190 possible baselines.
! AN table 2: 266 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.179203 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0958+4725
! 
! 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 2464 lines of history.
! 
! Reading 64420 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 J0958+4725_X_1999_03_08_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 2581 telescope corrections were flagged in sub-array 1.
!  A total of 3629 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 2581 telescope corrections were flagged in sub-array 1.
!  A total of 3628 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 2582 telescope corrections were flagged in sub-array 1.
!  A total of 3629 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 2581 telescope corrections were flagged in sub-array 1.
!  A total of 3628 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.838668Jy  sigma=0.006774
! Fit after  self-cal, rms=0.507159Jy  sigma=0.003952
! 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 0.518% of the data.
!  The x-axis pixel size should ideally be below 0.1823 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.5981 mas, bmaj=0.6658 mas, bpa=32.62 degrees
! Estimated noise=777.185 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.433528 Jy
! Component: 100  -  total flux cleaned = 0.538946 Jy
! Total flux subtracted in 100 components = 0.538946 Jy
! Clean residual min=-0.016404 max=0.044431 Jy/beam
! Clean residual mean=0.000124 rms=0.004721 Jy/beam
! Combined flux in latest and established models = 0.538946 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.538946 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.306001Jy  sigma=0.001835
! Fit after  self-cal, rms=0.306004Jy  sigma=0.001835
! Inverting map 
! Your choice of large map pixels excluded 0.518% of the data.
!  The x-axis pixel size should ideally be below 0.1823 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0536615 Jy
! Component: 100  -  total flux cleaned = 0.0890718 Jy
! Total flux subtracted in 100 components = 0.0890718 Jy
! Clean residual min=-0.013067 max=0.018933 Jy/beam
! Clean residual mean=0.000006 rms=0.003584 Jy/beam
! Combined flux in latest and established models = 0.628018 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 14 components and 0.628018 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.293889Jy  sigma=0.001575
! Fit after  self-cal, rms=0.293913Jy  sigma=0.001575
! Inverting map 
! Your choice of large map pixels excluded 0.518% of the data.
!  The x-axis pixel size should ideally be below 0.1823 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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 0.518% of the data.
!  The x-axis pixel size should ideally be below 0.1823 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7906 mas, bmaj=0.8455 mas, bpa=29.88 degrees
! Estimated noise=325.282 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.0316901 Jy
! Component: 100  -  total flux cleaned = 0.0443773 Jy
! Component: 150  -  total flux cleaned = 0.0501559 Jy
! Component: 200  -  total flux cleaned = 0.0529522 Jy
! Total flux subtracted in 200 components = 0.0529522 Jy
! Clean residual min=-0.008756 max=0.006814 Jy/beam
! Clean residual mean=-0.000819 rms=0.002261 Jy/beam
! Combined flux in latest and established models = 0.68097 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 15 components and 0.68097 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.291680Jy  sigma=0.001512
! Fit after  self-cal, rms=0.291677Jy  sigma=0.001511
! Inverting map 
! Your choice of large map pixels excluded 0.518% of the data.
!  The x-axis pixel size should ideally be below 0.1823 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.04     GC        1.18     GG        1.00*    
!   HN        1.01     KP        0.99     LA        0.98     NL        0.90     
!   OV        0.99     PT        0.99     SC        1.00*    WF        1.02     
!   GN        0.99     HH        1.00*    KK        0.95     MC        1.36     
!   MK        0.96     NY        0.93     ON        1.02     WZ        1.09     
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.06     FD        0.98     GC        1.03     GG        1.00*    
!   HN        0.99     KP        0.98     LA        0.97     NL        1.05     
!   OV        0.97     PT        1.00     SC        0.97     WF        0.99     
!   GN        0.93     HH        1.00*    KK        0.95     MC        1.00*    
!   MK        1.00     NY        0.96     ON        1.00     WZ        3.04     
! 
! 
! Correcting IF 2.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.55     GC        1.21     GG        1.00*    
!   HN        0.97     KP        1.00     LA        1.00     NL        0.92     
!   OV        0.99     PT        0.99     SC        1.00*    WF        0.98     
!   GN        0.99     HH        1.00*    KK        1.15     MC        1.33     
!   MK        0.97     NY        0.93     ON        0.99     WZ        1.09     
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.09     FD        0.98     GC        1.04     GG        1.00*    
!   HN        0.98     KP        0.98     LA        0.97     NL        1.00     
!   OV        0.97     PT        0.99     SC        0.95     WF        1.00     
!   GN        0.93     HH        1.00*    KK        0.96     MC        1.00*    
!   MK        1.00     NY        0.96     ON        1.00     WZ        3.30     
! 
! 
! Correcting IF 3.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.04     GC        1.40     GG        1.00*    
!   HN        0.99     KP        1.01     LA        0.99     NL        0.89     
!   OV        0.99     PT        0.99     SC        1.00*    WF        1.00     
!   GN        1.02     HH        1.00*    KK        0.95     MC        1.35     
!   MK        0.96     NY        0.96     ON        0.99     WZ        1.17     
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        0.98     GC        1.06     GG        1.00*    
!   HN        0.98     KP        0.98     LA        0.98     NL        1.00     
!   OV        0.97     PT        1.01     SC        0.99     WF        0.99     
!   GN        0.93     HH        1.00*    KK        0.97     MC        1.00*    
!   MK        0.98     NY        0.97     ON        1.01     WZ        3.13     
! 
! 
! Correcting IF 4.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.03     GC        1.22     GG        1.00*    
!   HN        1.02     KP        1.01     LA        1.00     NL        0.91     
!   OV        0.99     PT        0.99     SC        1.00*    WF        1.06     
!   GN        1.01     HH        1.00*    KK        0.95     MC        1.37     
!   MK        0.95     NY        0.93     ON        0.98     WZ        1.14     
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.12     FD        0.97     GC        1.04     GG        1.00*    
!   HN        0.99     KP        0.98     LA        0.97     NL        1.03     
!   OV        0.97     PT        1.00     SC        0.98     WF        1.00     
!   GN        0.93     HH        1.00*    KK        0.95     MC        1.00*    
!   MK        1.00     NY        0.94     ON        0.98     WZ        3.60     
! 
! 
! Fit before self-cal, rms=0.291677Jy  sigma=0.001511
! Fit after  self-cal, rms=0.297992Jy  sigma=0.001388
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.8001 mas, bmaj=0.85 mas, bpa=29.04 degrees
! Estimated noise=326.114 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.00302886 Jy
! Component: 100  -  total flux cleaned = -0.0032377 Jy
! Component: 150  -  total flux cleaned = -0.00329181 Jy
! Component: 200  -  total flux cleaned = -0.00333572 Jy
! Total flux subtracted in 200 components = -0.00333572 Jy
! Clean residual min=-0.004290 max=0.003661 Jy/beam
! Clean residual mean=-0.000261 rms=0.001117 Jy/beam
! Combined flux in latest and established models = 0.677634 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 16 components and 0.677634 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.297938Jy  sigma=0.001388
! Fit after  self-cal, rms=0.298162Jy  sigma=0.001388
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.298162Jy  sigma=0.001388
! Fit after  self-cal, rms=0.299561Jy  sigma=0.001349
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7988 mas, bmaj=0.8497 mas, bpa=28.09 degrees
! Estimated noise=326.102 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000464448 Jy
! Component: 100  -  total flux cleaned = 0.000461282 Jy
! Component: 150  -  total flux cleaned = 0.000462163 Jy
! Component: 200  -  total flux cleaned = 0.000463357 Jy
! Total flux subtracted in 200 components = 0.000463357 Jy
! Clean residual min=-0.002241 max=0.002439 Jy/beam
! Clean residual mean=0.000162 rms=0.000626 Jy/beam
! Combined flux in latest and established models = 0.678098 Jy
selfcal
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 16 components and 0.678098 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299541Jy  sigma=0.001349
! Fit after  self-cal, rms=0.299609Jy  sigma=0.001349
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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 = 1.52289e-05 Jy
! Component: 100  -  total flux cleaned = 6.52518e-05 Jy
! Component: 150  -  total flux cleaned = 8.8977e-05 Jy
! Component: 200  -  total flux cleaned = 0.00013393 Jy
! Total flux subtracted in 200 components = 0.00013393 Jy
! Clean residual min=-0.002347 max=0.002415 Jy/beam
! Clean residual mean=0.000159 rms=0.000624 Jy/beam
! Combined flux in latest and established models = 0.678232 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 17 components and 0.678231 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299604Jy  sigma=0.001349
! Fit after  self-cal, rms=0.299602Jy  sigma=0.001349
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.299602Jy  sigma=0.001349
! Fit after  self-cal, rms=0.299888Jy  sigma=0.001348
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7986 mas, bmaj=0.8497 mas, bpa=27.09 degrees
! Estimated noise=326.029 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000232203 Jy
! Component: 100  -  total flux cleaned = -0.00023259 Jy
! Component: 150  -  total flux cleaned = -0.000235289 Jy
! Component: 200  -  total flux cleaned = -0.000236189 Jy
! Total flux subtracted in 200 components = -0.000236189 Jy
! Clean residual min=-0.002102 max=0.002464 Jy/beam
! Clean residual mean=0.000192 rms=0.000629 Jy/beam
! Combined flux in latest and established models = 0.677995 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 19 components and 0.677995 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299875Jy  sigma=0.001348
! Fit after  self-cal, rms=0.299878Jy  sigma=0.001348
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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 = 1.4675e-05 Jy
! Component: 100  -  total flux cleaned = 5.62397e-05 Jy
! Component: 150  -  total flux cleaned = 7.67933e-05 Jy
! Component: 200  -  total flux cleaned = 0.000112881 Jy
! Total flux subtracted in 200 components = 0.000112881 Jy
! Clean residual min=-0.002155 max=0.002448 Jy/beam
! Clean residual mean=0.000190 rms=0.000627 Jy/beam
! Combined flux in latest and established models = 0.678108 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 20 components and 0.678108 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299874Jy  sigma=0.001348
! Fit after  self-cal, rms=0.299872Jy  sigma=0.001348
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.299872Jy  sigma=0.001348
! Fit after  self-cal, rms=0.299879Jy  sigma=0.001348
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=2.523 mas, bmaj=2.83 mas, bpa=-46.16 degrees
! Estimated noise=460.154 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000745792 Jy
! Component: 100  -  total flux cleaned = 0.000741942 Jy
! Component: 150  -  total flux cleaned = 0.000739931 Jy
! Component: 200  -  total flux cleaned = 0.000738539 Jy
! Total flux subtracted in 200 components = 0.000738539 Jy
! Clean residual min=-0.002102 max=0.002809 Jy/beam
! Clean residual mean=0.000536 rms=0.000943 Jy/beam
! Combined flux in latest and established models = 0.678847 Jy
selfcal
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 21 components and 0.678847 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299881Jy  sigma=0.001348
! Fit after  self-cal, rms=0.299870Jy  sigma=0.001347
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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 = -4.50255e-06 Jy
! Component: 100  -  total flux cleaned = -4.63505e-06 Jy
! Component: 150  -  total flux cleaned = -3.95306e-06 Jy
! Component: 200  -  total flux cleaned = -3.30194e-06 Jy
! Total flux subtracted in 200 components = -3.30194e-06 Jy
! Clean residual min=-0.002108 max=0.002787 Jy/beam
! Clean residual mean=0.000536 rms=0.000942 Jy/beam
! Combined flux in latest and established models = 0.678843 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 21 components and 0.678843 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299872Jy  sigma=0.001348
! Fit after  self-cal, rms=0.299867Jy  sigma=0.001347
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7986 mas, bmaj=0.8498 mas, bpa=26.33 degrees
! Estimated noise=326.061 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7986 x 0.8498 at 26.33 degrees (North through East)
! Clean map  min=-0.0018004  max=0.59739 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.299867Jy  sigma=0.001347
! Fit after  self-cal, rms=0.645755Jy  sigma=0.001236
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7984 mas, bmaj=0.8495 mas, bpa=27.36 degrees
! Estimated noise=326.206 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 3.47981e-05 Jy
! Component: 100  -  total flux cleaned = 0.000126444 Jy
! Component: 150  -  total flux cleaned = 0.000151676 Jy
! Component: 200  -  total flux cleaned = 0.000151112 Jy
! Total flux subtracted in 200 components = 0.000151112 Jy
! Clean residual min=-0.001886 max=0.001810 Jy/beam
! Clean residual mean=0.000133 rms=0.000479 Jy/beam
! Combined flux in latest and established models = 0.678995 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 21 components and 0.678995 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.645754Jy  sigma=0.001236
! Fit after  self-cal, rms=0.645754Jy  sigma=0.001236
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.76572e-05 Jy
! Component: 100  -  total flux cleaned = 1.7627e-05 Jy
! Component: 150  -  total flux cleaned = 3.48041e-07 Jy
! Component: 200  -  total flux cleaned = -1.55988e-05 Jy
! Total flux subtracted in 200 components = -1.55988e-05 Jy
! Clean residual min=-0.001939 max=0.001818 Jy/beam
! Clean residual mean=0.000133 rms=0.000479 Jy/beam
! Combined flux in latest and established models = 0.678979 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 22 components and 0.678979 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.645754Jy  sigma=0.001236
! Fit after  self-cal, rms=0.645753Jy  sigma=0.001236
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.645753Jy  sigma=0.001236
! Fit after  self-cal, rms=0.640574Jy  sigma=0.001236
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.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.5993 mas, bmaj=0.6855 mas, bpa=32.62 degrees
! Estimated noise=780.918 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.442822 Jy
! Component: 100  -  total flux cleaned = 0.548668 Jy
! Component: 150  -  total flux cleaned = 0.596411 Jy
! Component: 200  -  total flux cleaned = 0.624559 Jy
! Total flux subtracted in 200 components = 0.624559 Jy
! Clean residual min=-0.004635 max=0.014791 Jy/beam
! Clean residual mean=0.000081 rms=0.001551 Jy/beam
! Combined flux in latest and established models = 0.624559 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 0.624559 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7987 mas, bmaj=0.8494 mas, bpa=26.91 degrees
! Estimated noise=326.349 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.0269023 Jy
! Component: 100  -  total flux cleaned = 0.0401886 Jy
! Component: 150  -  total flux cleaned = 0.0471594 Jy
! Component: 200  -  total flux cleaned = 0.050864 Jy
! Total flux subtracted in 200 components = 0.050864 Jy
! Clean residual min=-0.001712 max=0.003439 Jy/beam
! Clean residual mean=0.000186 rms=0.000552 Jy/beam
! Combined flux in latest and established models = 0.675423 Jy
! Adding 14 model components to the UV plane model.
! The established model now contains 20 components and 0.675423 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Added new window around map position (0.4, -0.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00266074 Jy
! Component: 100  -  total flux cleaned = 0.00321585 Jy
! Component: 150  -  total flux cleaned = 0.00341119 Jy
! Component: 200  -  total flux cleaned = 0.00353218 Jy
! Total flux subtracted in 200 components = 0.00353218 Jy
! Clean residual min=-0.001542 max=0.001839 Jy/beam
! Clean residual mean=0.000132 rms=0.000477 Jy/beam
! Combined flux in latest and established models = 0.678955 Jy
! Adding 16 model components to the UV plane model.
! The established model now contains 32 components and 0.678955 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 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.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=2.524 mas, bmaj=2.831 mas, bpa=-46.22 degrees
! Estimated noise=460.601 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00114023 Jy
! Component: 100  -  total flux cleaned = 0.00140057 Jy
! Component: 150  -  total flux cleaned = 0.00142532 Jy
! Component: 200  -  total flux cleaned = 0.00144061 Jy
! Total flux subtracted in 200 components = 0.00144061 Jy
! Clean residual min=-0.001465 max=0.002495 Jy/beam
! Clean residual mean=0.000340 rms=0.000628 Jy/beam
! Combined flux in latest and established models = 0.680396 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 = 2.12996e-05 Jy
! Component: 100  -  total flux cleaned = 3.44646e-05 Jy
! Component: 150  -  total flux cleaned = 4.70606e-05 Jy
! Component: 200  -  total flux cleaned = 5.28627e-05 Jy
! Total flux subtracted in 200 components = 5.28627e-05 Jy
! Clean residual min=-0.001464 max=0.002497 Jy/beam
! Clean residual mean=0.000337 rms=0.000627 Jy/beam
! Combined flux in latest and established models = 0.680449 Jy
! Adding 14 model components to the UV plane model.
! The established model now contains 45 components and 0.680449 Jy
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! Estimated beam: bmin=0.7987 mas, bmaj=0.8494 mas, bpa=26.91 degrees
! Estimated noise=326.349 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000600726 Jy
! Component: 100  -  total flux cleaned = -0.00055068 Jy
! Component: 150  -  total flux cleaned = -0.000550887 Jy
! Component: 200  -  total flux cleaned = -0.000506897 Jy
! Total flux subtracted in 200 components = -0.000506897 Jy
! Clean residual min=-0.001481 max=0.001821 Jy/beam
! Clean residual mean=0.000117 rms=0.000466 Jy/beam
! Combined flux in latest and established models = 0.679942 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 50 components and 0.679942 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.640563Jy  sigma=0.001236
! Fit after  self-cal, rms=0.640639Jy  sigma=0.001236
wmodel J0958+4725_X_1999_03_08_pus_map.mod
! Writing 50 model components to file: J0958+4725_X_1999_03_08_pus_map.mod
wobs J0958+4725_X_1999_03_08_pus_uvs.fits
! Writing UV FITS file: J0958+4725_X_1999_03_08_pus_uvs.fits
wwins J0958+4725_X_1999_03_08_pus_map.win
! wwins: Wrote 2 windows to J0958+4725_X_1999_03_08_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.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.00081469 Jy
! Component: 100  -  total flux cleaned = 0.00138364 Jy
! Component: 150  -  total flux cleaned = 0.00183575 Jy
! Component: 200  -  total flux cleaned = 0.00224109 Jy
! Component: 250  -  total flux cleaned = 0.00252865 Jy
! Component: 300  -  total flux cleaned = 0.00275793 Jy
! Component: 350  -  total flux cleaned = 0.00298192 Jy
! Component: 400  -  total flux cleaned = 0.0032261 Jy
! Component: 450  -  total flux cleaned = 0.00346564 Jy
! Component: 500  -  total flux cleaned = 0.00363042 Jy
! Component: 550  -  total flux cleaned = 0.00381604 Jy
! Component: 600  -  total flux cleaned = 0.00395345 Jy
! Component: 650  -  total flux cleaned = 0.00420136 Jy
! Component: 700  -  total flux cleaned = 0.00433469 Jy
! Component: 750  -  total flux cleaned = 0.00446662 Jy
! Component: 800  -  total flux cleaned = 0.00457529 Jy
! Component: 850  -  total flux cleaned = 0.0047044 Jy
! Component: 900  -  total flux cleaned = 0.00483233 Jy
! Component: 950  -  total flux cleaned = 0.00495874 Jy
! Component: 1000  -  total flux cleaned = 0.00504199 Jy
! Total flux subtracted in 1024 components = 0.00506268 Jy
! Clean residual min=-0.001392 max=0.001295 Jy/beam
! Clean residual mean=0.000047 rms=0.000394 Jy/beam
! Combined flux in latest and established models = 0.685004 Jy
keep
! Adding 83 model components to the UV plane model.
! The established model now contains 133 components and 0.685004 Jy
![Exited script file: muppet]
wmap "J0958+4725_X_1999_03_08_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7987 x 0.8494 at 26.91 degrees (North through East)
! Clean map  min=-0.0017997  max=0.59818 Jy/beam
! Writing clean map to FITS file: J0958+4725_X_1999_03_08_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.598179 
invert
! Inverting map 
! Your choice of large map pixels excluded 0.486% of the data.
!  The x-axis pixel size should ideally be below 0.1924 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1914 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000393825 
device "J0958+4725_X_1999_03_08_pus\_map.eps/VPS"
! Attempting to open device: 'J0958+4725_X_1999_03_08_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.197512 0.197512 0.395024 0.790048 1.5801 3.16019 6.32038 12.6408 25.2815 50.5631
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.598 
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.7987 x 0.8494 at 26.91 degrees (North through East)
! Clean map  min=-0.0017997  max=0.59818 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0958+4725_X_1999_03_08_pus\_map.gif/vgif"
! Attempting to open device: 'J0958+4725_X_1999_03_08_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0958+4725_X_1999_03_08_pus_uvs.log closed on Thu Jan  3 14:40:43 2008