! Started logfile: J1357+7643_S_1998_10_01_pus_uvs.log on Fri Feb  8 11:51:15 2008
obs J1357+7643_S_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1357+7643_S_1998_10_01_pus_uva.fits
! AN table 1: 404 integrations on 136 of 136 possible baselines.
! AN table 2: 215 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.327936 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1357+7643
! 
! 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  2.22298e+09        4e+06          1        4e+06
!  02        2  2.24298e+09        4e+06          1        4e+06
!  03        3  2.33298e+09        4e+06          1        4e+06
!  04        4  2.36298e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 1541 lines of history.
! 
! Reading 110428 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 = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J1357+7643_S_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 = 512x512 pixels with 0.500x0.500 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 3124 telescope corrections were flagged in sub-array 1.
!  A total of 2156 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 3124 telescope corrections were flagged in sub-array 1.
!  A total of 2156 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 3124 telescope corrections were flagged in sub-array 1.
!  A total of 2156 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 3127 telescope corrections were flagged in sub-array 1.
!  A total of 2156 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.819399Jy  sigma=0.005088
! Fit after  self-cal, rms=0.692480Jy  sigma=0.004378
! 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 
! Estimated beam: bmin=2.125 mas, bmaj=2.504 mas, bpa=46.86 degrees
! Estimated noise=682.786 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.370352 Jy
! Component: 100  -  total flux cleaned = 0.451113 Jy
! Total flux subtracted in 100 components = 0.451113 Jy
! Clean residual min=-0.010604 max=0.022598 Jy/beam
! Clean residual mean=0.000046 rms=0.002563 Jy/beam
! Combined flux in latest and established models = 0.451113 Jy
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 0.451113 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.462263Jy  sigma=0.002521
! Fit after  self-cal, rms=0.462244Jy  sigma=0.002521
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0231062 Jy
! Component: 100  -  total flux cleaned = 0.0348316 Jy
! Total flux subtracted in 100 components = 0.0348316 Jy
! Clean residual min=-0.010313 max=0.009828 Jy/beam
! Clean residual mean=0.000033 rms=0.002374 Jy/beam
! Combined flux in latest and established models = 0.485944 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.485944 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460879Jy  sigma=0.002508
! Fit after  self-cal, rms=0.460862Jy  sigma=0.002508
! Inverting map 
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 
! Estimated beam: bmin=2.589 mas, bmaj=3.105 mas, bpa=53.36 degrees
! Estimated noise=320.169 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, -3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0115109 Jy
! Component: 100  -  total flux cleaned = 0.0182885 Jy
! Component: 150  -  total flux cleaned = 0.0224634 Jy
! Component: 200  -  total flux cleaned = 0.0239163 Jy
! Total flux subtracted in 200 components = 0.0239163 Jy
! Clean residual min=-0.004606 max=0.005161 Jy/beam
! Clean residual mean=0.000079 rms=0.001242 Jy/beam
! Combined flux in latest and established models = 0.509861 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 29 components and 0.509861 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460556Jy  sigma=0.002505
! Fit after  self-cal, rms=0.460523Jy  sigma=0.002504
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 162 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.00     GC        1.04     HN        0.98     
!   KK        0.96     KP        0.98     LA        0.96     MK        0.95     
!   NL        1.00     NY        0.95     ON        0.99     OV        1.00     
!   PT        1.03     SC        1.11     WF        0.95     MC        1.01     
!   GN        0.96     
! 
!  A total of 195 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.02     GC        1.00     HN        0.98     
!   KK        1.02     KP        0.99     LA        0.97     MK        1.00     
!   NL        1.01     NY        0.98     ON        0.58     OV        1.02     
!   PT        1.04     SC        1.00*    WF        0.98     MC        1.08     
!   GN        0.98     
! 
! 
! Correcting IF 2.
!  A total of 162 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.01     GC        0.99     HN        1.05     
!   KK        0.98     KP        0.98     LA        1.01     MK        1.05     
!   NL        0.99     NY        0.99     ON        1.05     OV        0.98     
!   PT        0.99     SC        1.11     WF        1.05     MC        1.23     
!   GN        0.96     
! 
!  A total of 195 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.04     GC        1.03     HN        1.05     
!   KK        1.04     KP        1.01     LA        1.03     MK        1.08     
!   NL        0.98     NY        1.02     ON        0.65     OV        0.98     
!   PT        1.02     SC        1.00*    WF        1.01     MC        1.04     
!   GN        1.02     
! 
! 
! Correcting IF 3.
!  A total of 162 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.04     GC        1.03     HN        1.00     
!   KK        0.99     KP        1.00     LA        1.00     MK        0.98     
!   NL        1.00     NY        0.97     ON        0.90     OV        0.97     
!   PT        1.00     SC        1.08     WF        1.01     MC        0.84     
!   GN        0.97     
! 
!  A total of 195 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.07     GC        1.00     HN        0.99     
!   KK        1.02     KP        1.02     LA        1.01     MK        0.99     
!   NL        0.99     NY        1.03     ON        0.66     OV        1.02     
!   PT        1.02     SC        1.00*    WF        0.97     MC        1.21     
!   GN        0.96     
! 
! 
! Correcting IF 4.
!  A total of 159 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.01     GC        1.04     HN        0.99     
!   KK        0.97     KP        1.01     LA        1.00     MK        0.96     
!   NL        0.96     NY        0.98     ON        0.95     OV        1.01     
!   PT        0.99     SC        1.07     WF        0.99     MC        1.04     
!   GN        0.96     
! 
!  A total of 195 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.03     GC        0.98     HN        0.96     
!   KK        1.03     KP        1.03     LA        1.01     MK        1.00     
!   NL        0.98     NY        1.00     ON        0.56     OV        1.04     
!   PT        1.04     SC        1.00*    WF        0.93     MC        0.88     
!   GN        1.01     
! 
! 
! Fit before self-cal, rms=0.460523Jy  sigma=0.002504
! Fit after  self-cal, rms=0.450865Jy  sigma=0.002502
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.602 mas, bmaj=3.115 mas, bpa=53.86 degrees
! Estimated noise=320.377 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.00181053 Jy
! Component: 100  -  total flux cleaned = 0.00238899 Jy
! Component: 150  -  total flux cleaned = 0.0028711 Jy
! Component: 200  -  total flux cleaned = 0.00328582 Jy
! Total flux subtracted in 200 components = 0.00328582 Jy
! Clean residual min=-0.003913 max=0.004018 Jy/beam
! Clean residual mean=0.000021 rms=0.000998 Jy/beam
! Combined flux in latest and established models = 0.513146 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 42 components and 0.513146 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.450829Jy  sigma=0.002502
! Fit after  self-cal, rms=0.450856Jy  sigma=0.002501
! Inverting map 
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.450856Jy  sigma=0.002501
! Fit after  self-cal, rms=0.457889Jy  sigma=0.002491
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.605 mas, bmaj=3.107 mas, bpa=54.47 degrees
! Estimated noise=321.201 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.002523 Jy
! Component: 100  -  total flux cleaned = 0.0032219 Jy
! Component: 150  -  total flux cleaned = 0.00366883 Jy
! Component: 200  -  total flux cleaned = 0.00376232 Jy
! Total flux subtracted in 200 components = 0.00376232 Jy
! Clean residual min=-0.003238 max=0.003645 Jy/beam
! Clean residual mean=0.000011 rms=0.000792 Jy/beam
! Combined flux in latest and established models = 0.516909 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 52 components and 0.516909 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.457858Jy  sigma=0.002491
! Fit after  self-cal, rms=0.458271Jy  sigma=0.002491
flux_cutoff = imstat(rms) * dynam
! Inverting map 
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 (-7, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00345278 Jy
! Component: 100  -  total flux cleaned = 0.00518032 Jy
! Component: 150  -  total flux cleaned = 0.00558707 Jy
! Component: 200  -  total flux cleaned = 0.00558686 Jy
! Total flux subtracted in 200 components = 0.00558686 Jy
! Clean residual min=-0.003271 max=0.003805 Jy/beam
! Clean residual mean=0.000012 rms=0.000773 Jy/beam
! Combined flux in latest and established models = 0.522495 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 72 components and 0.522496 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.458237Jy  sigma=0.002490
! Fit after  self-cal, rms=0.458240Jy  sigma=0.002490
! Inverting map 
! Added new window around map position (-1.5, -38).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00149503 Jy
! Component: 100  -  total flux cleaned = 0.00146097 Jy
! Component: 150  -  total flux cleaned = 0.00151964 Jy
! Component: 200  -  total flux cleaned = 0.00142117 Jy
! Total flux subtracted in 200 components = 0.00142117 Jy
! Clean residual min=-0.003159 max=0.002929 Jy/beam
! Clean residual mean=0.000011 rms=0.000759 Jy/beam
! Combined flux in latest and established models = 0.523917 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 83 components and 0.523917 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.458207Jy  sigma=0.002490
! Fit after  self-cal, rms=0.458203Jy  sigma=0.002490
! Inverting map 
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.458203Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460287Jy  sigma=0.002490
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.601 mas, bmaj=3.105 mas, bpa=54.79 degrees
! Estimated noise=321.575 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00172345 Jy
! Component: 100  -  total flux cleaned = 0.00208731 Jy
! Component: 150  -  total flux cleaned = 0.00214014 Jy
! Component: 200  -  total flux cleaned = 0.00228909 Jy
! Total flux subtracted in 200 components = 0.00228909 Jy
! Clean residual min=-0.003112 max=0.002944 Jy/beam
! Clean residual mean=0.000006 rms=0.000744 Jy/beam
! Combined flux in latest and established models = 0.526206 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 93 components and 0.526206 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460267Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460317Jy  sigma=0.002490
flux_cutoff = imstat(rms) * dynam
! Inverting map 
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.000112494 Jy
! Component: 100  -  total flux cleaned = 2.13057e-05 Jy
! Component: 150  -  total flux cleaned = -2.23209e-05 Jy
! Component: 200  -  total flux cleaned = -6.4905e-05 Jy
! Total flux subtracted in 200 components = -6.4905e-05 Jy
! Clean residual min=-0.003129 max=0.002937 Jy/beam
! Clean residual mean=0.000007 rms=0.000743 Jy/beam
! Combined flux in latest and established models = 0.526141 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 98 components and 0.526141 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460308Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460307Jy  sigma=0.002490
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 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.460307Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460314Jy  sigma=0.002490
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.689 mas, bmaj=8.843 mas, bpa=-89.5 degrees
! Estimated noise=465.947 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00113777 Jy
! Component: 100  -  total flux cleaned = 0.00113426 Jy
! Component: 150  -  total flux cleaned = 0.000997738 Jy
! Component: 200  -  total flux cleaned = 0.000884724 Jy
! Total flux subtracted in 200 components = 0.000884724 Jy
! Clean residual min=-0.003368 max=0.003515 Jy/beam
! Clean residual mean=0.000004 rms=0.000963 Jy/beam
! Combined flux in latest and established models = 0.527026 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 111 components and 0.527026 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460312Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460308Jy  sigma=0.002490
flux_cutoff = imstat(rms) * dynam
! Inverting map 
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.000129078 Jy
! Component: 100  -  total flux cleaned = 5.76005e-05 Jy
! Component: 150  -  total flux cleaned = 1.50566e-05 Jy
! Component: 200  -  total flux cleaned = -6.2318e-05 Jy
! Total flux subtracted in 200 components = -6.2318e-05 Jy
! Clean residual min=-0.003336 max=0.003478 Jy/beam
! Clean residual mean=0.000005 rms=0.000962 Jy/beam
! Combined flux in latest and established models = 0.526964 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 118 components and 0.526963 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460310Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460311Jy  sigma=0.002490
! Inverting map 
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 
! Estimated beam: bmin=2.598 mas, bmaj=3.102 mas, bpa=54.88 degrees
! Estimated noise=322.01 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.598 x 3.102 at 54.88 degrees (North through East)
! Clean map  min=-0.0030553  max=0.47816 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
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 
! Estimated beam: bmin=2.134 mas, bmaj=2.476 mas, bpa=45.91 degrees
! Estimated noise=686.539 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.368982 Jy
! Component: 100  -  total flux cleaned = 0.449527 Jy
! Component: 150  -  total flux cleaned = 0.473345 Jy
! Component: 200  -  total flux cleaned = 0.486045 Jy
! Total flux subtracted in 200 components = 0.486045 Jy
! Clean residual min=-0.007353 max=0.007020 Jy/beam
! Clean residual mean=0.000014 rms=0.001803 Jy/beam
! Combined flux in latest and established models = 0.486045 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 14 model components to the UV plane model.
! The established model now contains 14 components and 0.486045 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.598 mas, bmaj=3.102 mas, bpa=54.88 degrees
! Estimated noise=322.01 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.014274 Jy
! Component: 100  -  total flux cleaned = 0.0221029 Jy
! Component: 150  -  total flux cleaned = 0.0274865 Jy
! Component: 200  -  total flux cleaned = 0.0312362 Jy
! Total flux subtracted in 200 components = 0.0312362 Jy
! Clean residual min=-0.003183 max=0.002969 Jy/beam
! Clean residual mean=-0.000002 rms=0.000792 Jy/beam
! Combined flux in latest and established models = 0.517281 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 41 components and 0.517281 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.689 mas, bmaj=8.843 mas, bpa=-89.5 degrees
! Estimated noise=465.947 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00612987 Jy
! Component: 100  -  total flux cleaned = 0.00851381 Jy
! Component: 150  -  total flux cleaned = 0.00879784 Jy
! Component: 200  -  total flux cleaned = 0.00895002 Jy
! Total flux subtracted in 200 components = 0.00895002 Jy
! Clean residual min=-0.003372 max=0.003435 Jy/beam
! Clean residual mean=-0.000000 rms=0.000962 Jy/beam
! Combined flux in latest and established models = 0.526231 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 = 4.08185e-05 Jy
! Component: 100  -  total flux cleaned = 7.24064e-05 Jy
! Component: 150  -  total flux cleaned = 1.65491e-05 Jy
! Component: 200  -  total flux cleaned = 1.7028e-05 Jy
! Total flux subtracted in 200 components = 1.7028e-05 Jy
! Clean residual min=-0.003274 max=0.003438 Jy/beam
! Clean residual mean=0.000003 rms=0.000958 Jy/beam
! Combined flux in latest and established models = 0.526248 Jy
! Adding 62 model components to the UV plane model.
! The established model now contains 93 components and 0.526248 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.598 mas, bmaj=3.102 mas, bpa=54.88 degrees
! Estimated noise=322.01 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000408415 Jy
! Component: 100  -  total flux cleaned = 0.00040602 Jy
! Component: 150  -  total flux cleaned = 0.000329226 Jy
! Component: 200  -  total flux cleaned = 0.000259991 Jy
! Total flux subtracted in 200 components = 0.000259991 Jy
! Clean residual min=-0.003128 max=0.002938 Jy/beam
! Clean residual mean=0.000003 rms=0.000747 Jy/beam
! Combined flux in latest and established models = 0.526508 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 110 components and 0.526508 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.460335Jy  sigma=0.002490
! Fit after  self-cal, rms=0.460324Jy  sigma=0.002490
wmodel J1357+7643_S_1998_10_01_pus_map.mod
! Writing 110 model components to file: J1357+7643_S_1998_10_01_pus_map.mod
wobs J1357+7643_S_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1357+7643_S_1998_10_01_pus_uvs.fits
wwins J1357+7643_S_1998_10_01_pus_map.win
! wwins: Wrote 4 windows to J1357+7643_S_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 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -1.44193e-05 Jy
! Component: 100  -  total flux cleaned = 0.000347541 Jy
! Component: 150  -  total flux cleaned = 0.000547269 Jy
! Component: 200  -  total flux cleaned = 0.000880632 Jy
! Component: 250  -  total flux cleaned = 0.00106579 Jy
! Component: 300  -  total flux cleaned = 0.00111096 Jy
! Component: 350  -  total flux cleaned = 0.00115524 Jy
! Component: 400  -  total flux cleaned = 0.0010232 Jy
! Component: 450  -  total flux cleaned = 0.000936303 Jy
! Component: 500  -  total flux cleaned = 0.000765607 Jy
! Component: 550  -  total flux cleaned = 0.00068172 Jy
! Component: 600  -  total flux cleaned = 0.000472749 Jy
! Component: 650  -  total flux cleaned = 0.000225207 Jy
! Component: 700  -  total flux cleaned = 0.000184215 Jy
! Component: 750  -  total flux cleaned = -0.0001405 Jy
! Component: 800  -  total flux cleaned = -0.000260631 Jy
! Component: 850  -  total flux cleaned = -0.000539336 Jy
! Component: 900  -  total flux cleaned = -0.000618296 Jy
! Component: 950  -  total flux cleaned = -0.000970164 Jy
! Component: 1000  -  total flux cleaned = -0.000931193 Jy
! Component: 1050  -  total flux cleaned = -0.0012011 Jy
! Component: 1100  -  total flux cleaned = -0.00135388 Jy
! Component: 1150  -  total flux cleaned = -0.0016566 Jy
! Component: 1200  -  total flux cleaned = -0.0017694 Jy
! Component: 1250  -  total flux cleaned = -0.00206789 Jy
! Component: 1300  -  total flux cleaned = -0.00225298 Jy
! Component: 1350  -  total flux cleaned = -0.00236311 Jy
! Component: 1400  -  total flux cleaned = -0.00261861 Jy
! Component: 1450  -  total flux cleaned = -0.00265512 Jy
! Component: 1500  -  total flux cleaned = -0.00283576 Jy
! Component: 1550  -  total flux cleaned = -0.00305113 Jy
! Component: 1600  -  total flux cleaned = -0.00308671 Jy
! Component: 1650  -  total flux cleaned = -0.00329939 Jy
! Component: 1700  -  total flux cleaned = -0.00344068 Jy
! Component: 1750  -  total flux cleaned = -0.0034757 Jy
! Component: 1800  -  total flux cleaned = -0.00379002 Jy
! Component: 1850  -  total flux cleaned = -0.00382468 Jy
! Component: 1900  -  total flux cleaned = -0.0039628 Jy
! Component: 1950  -  total flux cleaned = -0.0040317 Jy
! Component: 2000  -  total flux cleaned = -0.00437401 Jy
! Total flux subtracted in 2048 components = -0.00444206 Jy
! Clean residual min=-0.002728 max=0.001936 Jy/beam
! Clean residual mean=0.000003 rms=0.000641 Jy/beam
! Combined flux in latest and established models = 0.522066 Jy
keep
! Adding 169 model components to the UV plane model.
! The established model now contains 279 components and 0.522066 Jy
![Exited script file: muppet]
wmap "J1357+7643_S_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.598 x 3.102 at 54.88 degrees (North through East)
! Clean map  min=-0.002791  max=0.47845 Jy/beam
! Writing clean map to FITS file: J1357+7643_S_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.478448 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000640079 
device "J1357+7643_S_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1357+7643_S_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.401347 0.401347 0.802694 1.60539 3.21077 6.42155 12.8431 25.6862 51.3724
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.478 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.598 x 3.102 at 54.88 degrees (North through East)
! Clean map  min=-0.002791  max=0.47845 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1357+7643_S_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1357+7643_S_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1357+7643_S_1998_10_01_pus_uvs.log closed on Fri Feb  8 11:51:42 2008