! Started logfile: J1104+3812_X_1998_10_01_pus_uvs.log on Wed Feb  6 12:30:43 2008
obs J1104+3812_X_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1104+3812_X_1998_10_01_pus_uva.fits
! AN table 1: 290 integrations on 136 of 136 possible baselines.
! AN table 2: 38 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.403806 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1104+3812
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  8.40798e+09        4e+06          1        4e+06
!  02        2  8.47798e+09        4e+06          1        4e+06
!  03        3  8.79298e+09        4e+06          1        4e+06
!  04        4  8.89798e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 2049 lines of history.
! 
! Reading 72052 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 J1104+3812_X_1998_10_01_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 256x256 pixels with 0.200x0.200 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 1676 telescope corrections were flagged in sub-array 1.
!  A total of 349 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 1676 telescope corrections were flagged in sub-array 1.
!  A total of 349 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 1676 telescope corrections were flagged in sub-array 1.
!  A total of 349 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 1676 telescope corrections were flagged in sub-array 1.
!  A total of 349 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.899561Jy  sigma=0.007020
! Fit after  self-cal, rms=0.811319Jy  sigma=0.006247
! 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=0.5693 mas, bmaj=0.9677 mas, bpa=27.35 degrees
! Estimated noise=720.546 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.244406 Jy
! Component: 100  -  total flux cleaned = 0.301012 Jy
! Total flux subtracted in 100 components = 0.301012 Jy
! Clean residual min=-0.010677 max=0.021898 Jy/beam
! Clean residual mean=0.000218 rms=0.003037 Jy/beam
! Combined flux in latest and established models = 0.301012 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.301012 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.444391Jy  sigma=0.002377
! Fit after  self-cal, rms=0.444393Jy  sigma=0.002377
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0246642 Jy
! Component: 100  -  total flux cleaned = 0.0383174 Jy
! Total flux subtracted in 100 components = 0.0383174 Jy
! Clean residual min=-0.007244 max=0.008792 Jy/beam
! Clean residual mean=0.000152 rms=0.002147 Jy/beam
! Combined flux in latest and established models = 0.339329 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 7 components and 0.339329 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.442774Jy  sigma=0.002350
! Fit after  self-cal, rms=0.442758Jy  sigma=0.002350
! 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=0.7473 mas, bmaj=1.206 mas, bpa=35.14 degrees
! Estimated noise=316.188 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-1.2, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0138561 Jy
! Component: 100  -  total flux cleaned = 0.0212518 Jy
! Component: 150  -  total flux cleaned = 0.0255534 Jy
! Component: 200  -  total flux cleaned = 0.0266477 Jy
! Total flux subtracted in 200 components = 0.0266477 Jy
! Clean residual min=-0.004576 max=0.005676 Jy/beam
! Clean residual mean=0.000500 rms=0.001244 Jy/beam
! Combined flux in latest and established models = 0.365977 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 25 components and 0.365977 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.442365Jy  sigma=0.002344
! Fit after  self-cal, rms=0.442361Jy  sigma=0.002343
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.93     FD        1.04     GC        0.99     HN        0.96     
!   KK        1.00     KP        0.98     LA        1.03     MK        1.00     
!   NL        1.02     NY        0.99     ON        1.05     OV        1.01     
!   PT        1.00     SC        1.04     WF        1.00*    MC        0.96     
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.87     FD        1.04     GC        1.01     HN        0.96     
!   KK        1.00*    KP        0.96     LA        0.98     MK        1.00*    
!   NL        1.00     NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.96     SC        1.04     WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.05     GC        1.01     HN        1.03     
!   KK        0.98     KP        1.00     LA        0.99     MK        1.00     
!   NL        1.04     NY        0.99     ON        1.06     OV        1.00     
!   PT        1.00     SC        1.04     WF        1.00*    MC        0.88     
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        1.03     GC        1.04     HN        1.04     
!   KK        1.00*    KP        1.02     LA        0.95     MK        1.00*    
!   NL        1.05     NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.96     SC        1.01     WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.01     GC        1.02     HN        0.95     
!   KK        0.96     KP        1.04     LA        0.98     MK        1.04     
!   NL        1.05     NY        0.99     ON        1.09     OV        0.97     
!   PT        1.00     SC        1.07     WF        1.00*    MC        0.94     
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.91     FD        1.01     GC        0.99     HN        0.98     
!   KK        1.00*    KP        1.03     LA        0.95     MK        1.00*    
!   NL        1.02     NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        1.00     SC        1.05     WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.97     GC        0.98     HN        1.00     
!   KK        0.99     KP        1.01     LA        1.00     MK        1.02     
!   NL        1.04     NY        1.00     ON        1.02     OV        0.99     
!   PT        0.96     SC        1.00     WF        1.00*    MC        0.85     
!   GN        1.00*    
! 
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.00     GC        1.03     HN        0.97     
!   KK        1.00*    KP        0.98     LA        0.95     MK        1.00*    
!   NL        1.05     NY        1.00*    ON        1.00*    OV        1.00*    
!   PT        0.91     SC        0.86     WF        1.00*    MC        1.00*    
!   GN        1.00*    
! 
! 
! Fit before self-cal, rms=0.442361Jy  sigma=0.002343
! Fit after  self-cal, rms=0.436551Jy  sigma=0.002339
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=0.75 mas, bmaj=1.208 mas, bpa=35.02 degrees
! Estimated noise=314.93 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.00112097 Jy
! Component: 100  -  total flux cleaned = 0.00145955 Jy
! Component: 150  -  total flux cleaned = 0.00180857 Jy
! Component: 200  -  total flux cleaned = 0.00188374 Jy
! Total flux subtracted in 200 components = 0.00188374 Jy
! Clean residual min=-0.002440 max=0.004482 Jy/beam
! Clean residual mean=0.000314 rms=0.000914 Jy/beam
! Combined flux in latest and established models = 0.367861 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 36 components and 0.367861 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.436536Jy  sigma=0.002339
! Fit after  self-cal, rms=0.436592Jy  sigma=0.002339
! 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.436592Jy  sigma=0.002339
! Fit after  self-cal, rms=0.436842Jy  sigma=0.002338
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7492 mas, bmaj=1.207 mas, bpa=35.04 degrees
! Estimated noise=314.985 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000608775 Jy
! Component: 100  -  total flux cleaned = 0.000684142 Jy
! Component: 150  -  total flux cleaned = 0.000781844 Jy
! Component: 200  -  total flux cleaned = 0.000840226 Jy
! Total flux subtracted in 200 components = 0.000840226 Jy
! Clean residual min=-0.002410 max=0.003820 Jy/beam
! Clean residual mean=0.000209 rms=0.000826 Jy/beam
! Combined flux in latest and established models = 0.368701 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 42 components and 0.368701 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.436835Jy  sigma=0.002338
! Fit after  self-cal, rms=0.436831Jy  sigma=0.002338
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 (-3.6, 6.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00353516 Jy
! Component: 100  -  total flux cleaned = 0.0045784 Jy
! Component: 150  -  total flux cleaned = 0.00510619 Jy
! Component: 200  -  total flux cleaned = 0.00530141 Jy
! Total flux subtracted in 200 components = 0.00530141 Jy
! Clean residual min=-0.002498 max=0.002795 Jy/beam
! Clean residual mean=0.000088 rms=0.000679 Jy/beam
! Combined flux in latest and established models = 0.374002 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 60 components and 0.374002 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.436780Jy  sigma=0.002338
! Fit after  self-cal, rms=0.436774Jy  sigma=0.002338
! 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.436774Jy  sigma=0.002338
! Fit after  self-cal, rms=0.437785Jy  sigma=0.002338
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=0.7491 mas, bmaj=1.207 mas, bpa=35 degrees
! Estimated noise=315.482 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00134722 Jy
! Component: 100  -  total flux cleaned = 0.00161205 Jy
! Component: 150  -  total flux cleaned = 0.00184136 Jy
! Component: 200  -  total flux cleaned = 0.00194573 Jy
! Total flux subtracted in 200 components = 0.00194573 Jy
! Clean residual min=-0.002403 max=0.002643 Jy/beam
! Clean residual mean=0.000056 rms=0.000664 Jy/beam
! Combined flux in latest and established models = 0.375948 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 67 components and 0.375948 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.437766Jy  sigma=0.002337
! Fit after  self-cal, rms=0.437765Jy  sigma=0.002337
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.000271744 Jy
! Component: 100  -  total flux cleaned = 0.000303589 Jy
! Component: 150  -  total flux cleaned = 0.000333069 Jy
! Component: 200  -  total flux cleaned = 0.000333166 Jy
! Total flux subtracted in 200 components = 0.000333166 Jy
! Clean residual min=-0.002344 max=0.002569 Jy/beam
! Clean residual mean=0.000052 rms=0.000657 Jy/beam
! Combined flux in latest and established models = 0.376281 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 71 components and 0.376281 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.437757Jy  sigma=0.002337
! Fit after  self-cal, rms=0.437757Jy  sigma=0.002337
! Inverting map 
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.437757Jy  sigma=0.002337
! Fit after  self-cal, rms=0.438486Jy  sigma=0.002337
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.519 mas, bmaj=3.134 mas, bpa=46 degrees
! Estimated noise=421.364 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000961576 Jy
! Component: 100  -  total flux cleaned = 0.000959992 Jy
! Component: 150  -  total flux cleaned = 0.000988774 Jy
! Component: 200  -  total flux cleaned = 0.000987184 Jy
! Total flux subtracted in 200 components = 0.000987184 Jy
! Clean residual min=-0.002256 max=0.002395 Jy/beam
! Clean residual mean=0.000073 rms=0.000822 Jy/beam
! Combined flux in latest and established models = 0.377268 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 80 components and 0.377268 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.438476Jy  sigma=0.002337
! Fit after  self-cal, rms=0.438475Jy  sigma=0.002337
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 = 2.53245e-05 Jy
! Component: 100  -  total flux cleaned = 2.47176e-05 Jy
! Component: 150  -  total flux cleaned = 3.68341e-06 Jy
! Component: 200  -  total flux cleaned = -3.60399e-05 Jy
! Total flux subtracted in 200 components = -3.60399e-05 Jy
! Clean residual min=-0.002259 max=0.002470 Jy/beam
! Clean residual mean=0.000079 rms=0.000807 Jy/beam
! Combined flux in latest and established models = 0.377232 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 83 components and 0.377232 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.438473Jy  sigma=0.002337
! Fit after  self-cal, rms=0.438472Jy  sigma=0.002337
! 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=0.7486 mas, bmaj=1.207 mas, bpa=34.98 degrees
! Estimated noise=315.852 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7486 x 1.207 at 34.98 degrees (North through East)
! Clean map  min=-0.0034686  max=0.31931 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=0.5649 mas, bmaj=0.971 mas, bpa=26.88 degrees
! Estimated noise=711.539 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.24065 Jy
! Component: 100  -  total flux cleaned = 0.297948 Jy
! Component: 150  -  total flux cleaned = 0.323505 Jy
! Component: 200  -  total flux cleaned = 0.337922 Jy
! Total flux subtracted in 200 components = 0.337922 Jy
! Clean residual min=-0.006649 max=0.007540 Jy/beam
! Clean residual mean=0.000109 rms=0.001919 Jy/beam
! Combined flux in latest and established models = 0.337921 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 10 model components to the UV plane model.
! The established model now contains 10 components and 0.337921 Jy
! Inverting map and beam 
! Estimated beam: bmin=0.7486 mas, bmaj=1.207 mas, bpa=34.98 degrees
! Estimated noise=315.852 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.0139335 Jy
! Component: 100  -  total flux cleaned = 0.0218294 Jy
! Component: 150  -  total flux cleaned = 0.0271486 Jy
! Component: 200  -  total flux cleaned = 0.0310095 Jy
! Total flux subtracted in 200 components = 0.0310095 Jy
! Clean residual min=-0.002986 max=0.003264 Jy/beam
! Clean residual mean=0.000216 rms=0.000883 Jy/beam
! Combined flux in latest and established models = 0.368931 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 42 components and 0.368931 Jy
! Inverting map 
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 
! Estimated beam: bmin=2.519 mas, bmaj=3.134 mas, bpa=46 degrees
! Estimated noise=421.364 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00491964 Jy
! Component: 100  -  total flux cleaned = 0.00709428 Jy
! Component: 150  -  total flux cleaned = 0.00747333 Jy
! Component: 200  -  total flux cleaned = 0.0075386 Jy
! Total flux subtracted in 200 components = 0.0075386 Jy
! Clean residual min=-0.002561 max=0.002619 Jy/beam
! Clean residual mean=0.000117 rms=0.000907 Jy/beam
! Combined flux in latest and established models = 0.37647 Jy
flux_cutoff = imstat(rms) * dynam
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000110009 Jy
! Component: 100  -  total flux cleaned = 0.00011109 Jy
! Component: 150  -  total flux cleaned = 0.000199854 Jy
! Component: 200  -  total flux cleaned = 0.000237735 Jy
! Total flux subtracted in 200 components = 0.000237735 Jy
! Clean residual min=-0.002300 max=0.002323 Jy/beam
! Clean residual mean=0.000103 rms=0.000837 Jy/beam
! Combined flux in latest and established models = 0.376707 Jy
! Adding 26 model components to the UV plane model.
! The established model now contains 59 components and 0.376707 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=0.7486 mas, bmaj=1.207 mas, bpa=34.98 degrees
! Estimated noise=315.852 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000420697 Jy
! Component: 100  -  total flux cleaned = 0.000693976 Jy
! Component: 150  -  total flux cleaned = 0.000697261 Jy
! Component: 200  -  total flux cleaned = 0.000751324 Jy
! Total flux subtracted in 200 components = 0.000751324 Jy
! Clean residual min=-0.002459 max=0.002568 Jy/beam
! Clean residual mean=0.000033 rms=0.000688 Jy/beam
! Combined flux in latest and established models = 0.377459 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 70 components and 0.377459 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.438490Jy  sigma=0.002338
! Fit after  self-cal, rms=0.438490Jy  sigma=0.002338
wmodel J1104+3812_X_1998_10_01_pus_map.mod
! Writing 70 model components to file: J1104+3812_X_1998_10_01_pus_map.mod
wobs J1104+3812_X_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1104+3812_X_1998_10_01_pus_uvs.fits
wwins J1104+3812_X_1998_10_01_pus_map.win
! wwins: Wrote 3 windows to J1104+3812_X_1998_10_01_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.000318066 Jy
! Component: 100  -  total flux cleaned = 0.000726841 Jy
! Component: 150  -  total flux cleaned = 0.00103787 Jy
! Component: 200  -  total flux cleaned = 0.0013739 Jy
! Component: 250  -  total flux cleaned = 0.00166205 Jy
! Component: 300  -  total flux cleaned = 0.00190683 Jy
! Component: 350  -  total flux cleaned = 0.0021787 Jy
! Component: 400  -  total flux cleaned = 0.00237668 Jy
! Component: 450  -  total flux cleaned = 0.00244178 Jy
! Component: 500  -  total flux cleaned = 0.00256796 Jy
! Component: 550  -  total flux cleaned = 0.00269055 Jy
! Component: 600  -  total flux cleaned = 0.00272032 Jy
! Component: 650  -  total flux cleaned = 0.00280836 Jy
! Component: 700  -  total flux cleaned = 0.00283724 Jy
! Component: 750  -  total flux cleaned = 0.0029219 Jy
! Component: 800  -  total flux cleaned = 0.00297697 Jy
! Component: 850  -  total flux cleaned = 0.00300418 Jy
! Component: 900  -  total flux cleaned = 0.00308462 Jy
! Component: 950  -  total flux cleaned = 0.00308454 Jy
! Component: 1000  -  total flux cleaned = 0.00311072 Jy
! Total flux subtracted in 1024 components = 0.00313636 Jy
! Clean residual min=-0.001434 max=0.001551 Jy/beam
! Clean residual mean=-0.000001 rms=0.000505 Jy/beam
! Combined flux in latest and established models = 0.380595 Jy
keep
! Adding 64 model components to the UV plane model.
! The established model now contains 134 components and 0.380595 Jy
![Exited script file: muppet]
wmap "J1104+3812_X_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.7486 x 1.207 at 34.98 degrees (North through East)
! Clean map  min=-0.0028993  max=0.31877 Jy/beam
! Writing clean map to FITS file: J1104+3812_X_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.318771 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00050373 
device "J1104+3812_X_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1104+3812_X_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.474067 0.474067 0.948135 1.89627 3.79254 7.58508 15.1702 30.3403 60.6806
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.318 
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.7486 x 1.207 at 34.98 degrees (North through East)
! Clean map  min=-0.0028993  max=0.31877 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1104+3812_X_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1104+3812_X_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1104+3812_X_1998_10_01_pus_uvs.log closed on Wed Feb  6 12:30:56 2008