! Started logfile: J1041+5233_S_1998_10_01_pus_uvs.log on Fri Feb  8 11:49:58 2008
obs J1041+5233_S_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1041+5233_S_1998_10_01_pus_uva.fits
! AN table 1: 329 integrations on 136 of 136 possible baselines.
! AN table 2: 97 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.176194 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1041+5233
! 
! 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 40832 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 J1041+5233_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 3216 telescope corrections were flagged in sub-array 1.
!  A total of 1205 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 3216 telescope corrections were flagged in sub-array 1.
!  A total of 1205 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 3216 telescope corrections were flagged in sub-array 1.
!  A total of 1205 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 3216 telescope corrections were flagged in sub-array 1.
!  A total of 1205 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.944159Jy  sigma=0.006194
! Fit after  self-cal, rms=0.720818Jy  sigma=0.004797
! 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.316 mas, bmaj=2.697 mas, bpa=-30.09 degrees
! Estimated noise=1027.04 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.316353 Jy
! Component: 100  -  total flux cleaned = 0.388869 Jy
! Total flux subtracted in 100 components = 0.388869 Jy
! Clean residual min=-0.014941 max=0.026370 Jy/beam
! Clean residual mean=0.000052 rms=0.003860 Jy/beam
! Combined flux in latest and established models = 0.388869 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.388869 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.428237Jy  sigma=0.002475
! Fit after  self-cal, rms=0.428150Jy  sigma=0.002475
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0291553 Jy
! Component: 100  -  total flux cleaned = 0.0458585 Jy
! Total flux subtracted in 100 components = 0.0458585 Jy
! Clean residual min=-0.013661 max=0.013326 Jy/beam
! Clean residual mean=0.000014 rms=0.003327 Jy/beam
! Combined flux in latest and established models = 0.434727 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 16 components and 0.434727 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.425874Jy  sigma=0.002451
! Fit after  self-cal, rms=0.425798Jy  sigma=0.002450
! 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.899 mas, bmaj=3.196 mas, bpa=-35.78 degrees
! Estimated noise=513.612 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.0152346 Jy
! Component: 100  -  total flux cleaned = 0.0234893 Jy
! Component: 150  -  total flux cleaned = 0.0282564 Jy
! Component: 200  -  total flux cleaned = 0.0310822 Jy
! Total flux subtracted in 200 components = 0.0310822 Jy
! Clean residual min=-0.007731 max=0.007402 Jy/beam
! Clean residual mean=0.000002 rms=0.001951 Jy/beam
! Combined flux in latest and established models = 0.465809 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 27 components and 0.465809 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.425315Jy  sigma=0.002445
! Fit after  self-cal, rms=0.425208Jy  sigma=0.002445
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     GC        1.06     HN        0.96     
!   KK        0.96     KP        1.00     LA        0.96     MK        0.99     
!   NL        1.00     NY        0.95     ON        0.91     OV        0.98     
!   PT        1.01     SC        1.07     WF        0.93     MC        1.27     
!   GN        0.88     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        1.00*    GC        1.01     HN        0.97     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.06     NY        0.90     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    MC        0.95     
!   GN        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.91     FD        1.04     GC        1.06     HN        1.02     
!   KK        0.98     KP        0.99     LA        0.96     MK        1.04     
!   NL        1.07     NY        1.03     ON        0.98     OV        1.00     
!   PT        0.95     SC        1.13     WF        0.97     MC        0.94     
!   GN        1.02     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        1.00*    GC        0.97     HN        1.05     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.00     NY        0.99     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    MC        0.91     
!   GN        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.05     GC        1.06     HN        0.97     
!   KK        0.99     KP        0.98     LA        1.02     MK        1.00     
!   NL        1.09     NY        1.00     ON        0.93     OV        0.99     
!   PT        0.97     SC        1.04     WF        0.96     MC        1.00     
!   GN        1.06     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.00*    GC        0.99     HN        0.98     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.05     NY        1.02     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    MC        0.84     
!   GN        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 111 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.04     GC        1.00     HN        0.99     
!   KK        0.96     KP        0.99     LA        0.99     MK        0.98     
!   NL        1.06     NY        0.97     ON        0.92     OV        1.04     
!   PT        0.89     SC        1.08     WF        0.94     MC        1.07     
!   GN        0.84     
! 
!  A total of 3 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00*    GC        0.97     HN        1.05     
!   KK        1.00*    KP        1.00*    LA        1.00*    MK        1.00*    
!   NL        1.08     NY        0.96     ON        1.00*    OV        1.00*    
!   PT        1.00*    SC        1.00*    WF        1.00*    MC        0.77     
!   GN        1.00*    
! 
! 
! Fit before self-cal, rms=0.425208Jy  sigma=0.002445
! Fit after  self-cal, rms=0.419693Jy  sigma=0.002442
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.897 mas, bmaj=3.215 mas, bpa=-38.71 degrees
! Estimated noise=518.071 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.00131385 Jy
! Component: 100  -  total flux cleaned = 0.0012326 Jy
! Component: 150  -  total flux cleaned = 0.00116601 Jy
! Component: 200  -  total flux cleaned = 0.00111709 Jy
! Total flux subtracted in 200 components = 0.00111709 Jy
! Clean residual min=-0.006641 max=0.006987 Jy/beam
! Clean residual mean=-0.000004 rms=0.001583 Jy/beam
! Combined flux in latest and established models = 0.466926 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 33 components and 0.466926 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.419664Jy  sigma=0.002442
! Fit after  self-cal, rms=0.419714Jy  sigma=0.002441
! 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.419714Jy  sigma=0.002441
! Fit after  self-cal, rms=0.419560Jy  sigma=0.002435
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.913 mas, bmaj=3.214 mas, bpa=-40.88 degrees
! Estimated noise=519.215 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000257551 Jy
! Component: 100  -  total flux cleaned = 0.000216032 Jy
! Component: 150  -  total flux cleaned = 0.000103796 Jy
! Component: 200  -  total flux cleaned = -3.6301e-05 Jy
! Total flux subtracted in 200 components = -3.6301e-05 Jy
! Clean residual min=-0.005701 max=0.007208 Jy/beam
! Clean residual mean=0.000005 rms=0.001428 Jy/beam
! Combined flux in latest and established models = 0.46689 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 41 components and 0.46689 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.419551Jy  sigma=0.002435
! Fit after  self-cal, rms=0.420328Jy  sigma=0.002434
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 (2.5, 5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00623043 Jy
! Component: 100  -  total flux cleaned = 0.0077981 Jy
! Component: 150  -  total flux cleaned = 0.00799994 Jy
! Component: 200  -  total flux cleaned = 0.00791589 Jy
! Total flux subtracted in 200 components = 0.00791589 Jy
! Clean residual min=-0.005130 max=0.005406 Jy/beam
! Clean residual mean=-0.000009 rms=0.001364 Jy/beam
! Combined flux in latest and established models = 0.474806 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 65 components and 0.474806 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.420221Jy  sigma=0.002434
! Fit after  self-cal, rms=0.420248Jy  sigma=0.002433
! 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.420248Jy  sigma=0.002433
! Fit after  self-cal, rms=0.421978Jy  sigma=0.002433
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.915 mas, bmaj=3.21 mas, bpa=-41.72 degrees
! Estimated noise=519.924 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00314792 Jy
! Component: 100  -  total flux cleaned = 0.00360245 Jy
! Component: 150  -  total flux cleaned = 0.00367092 Jy
! Component: 200  -  total flux cleaned = 0.00361517 Jy
! Total flux subtracted in 200 components = 0.00361517 Jy
! Clean residual min=-0.005031 max=0.005483 Jy/beam
! Clean residual mean=-0.000006 rms=0.001340 Jy/beam
! Combined flux in latest and established models = 0.478421 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 70 components and 0.478421 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.421941Jy  sigma=0.002433
! Fit after  self-cal, rms=0.422315Jy  sigma=0.002433
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.000581145 Jy
! Component: 100  -  total flux cleaned = 0.000466626 Jy
! Component: 150  -  total flux cleaned = 0.000311478 Jy
! Component: 200  -  total flux cleaned = 0.000216867 Jy
! Total flux subtracted in 200 components = 0.000216867 Jy
! Clean residual min=-0.005070 max=0.005447 Jy/beam
! Clean residual mean=-0.000007 rms=0.001338 Jy/beam
! Combined flux in latest and established models = 0.478638 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 71 components and 0.478638 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422299Jy  sigma=0.002433
! Fit after  self-cal, rms=0.422316Jy  sigma=0.002432
! 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.422316Jy  sigma=0.002432
! Fit after  self-cal, rms=0.423143Jy  sigma=0.002432
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.919 mas, bmaj=7.575 mas, bpa=39 degrees
! Estimated noise=741.152 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000902941 Jy
! Component: 100  -  total flux cleaned = 0.00111747 Jy
! Component: 150  -  total flux cleaned = 0.00127903 Jy
! Component: 200  -  total flux cleaned = 0.00134479 Jy
! Total flux subtracted in 200 components = 0.00134479 Jy
! Clean residual min=-0.006944 max=0.009694 Jy/beam
! Clean residual mean=-0.000018 rms=0.002536 Jy/beam
! Combined flux in latest and established models = 0.479983 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 83 components and 0.479983 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.423141Jy  sigma=0.002432
! Fit after  self-cal, rms=0.423342Jy  sigma=0.002432
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 = -7.9905e-05 Jy
! Component: 100  -  total flux cleaned = -7.93626e-05 Jy
! Component: 150  -  total flux cleaned = -7.94591e-05 Jy
! Component: 200  -  total flux cleaned = -6.42818e-05 Jy
! Total flux subtracted in 200 components = -6.42818e-05 Jy
! Clean residual min=-0.006953 max=0.009625 Jy/beam
! Clean residual mean=-0.000018 rms=0.002518 Jy/beam
! Combined flux in latest and established models = 0.479918 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 86 components and 0.479918 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.423342Jy  sigma=0.002432
! Fit after  self-cal, rms=0.423348Jy  sigma=0.002432
! 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.916 mas, bmaj=3.207 mas, bpa=-42.07 degrees
! Estimated noise=520.274 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.916 x 3.207 at -42.07 degrees (North through East)
! Clean map  min=-0.0046955  max=0.41845 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.333 mas, bmaj=2.713 mas, bpa=-35.71 degrees
! Estimated noise=1070.56 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.317321 Jy
! Component: 100  -  total flux cleaned = 0.391397 Jy
! Component: 150  -  total flux cleaned = 0.421432 Jy
! Component: 200  -  total flux cleaned = 0.439177 Jy
! Total flux subtracted in 200 components = 0.439177 Jy
! Clean residual min=-0.010850 max=0.011491 Jy/beam
! Clean residual mean=0.000026 rms=0.002891 Jy/beam
! Combined flux in latest and established models = 0.439177 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 18 model components to the UV plane model.
! The established model now contains 18 components and 0.439177 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.916 mas, bmaj=3.207 mas, bpa=-42.07 degrees
! Estimated noise=520.274 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.0159746 Jy
! Component: 100  -  total flux cleaned = 0.025068 Jy
! Component: 150  -  total flux cleaned = 0.0307135 Jy
! Component: 200  -  total flux cleaned = 0.0346553 Jy
! Total flux subtracted in 200 components = 0.0346553 Jy
! Clean residual min=-0.005422 max=0.005559 Jy/beam
! Clean residual mean=0.000007 rms=0.001366 Jy/beam
! Combined flux in latest and established models = 0.473832 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 42 components and 0.473832 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=6.919 mas, bmaj=7.575 mas, bpa=39 degrees
! Estimated noise=741.152 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00406063 Jy
! Component: 100  -  total flux cleaned = 0.00506049 Jy
! Component: 150  -  total flux cleaned = 0.00544037 Jy
! Component: 200  -  total flux cleaned = 0.00557438 Jy
! Total flux subtracted in 200 components = 0.00557438 Jy
! Clean residual min=-0.006956 max=0.009716 Jy/beam
! Clean residual mean=-0.000015 rms=0.002518 Jy/beam
! Combined flux in latest and established models = 0.479406 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 = 7.39906e-05 Jy
! Component: 100  -  total flux cleaned = 0.00013653 Jy
! Component: 150  -  total flux cleaned = 0.000189965 Jy
! Component: 200  -  total flux cleaned = 0.000236814 Jy
! Total flux subtracted in 200 components = 0.000236814 Jy
! Clean residual min=-0.006956 max=0.009668 Jy/beam
! Clean residual mean=-0.000017 rms=0.002517 Jy/beam
! Combined flux in latest and established models = 0.479643 Jy
! Adding 26 model components to the UV plane model.
! The established model now contains 64 components and 0.479643 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.916 mas, bmaj=3.207 mas, bpa=-42.07 degrees
! Estimated noise=520.274 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 5.4654e-05 Jy
! Component: 100  -  total flux cleaned = -0.000465753 Jy
! Component: 150  -  total flux cleaned = -0.000619323 Jy
! Component: 200  -  total flux cleaned = -0.000619272 Jy
! Total flux subtracted in 200 components = -0.000619272 Jy
! Clean residual min=-0.005157 max=0.005521 Jy/beam
! Clean residual mean=-0.000003 rms=0.001343 Jy/beam
! Combined flux in latest and established models = 0.479024 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 75 components and 0.479024 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.423363Jy  sigma=0.002432
! Fit after  self-cal, rms=0.423351Jy  sigma=0.002432
wmodel J1041+5233_S_1998_10_01_pus_map.mod
! Writing 75 model components to file: J1041+5233_S_1998_10_01_pus_map.mod
wobs J1041+5233_S_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1041+5233_S_1998_10_01_pus_uvs.fits
wwins J1041+5233_S_1998_10_01_pus_map.win
! wwins: Wrote 2 windows to J1041+5233_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 = 0.00155193 Jy
! Component: 100  -  total flux cleaned = 0.00221077 Jy
! Component: 150  -  total flux cleaned = 0.00283736 Jy
! Component: 200  -  total flux cleaned = 0.00335211 Jy
! Component: 250  -  total flux cleaned = 0.00393176 Jy
! Component: 300  -  total flux cleaned = 0.00425173 Jy
! Component: 350  -  total flux cleaned = 0.00456184 Jy
! Component: 400  -  total flux cleaned = 0.00471289 Jy
! Component: 450  -  total flux cleaned = 0.00478584 Jy
! Component: 500  -  total flux cleaned = 0.00478488 Jy
! Component: 550  -  total flux cleaned = 0.00471362 Jy
! Component: 600  -  total flux cleaned = 0.00464346 Jy
! Component: 650  -  total flux cleaned = 0.00457405 Jy
! Component: 700  -  total flux cleaned = 0.00410681 Jy
! Component: 750  -  total flux cleaned = 0.0038443 Jy
! Component: 800  -  total flux cleaned = 0.00345718 Jy
! Component: 850  -  total flux cleaned = 0.00333069 Jy
! Component: 900  -  total flux cleaned = 0.00314116 Jy
! Component: 950  -  total flux cleaned = 0.00270794 Jy
! Component: 1000  -  total flux cleaned = 0.00258598 Jy
! Component: 1050  -  total flux cleaned = 0.00240456 Jy
! Component: 1100  -  total flux cleaned = 0.00216703 Jy
! Component: 1150  -  total flux cleaned = 0.00216664 Jy
! Component: 1200  -  total flux cleaned = 0.0019357 Jy
! Component: 1250  -  total flux cleaned = 0.00205057 Jy
! Component: 1300  -  total flux cleaned = 0.00216309 Jy
! Component: 1350  -  total flux cleaned = 0.00188253 Jy
! Component: 1400  -  total flux cleaned = 0.00193785 Jy
! Component: 1450  -  total flux cleaned = 0.0020474 Jy
! Component: 1500  -  total flux cleaned = 0.00215596 Jy
! Component: 1550  -  total flux cleaned = 0.00199431 Jy
! Component: 1600  -  total flux cleaned = 0.00215394 Jy
! Component: 1650  -  total flux cleaned = 0.00225945 Jy
! Component: 1700  -  total flux cleaned = 0.00225933 Jy
! Component: 1750  -  total flux cleaned = 0.00231119 Jy
! Component: 1800  -  total flux cleaned = 0.00251758 Jy
! Component: 1850  -  total flux cleaned = 0.0025685 Jy
! Component: 1900  -  total flux cleaned = 0.00272033 Jy
! Component: 1950  -  total flux cleaned = 0.00277074 Jy
! Component: 2000  -  total flux cleaned = 0.0028702 Jy
! Total flux subtracted in 2048 components = 0.00277143 Jy
! Clean residual min=-0.002820 max=0.002886 Jy/beam
! Clean residual mean=0.000012 rms=0.000928 Jy/beam
! Combined flux in latest and established models = 0.481795 Jy
keep
! Adding 145 model components to the UV plane model.
! The established model now contains 220 components and 0.481795 Jy
![Exited script file: muppet]
wmap "J1041+5233_S_1998_10_01_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.916 x 3.207 at -42.07 degrees (North through East)
! Clean map  min=-0.0047113  max=0.41908 Jy/beam
! Writing clean map to FITS file: J1041+5233_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.419077 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000924648 
device "J1041+5233_S_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1041+5233_S_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.661917 0.661917 1.32383 2.64767 5.29534 10.5907 21.1814 42.3627 84.7254
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0027 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.419 
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.916 x 3.207 at -42.07 degrees (North through East)
! Clean map  min=-0.0047113  max=0.41908 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1041+5233_S_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1041+5233_S_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1041+5233_S_1998_10_01_pus_uvs.log closed on Fri Feb  8 11:50:12 2008