! Started logfile: J0958+4725_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:00:45 2007
obs J0958+4725_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J0958+4725_S_2001_04_09_pus_uva.fits
! AN table 1: 118 integrations on 190 of 190 possible baselines.
! AN table 2: 245 integrations on 190 of 190 possible baselines.
! AN table 3: 170 integrations on 190 of 190 possible baselines.
! AN table 4: 85 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.106745 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  2.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1949 lines of history.
! 
! Reading 50136 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 J0958+4725_S_2001_04_09_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 1766 telescope corrections were flagged in sub-array 1.
!  A total of 3605 telescope corrections were flagged in sub-array 2.
!  A total of 2743 telescope corrections were flagged in sub-array 3.
!  A total of 1237 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 1766 telescope corrections were flagged in sub-array 1.
!  A total of 3605 telescope corrections were flagged in sub-array 2.
!  A total of 2743 telescope corrections were flagged in sub-array 3.
!  A total of 1237 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 1766 telescope corrections were flagged in sub-array 1.
!  A total of 3605 telescope corrections were flagged in sub-array 2.
!  A total of 2743 telescope corrections were flagged in sub-array 3.
!  A total of 1237 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 1766 telescope corrections were flagged in sub-array 1.
!  A total of 3605 telescope corrections were flagged in sub-array 2.
!  A total of 2743 telescope corrections were flagged in sub-array 3.
!  A total of 1237 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.867808Jy  sigma=0.006597
! Fit after  self-cal, rms=0.390871Jy  sigma=0.002419
! 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=1.864 mas, bmaj=2.729 mas, bpa=1.296 degrees
! Estimated noise=804.399 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.601986 Jy
! Component: 100  -  total flux cleaned = 0.736902 Jy
! Total flux subtracted in 100 components = 0.736902 Jy
! Clean residual min=-0.011708 max=0.048669 Jy/beam
! Clean residual mean=0.000070 rms=0.003776 Jy/beam
! Combined flux in latest and established models = 0.736902 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.736902 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.331209Jy  sigma=0.001965
! Fit after  self-cal, rms=0.331120Jy  sigma=0.001965
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0522844 Jy
! Component: 100  -  total flux cleaned = 0.078717 Jy
! Total flux subtracted in 100 components = 0.078717 Jy
! Clean residual min=-0.011228 max=0.014866 Jy/beam
! Clean residual mean=-0.000006 rms=0.003076 Jy/beam
! Combined flux in latest and established models = 0.815619 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 11 components and 0.815619 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.321878Jy  sigma=0.001845
! Fit after  self-cal, rms=0.321674Jy  sigma=0.001844
! 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.179 mas, bmaj=3.552 mas, bpa=-3.012 degrees
! Estimated noise=429.74 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.0253293 Jy
! Component: 100  -  total flux cleaned = 0.0377074 Jy
! Component: 150  -  total flux cleaned = 0.0444857 Jy
! Component: 200  -  total flux cleaned = 0.0483486 Jy
! Total flux subtracted in 200 components = 0.0483486 Jy
! Clean residual min=-0.009372 max=0.012900 Jy/beam
! Clean residual mean=-0.000063 rms=0.002553 Jy/beam
! Combined flux in latest and established models = 0.863968 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 33 components and 0.863968 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320346Jy  sigma=0.001819
! Fit after  self-cal, rms=0.320170Jy  sigma=0.001819
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 138 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.06     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.00*    KP        1.14     
!   LA        0.98     MA        1.15     MC        2.46     MK        1.00*    
!   NL        0.99     NY        0.95     OV        1.00*    PT        1.02     
!   SC        1.00     TS        1.00*    WF        1.03     WZ        0.90     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.96     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.01     KP        0.96     
!   LA        0.99     MA        0.93     MC        1.57     MK        1.07     
!   NL        0.99     NY        0.95     OV        1.04     PT        0.97     
!   SC        0.94     TS        0.97     WF        0.89     WZ        0.98     
! 
!  A total of 189 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.00*    GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.86     MC        1.11     MK        1.00*    
!   NL        1.03     NY        0.96     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        0.95     WF        1.02     WZ        1.02     
! 
!  A total of 117 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.96     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.00     KP        0.96     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        0.96     NY        0.91     OV        0.96     PT        0.93     
!   SC        1.03     TS        0.88     WF        1.11     WZ        1.10     
! 
! 
! Correcting IF 2.
!  A total of 138 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.05     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00*    KP        1.09     
!   LA        1.05     MA        1.54     MC        1.39     MK        1.00*    
!   NL        0.98     NY        1.00     OV        1.00*    PT        1.08     
!   SC        1.02     TS        1.00*    WF        1.00     WZ        0.92     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.95     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.04     KP        0.99     
!   LA        1.01     MA        1.35     MC        1.09     MK        1.05     
!   NL        1.00     NY        0.99     OV        1.01     PT        1.00     
!   SC        0.92     TS        1.00     WF        1.02     WZ        0.98     
! 
!  A total of 189 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00*    GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.93     MC        0.93     MK        1.00*    
!   NL        1.01     NY        0.98     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00     WF        0.98     WZ        1.01     
! 
!  A total of 117 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.96     FD        0.95     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        0.95     KP        0.81     
!   LA        0.97     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        0.96     NY        0.95     OV        0.91     PT        0.96     
!   SC        1.01     TS        0.92     WF        0.96     WZ        1.16     
! 
! 
! Correcting IF 3.
!  A total of 138 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.01     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.00*    KP        1.09     
!   LA        0.96     MA        0.94     MC        0.88     MK        1.00*    
!   NL        0.99     NY        0.99     OV        1.00*    PT        1.02     
!   SC        1.00     TS        1.00*    WF        1.09     WZ        0.86     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        0.96     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.05     KP        1.01     
!   LA        0.97     MA        0.95     MC        0.98     MK        1.04     
!   NL        0.98     NY        0.94     OV        1.01     PT        1.01     
!   SC        0.91     TS        1.02     WF        1.01     WZ        0.96     
! 
!  A total of 189 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00*    GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.96     MC        1.30     MK        1.00*    
!   NL        1.03     NY        0.95     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00     WF        0.95     WZ        1.02     
! 
!  A total of 117 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        0.95     GC        0.98     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        0.95     KP        0.97     
!   LA        0.94     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        0.96     NY        0.92     OV        0.92     PT        1.00     
!   SC        1.02     TS        0.92     WF        0.97     WZ        1.14     
! 
! 
! Correcting IF 4.
!  A total of 138 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.09     GC        1.09     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.00*    KP        1.09     
!   LA        1.02     MA        1.40     MC        2.34     MK        1.00*    
!   NL        1.00     NY        1.02     OV        1.00*    PT        1.00     
!   SC        1.00     TS        1.00*    WF        0.98     WZ        0.88     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.98     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00     KP        1.01     
!   LA        1.01     MA        0.84     MC        0.95     MK        1.00     
!   NL        0.98     NY        0.98     OV        1.00     PT        1.03     
!   SC        0.89     TS        0.97     WF        1.02     WZ        0.97     
! 
!  A total of 189 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.00*    GC        1.11     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.97     MC        1.21     MK        1.00*    
!   NL        1.05     NY        1.05     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        0.95     WF        0.95     WZ        1.04     
! 
!  A total of 117 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.97     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        0.93     KP        0.97     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        0.96     NY        0.96     OV        0.91     PT        1.25     
!   SC        1.02     TS        0.88     WF        0.98     WZ        1.17     
! 
! 
! Fit before self-cal, rms=0.320170Jy  sigma=0.001819
! Fit after  self-cal, rms=0.359540Jy  sigma=0.001640
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.16 mas, bmaj=3.556 mas, bpa=-3.895 degrees
! Estimated noise=435.982 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 (4.5, -5.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00188893 Jy
! Component: 100  -  total flux cleaned = 0.00221013 Jy
! Component: 150  -  total flux cleaned = 0.00293361 Jy
! Component: 200  -  total flux cleaned = 0.00341435 Jy
! Total flux subtracted in 200 components = 0.00341435 Jy
! Clean residual min=-0.004849 max=0.004578 Jy/beam
! Clean residual mean=-0.000094 rms=0.001143 Jy/beam
! Combined flux in latest and established models = 0.867382 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 49 components and 0.867382 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.359388Jy  sigma=0.001638
! Fit after  self-cal, rms=0.362979Jy  sigma=0.001636
! 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.362979Jy  sigma=0.001636
! Fit after  self-cal, rms=0.391906Jy  sigma=0.001609
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.165 mas, bmaj=3.558 mas, bpa=-4.09 degrees
! Estimated noise=436.298 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00062407 Jy
! Component: 100  -  total flux cleaned = -0.00020267 Jy
! Component: 150  -  total flux cleaned = 0.000286999 Jy
! Component: 200  -  total flux cleaned = 0.000828428 Jy
! Total flux subtracted in 200 components = 0.000828428 Jy
! Clean residual min=-0.003322 max=0.003082 Jy/beam
! Clean residual mean=-0.000015 rms=0.000735 Jy/beam
! Combined flux in latest and established models = 0.868211 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 59 components and 0.868211 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.391863Jy  sigma=0.001609
! Fit after  self-cal, rms=0.392559Jy  sigma=0.001609
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.000616632 Jy
! Component: 100  -  total flux cleaned = 0.00088123 Jy
! Component: 150  -  total flux cleaned = 0.00106782 Jy
! Component: 200  -  total flux cleaned = 0.00115242 Jy
! Total flux subtracted in 200 components = 0.00115242 Jy
! Clean residual min=-0.003204 max=0.003005 Jy/beam
! Clean residual mean=-0.000023 rms=0.000721 Jy/beam
! Combined flux in latest and established models = 0.869363 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 66 components and 0.869363 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.392546Jy  sigma=0.001608
! Fit after  self-cal, rms=0.392476Jy  sigma=0.001608
! 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.392476Jy  sigma=0.001608
! Fit after  self-cal, rms=0.398396Jy  sigma=0.001608
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.168 mas, bmaj=3.559 mas, bpa=-4.148 degrees
! Estimated noise=436.378 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00109789 Jy
! Component: 100  -  total flux cleaned = -0.000829791 Jy
! Component: 150  -  total flux cleaned = -0.000553595 Jy
! Component: 200  -  total flux cleaned = -0.000553131 Jy
! Total flux subtracted in 200 components = -0.000553131 Jy
! Clean residual min=-0.003116 max=0.002894 Jy/beam
! Clean residual mean=-0.000029 rms=0.000713 Jy/beam
! Combined flux in latest and established models = 0.86881 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 70 components and 0.86881 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.398386Jy  sigma=0.001608
! Fit after  self-cal, rms=0.398468Jy  sigma=0.001608
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.000172645 Jy
! Component: 100  -  total flux cleaned = 0.000170885 Jy
! Component: 150  -  total flux cleaned = 0.000137928 Jy
! Component: 200  -  total flux cleaned = 0.000107506 Jy
! Total flux subtracted in 200 components = 0.000107506 Jy
! Clean residual min=-0.003080 max=0.002867 Jy/beam
! Clean residual mean=-0.000030 rms=0.000711 Jy/beam
! Combined flux in latest and established models = 0.868918 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 74 components and 0.868918 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.398464Jy  sigma=0.001608
! Fit after  self-cal, rms=0.398465Jy  sigma=0.001608
! 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.398465Jy  sigma=0.001608
! Fit after  self-cal, rms=0.400300Jy  sigma=0.001608
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.568 mas, bmaj=8.827 mas, bpa=29.73 degrees
! Estimated noise=657.084 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00024841 Jy
! Component: 100  -  total flux cleaned = 0.00020124 Jy
! Component: 150  -  total flux cleaned = 0.000199844 Jy
! Component: 200  -  total flux cleaned = 0.000218269 Jy
! Total flux subtracted in 200 components = 0.000218269 Jy
! Clean residual min=-0.004358 max=0.003901 Jy/beam
! Clean residual mean=-0.000151 rms=0.001157 Jy/beam
! Combined flux in latest and established models = 0.869136 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 90 components and 0.869136 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.400300Jy  sigma=0.001608
! Fit after  self-cal, rms=0.400316Jy  sigma=0.001608
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 = 1.674e-05 Jy
! Component: 100  -  total flux cleaned = 3.3394e-05 Jy
! Component: 150  -  total flux cleaned = 4.9328e-05 Jy
! Component: 200  -  total flux cleaned = 6.40232e-05 Jy
! Total flux subtracted in 200 components = 6.40232e-05 Jy
! Clean residual min=-0.004311 max=0.003894 Jy/beam
! Clean residual mean=-0.000152 rms=0.001157 Jy/beam
! Combined flux in latest and established models = 0.8692 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 95 components and 0.8692 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.400315Jy  sigma=0.001608
! Fit after  self-cal, rms=0.400314Jy  sigma=0.001608
! 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.17 mas, bmaj=3.559 mas, bpa=-4.172 degrees
! Estimated noise=436.444 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.17 x 3.559 at -4.172 degrees (North through East)
! Clean map  min=-0.0027253  max=0.7875 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.400314Jy  sigma=0.001608
! Fit after  self-cal, rms=0.851540Jy  sigma=0.001500
! Inverting map and beam 
! Estimated beam: bmin=2.17 mas, bmaj=3.56 mas, bpa=-4.127 degrees
! Estimated noise=436.147 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00156298 Jy
! Component: 100  -  total flux cleaned = -0.00245747 Jy
! Component: 150  -  total flux cleaned = -0.00269083 Jy
! Component: 200  -  total flux cleaned = -0.00277818 Jy
! Total flux subtracted in 200 components = -0.00277818 Jy
! Clean residual min=-0.002589 max=0.002676 Jy/beam
! Clean residual mean=0.000006 rms=0.000651 Jy/beam
! Combined flux in latest and established models = 0.866422 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 102 components and 0.866422 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.851528Jy  sigma=0.001500
! Fit after  self-cal, rms=0.851546Jy  sigma=0.001500
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000281477 Jy
! Component: 100  -  total flux cleaned = -0.000333108 Jy
! Component: 150  -  total flux cleaned = -0.000380074 Jy
! Component: 200  -  total flux cleaned = -0.000443503 Jy
! Total flux subtracted in 200 components = -0.000443503 Jy
! Clean residual min=-0.002575 max=0.002685 Jy/beam
! Clean residual mean=0.000009 rms=0.000649 Jy/beam
! Combined flux in latest and established models = 0.865978 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 104 components and 0.865978 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.851544Jy  sigma=0.001500
! Fit after  self-cal, rms=0.851548Jy  sigma=0.001500
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.851548Jy  sigma=0.001500
! Fit after  self-cal, rms=1.445431Jy  sigma=0.001500
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=1.871 mas, bmaj=2.744 mas, bpa=0.3939 degrees
! Estimated noise=798.397 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.601808 Jy
! Component: 100  -  total flux cleaned = 0.734759 Jy
! Component: 150  -  total flux cleaned = 0.781532 Jy
! Component: 200  -  total flux cleaned = 0.804947 Jy
! Total flux subtracted in 200 components = 0.804947 Jy
! Clean residual min=-0.004408 max=0.011186 Jy/beam
! Clean residual mean=0.000064 rms=0.001306 Jy/beam
! Combined flux in latest and established models = 0.804947 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 9 model components to the UV plane model.
! The established model now contains 9 components and 0.804947 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.171 mas, bmaj=3.56 mas, bpa=-4.155 degrees
! Estimated noise=435.999 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.0217392 Jy
! Component: 100  -  total flux cleaned = 0.0336649 Jy
! Component: 150  -  total flux cleaned = 0.0412816 Jy
! Component: 200  -  total flux cleaned = 0.0466016 Jy
! Total flux subtracted in 200 components = 0.0466016 Jy
! Clean residual min=-0.002887 max=0.003317 Jy/beam
! Clean residual mean=0.000102 rms=0.000736 Jy/beam
! Combined flux in latest and established models = 0.851549 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 41 components and 0.851549 Jy
! Inverting map 
! Added new window around map position (0, -3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00393974 Jy
! Component: 100  -  total flux cleaned = 0.00686949 Jy
! Component: 150  -  total flux cleaned = 0.00909981 Jy
! Component: 200  -  total flux cleaned = 0.010808 Jy
! Total flux subtracted in 200 components = 0.010808 Jy
! Clean residual min=-0.002623 max=0.002874 Jy/beam
! Clean residual mean=0.000028 rms=0.000654 Jy/beam
! Combined flux in latest and established models = 0.862357 Jy
! Adding 25 model components to the UV plane model.
! The established model now contains 55 components and 0.862357 Jy
! Inverting map 
! Added new window around map position (-13, -22).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0015534 Jy
! Component: 100  -  total flux cleaned = 0.00210035 Jy
! Component: 150  -  total flux cleaned = 0.00251262 Jy
! Component: 200  -  total flux cleaned = 0.00278146 Jy
! Total flux subtracted in 200 components = 0.00278146 Jy
! Clean residual min=-0.002694 max=0.002585 Jy/beam
! Clean residual mean=0.000013 rms=0.000635 Jy/beam
! Combined flux in latest and established models = 0.865139 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 78 components and 0.865139 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.58 mas, bmaj=8.834 mas, bpa=29.76 degrees
! Estimated noise=655.111 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000986132 Jy
! Component: 100  -  total flux cleaned = 0.00119553 Jy
! Component: 150  -  total flux cleaned = 0.00122263 Jy
! Component: 200  -  total flux cleaned = 0.0012027 Jy
! Total flux subtracted in 200 components = 0.0012027 Jy
! Clean residual min=-0.002525 max=0.002939 Jy/beam
! Clean residual mean=0.000003 rms=0.000878 Jy/beam
! Combined flux in latest and established models = 0.866341 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 = -3.76465e-05 Jy
! Component: 100  -  total flux cleaned = -7.32274e-05 Jy
! Component: 150  -  total flux cleaned = -0.000106982 Jy
! Component: 200  -  total flux cleaned = -0.000154696 Jy
! Total flux subtracted in 200 components = -0.000154696 Jy
! Clean residual min=-0.002487 max=0.002944 Jy/beam
! Clean residual mean=0.000006 rms=0.000876 Jy/beam
! Combined flux in latest and established models = 0.866187 Jy
! Adding 17 model components to the UV plane model.
! The established model now contains 93 components and 0.866187 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.171 mas, bmaj=3.56 mas, bpa=-4.155 degrees
! Estimated noise=435.999 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000270501 Jy
! Component: 100  -  total flux cleaned = -0.000315485 Jy
! Component: 150  -  total flux cleaned = -0.000357142 Jy
! Component: 200  -  total flux cleaned = -0.000357327 Jy
! Total flux subtracted in 200 components = -0.000357327 Jy
! Clean residual min=-0.002610 max=0.002589 Jy/beam
! Clean residual mean=0.000008 rms=0.000628 Jy/beam
! Combined flux in latest and established models = 0.865829 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 106 components and 0.865829 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.445410Jy  sigma=0.001500
! Fit after  self-cal, rms=1.445399Jy  sigma=0.001500
wmodel J0958+4725_S_2001_04_09_pus_map.mod
! Writing 106 model components to file: J0958+4725_S_2001_04_09_pus_map.mod
wobs J0958+4725_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J0958+4725_S_2001_04_09_pus_uvs.fits
wwins J0958+4725_S_2001_04_09_pus_map.win
! wwins: Wrote 4 windows to J0958+4725_S_2001_04_09_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.000346314 Jy
! Component: 100  -  total flux cleaned = 0.000482103 Jy
! Component: 150  -  total flux cleaned = 0.000356842 Jy
! Component: 200  -  total flux cleaned = 0.000398344 Jy
! Component: 250  -  total flux cleaned = 0.000516788 Jy
! Component: 300  -  total flux cleaned = 0.000555436 Jy
! Component: 350  -  total flux cleaned = 0.000517468 Jy
! Component: 400  -  total flux cleaned = 0.000516915 Jy
! Component: 450  -  total flux cleaned = 0.000406449 Jy
! Component: 500  -  total flux cleaned = 0.000334193 Jy
! Component: 550  -  total flux cleaned = 0.00029871 Jy
! Component: 600  -  total flux cleaned = 0.000369055 Jy
! Component: 650  -  total flux cleaned = 0.000368965 Jy
! Component: 700  -  total flux cleaned = 0.000403636 Jy
! Component: 750  -  total flux cleaned = 0.000403878 Jy
! Component: 800  -  total flux cleaned = 0.000403903 Jy
! Component: 850  -  total flux cleaned = 0.000337616 Jy
! Component: 900  -  total flux cleaned = 0.000403961 Jy
! Component: 950  -  total flux cleaned = 0.000404436 Jy
! Component: 1000  -  total flux cleaned = 0.000436546 Jy
! Component: 1050  -  total flux cleaned = 0.000404445 Jy
! Component: 1100  -  total flux cleaned = 0.000436268 Jy
! Component: 1150  -  total flux cleaned = 0.000373079 Jy
! Component: 1200  -  total flux cleaned = 0.000279176 Jy
! Component: 1250  -  total flux cleaned = 0.000279243 Jy
! Component: 1300  -  total flux cleaned = 0.000186821 Jy
! Component: 1350  -  total flux cleaned = 0.000186754 Jy
! Component: 1400  -  total flux cleaned = 0.0001258 Jy
! Component: 1450  -  total flux cleaned = 6.52533e-05 Jy
! Component: 1500  -  total flux cleaned = 5.36559e-06 Jy
! Component: 1550  -  total flux cleaned = 6.49298e-05 Jy
! Component: 1600  -  total flux cleaned = -5.36558e-05 Jy
! Component: 1650  -  total flux cleaned = -8.30489e-05 Jy
! Component: 1700  -  total flux cleaned = -0.000112343 Jy
! Component: 1750  -  total flux cleaned = -8.34007e-05 Jy
! Component: 1800  -  total flux cleaned = -0.000199501 Jy
! Component: 1850  -  total flux cleaned = -0.000228345 Jy
! Component: 1900  -  total flux cleaned = -0.000285513 Jy
! Component: 1950  -  total flux cleaned = -0.000342531 Jy
! Component: 2000  -  total flux cleaned = -0.000314153 Jy
! Total flux subtracted in 2048 components = -0.000342307 Jy
! Clean residual min=-0.002199 max=0.001837 Jy/beam
! Clean residual mean=0.000003 rms=0.000525 Jy/beam
! Combined flux in latest and established models = 0.865487 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 253 components and 0.865487 Jy
![Exited script file: muppet]
wmap "J0958+4725_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.171 x 3.56 at -4.155 degrees (North through East)
! Clean map  min=-0.002259  max=0.78808 Jy/beam
! Writing clean map to FITS file: J0958+4725_S_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.788076 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000525045 
device "J0958+4725_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J0958+4725_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.199871 0.199871 0.399742 0.799483 1.59897 3.19793 6.39587 12.7917 25.5835 51.1669
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.788 
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.171 x 3.56 at -4.155 degrees (North through East)
! Clean map  min=-0.002259  max=0.78808 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0958+4725_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J0958+4725_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0958+4725_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:01:10 2007