! Started logfile: J0646+4451_S_1999_12_20_pus_uvs.log on Thu Dec 20 14:58:57 2007
obs J0646+4451_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J0646+4451_S_1999_12_20_pus_uva.fits
! AN table 1: 604 integrations on 190 of 190 possible baselines.
! AN table 2: 172 integrations on 190 of 190 possible baselines.
! AN table 3: 32 integrations on 190 of 190 possible baselines.
! AN table 4: 109 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.141709 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0646+4451
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2298 lines of history.
! 
! Reading 98760 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 J0646+4451_S_1999_12_20_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 8737 telescope corrections were flagged in sub-array 1.
!  A total of 2600 telescope corrections were flagged in sub-array 2.
!  A total of 414 telescope corrections were flagged in sub-array 3.
!  A total of 1335 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 8737 telescope corrections were flagged in sub-array 1.
!  A total of 2600 telescope corrections were flagged in sub-array 2.
!  A total of 414 telescope corrections were flagged in sub-array 3.
!  A total of 1335 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 9077 telescope corrections were flagged in sub-array 1.
!  A total of 2600 telescope corrections were flagged in sub-array 2.
!  A total of 414 telescope corrections were flagged in sub-array 3.
!  A total of 1373 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 8737 telescope corrections were flagged in sub-array 1.
!  A total of 2600 telescope corrections were flagged in sub-array 2.
!  A total of 414 telescope corrections were flagged in sub-array 3.
!  A total of 1335 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.912639Jy  sigma=0.006928
! Fit after  self-cal, rms=0.412303Jy  sigma=0.002781
! 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.888 mas, bmaj=2.541 mas, bpa=-3.121 degrees
! Estimated noise=558.32 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.523578 Jy
! Component: 100  -  total flux cleaned = 0.639618 Jy
! Total flux subtracted in 100 components = 0.639618 Jy
! Clean residual min=-0.008016 max=0.039085 Jy/beam
! Clean residual mean=0.000032 rms=0.002336 Jy/beam
! Combined flux in latest and established models = 0.639617 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.639617 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.276542Jy  sigma=0.001663
! Fit after  self-cal, rms=0.276526Jy  sigma=0.001663
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0433075 Jy
! Component: 100  -  total flux cleaned = 0.0696258 Jy
! Total flux subtracted in 100 components = 0.0696258 Jy
! Clean residual min=-0.007170 max=0.026357 Jy/beam
! Clean residual mean=0.000008 rms=0.001928 Jy/beam
! Combined flux in latest and established models = 0.709243 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 13 components and 0.709243 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.267011Jy  sigma=0.001522
! Fit after  self-cal, rms=0.266896Jy  sigma=0.001522
! Inverting map 
! Added new window around map position (4, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0243894 Jy
! Component: 100  -  total flux cleaned = 0.0405904 Jy
! Total flux subtracted in 100 components = 0.0405904 Jy
! Clean residual min=-0.007585 max=0.009712 Jy/beam
! Clean residual mean=-0.000005 rms=0.001776 Jy/beam
! Combined flux in latest and established models = 0.749834 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 22 components and 0.749834 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.263783Jy  sigma=0.001474
! Fit after  self-cal, rms=0.263578Jy  sigma=0.001473
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0137035 Jy
! Component: 100  -  total flux cleaned = 0.0243435 Jy
! Total flux subtracted in 100 components = 0.0243435 Jy
! Clean residual min=-0.007684 max=0.008235 Jy/beam
! Clean residual mean=-0.000013 rms=0.001709 Jy/beam
! Combined flux in latest and established models = 0.774177 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 31 components and 0.774177 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.262643Jy  sigma=0.001456
! Fit after  self-cal, rms=0.262587Jy  sigma=0.001455
! 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.302 mas, bmaj=3.155 mas, bpa=-5.625 degrees
! Estimated noise=308.426 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.0125892 Jy
! Component: 100  -  total flux cleaned = 0.0203705 Jy
! Component: 150  -  total flux cleaned = 0.0255655 Jy
! Component: 200  -  total flux cleaned = 0.0290564 Jy
! Total flux subtracted in 200 components = 0.0290564 Jy
! Clean residual min=-0.005702 max=0.005052 Jy/beam
! Clean residual mean=-0.000326 rms=0.001320 Jy/beam
! Combined flux in latest and established models = 0.803234 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 45 components and 0.803234 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.262181Jy  sigma=0.001445
! Fit after  self-cal, rms=0.262116Jy  sigma=0.001445
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 216 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.03     GC        1.03     HH        1.11     
!   HN        1.01     KK        1.05     KP        1.02     LA        1.02     
!   MC        1.00     MK        1.02     NY        1.02     ON        1.05     
!   OV        0.99     PT        1.04     SC        1.01     TS        1.08     
!   WF        1.05     WZ        1.00     GN        1.04     NL        1.02     
! 
!  A total of 312 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.01     GC        1.07     HH        1.00*    
!   HN        1.00     KK        0.99     KP        1.12     LA        0.99     
!   MC        1.00*    MK        1.01     NY        0.96     ON        0.88     
!   OV        1.00     PT        1.03     SC        1.14     TS        1.02     
!   WF        1.00     WZ        1.17     GN        1.03     NL        0.97     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.07     GC        1.00     HH        1.00*    
!   HN        1.11     KK        1.00     KP        1.03     LA        1.03     
!   MC        1.00*    MK        0.94     NY        1.08     ON        0.95     
!   OV        0.98     PT        1.07     SC        1.00*    TS        1.10     
!   WF        1.00*    WZ        1.93     GN        1.00*    NL        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.96     GC        1.02     HH        1.00*    
!   HN        0.98     KK        1.01     KP        0.92     LA        0.97     
!   MC        1.02     MK        0.98     NY        1.00     ON        1.51     
!   OV        0.95     PT        0.98     SC        1.05     TS        1.07     
!   WF        0.86     WZ        1.08     GN        1.08     NL        0.97     
! 
! 
! Correcting IF 2.
!  A total of 216 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.07     GC        1.02     HH        1.03     
!   HN        1.06     KK        1.01     KP        1.02     LA        1.00     
!   MC        1.03     MK        0.99     NY        1.02     ON        1.04     
!   OV        0.96     PT        1.02     SC        1.02     TS        1.08     
!   WF        1.03     WZ        1.03     GN        1.05     NL        1.01     
! 
!  A total of 312 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.05     GC        1.01     HH        1.00*    
!   HN        1.06     KK        0.94     KP        1.04     LA        0.98     
!   MC        1.00*    MK        1.00     NY        0.95     ON        1.06     
!   OV        0.96     PT        1.01     SC        1.11     TS        1.03     
!   WF        0.99     WZ        1.23     GN        1.00     NL        0.99     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.08     GC        0.99     HH        1.00*    
!   HN        1.15     KK        0.98     KP        1.05     LA        1.00     
!   MC        1.00*    MK        0.91     NY        1.04     ON        1.09     
!   OV        0.95     PT        1.03     SC        1.00*    TS        1.09     
!   WF        1.00*    WZ        2.21     GN        1.00*    NL        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.99     GC        1.02     HH        1.00*    
!   HN        1.03     KK        0.99     KP        0.95     LA        0.94     
!   MC        0.95     MK        0.95     NY        0.99     ON        1.00     
!   OV        0.93     PT        0.96     SC        1.04     TS        1.07     
!   WF        1.04     WZ        1.13     GN        1.06     NL        0.96     
! 
! 
! Correcting IF 3.
!  A total of 267 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.02     GC        1.01     HH        1.02     
!   HN        1.01     KK        1.02     KP        1.00     LA        1.00     
!   MC        1.00*    MK        0.96     NY        0.98     ON        1.01     
!   OV        0.97     PT        0.98     SC        1.01     TS        1.00     
!   WF        1.00     WZ        1.03     GN        1.03     NL        0.96     
! 
!  A total of 312 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.01     GC        1.02     HH        1.00*    
!   HN        0.99     KK        0.94     KP        0.97     LA        0.97     
!   MC        1.00*    MK        0.96     NY        0.94     ON        0.97     
!   OV        0.96     PT        0.95     SC        1.11     TS        0.94     
!   WF        0.96     WZ        1.26     GN        1.00     NL        0.94     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        1.03     GC        0.99     HH        1.00*    
!   HN        1.15     KK        1.01     KP        1.00     LA        1.00     
!   MC        1.00*    MK        0.90     NY        1.06     ON        1.01     
!   OV        0.97     PT        0.97     SC        1.00*    TS        1.02     
!   WF        1.00*    WZ        2.26     GN        1.00*    NL        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.93     FD        0.94     GC        1.00     HH        1.00*    
!   HN        0.98     KK        1.00     KP        0.93     LA        0.95     
!   MC        1.00*    MK        0.91     NY        0.98     ON        1.02     
!   OV        0.93     PT        0.91     SC        1.05     TS        1.00     
!   WF        1.02     WZ        1.12     GN        1.04     NL        0.93     
! 
! 
! Correcting IF 4.
!  A total of 216 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.99     GC        0.99     HH        1.00     
!   HN        1.00     KK        1.01     KP        0.99     LA        1.00     
!   MC        1.03     MK        0.98     NY        0.97     ON        1.00     
!   OV        0.92     PT        1.00     SC        1.02     TS        0.98     
!   WF        0.99     WZ        1.02     GN        1.02     NL        0.95     
! 
!  A total of 312 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        0.98     GC        0.98     HH        1.00*    
!   HN        0.97     KK        0.93     KP        0.98     LA        0.97     
!   MC        1.00*    MK        0.98     NY        0.92     ON        0.93     
!   OV        0.93     PT        0.98     SC        1.09     TS        0.97     
!   WF        0.98     WZ        1.24     GN        0.96     NL        0.94     
! 
!  A total of 18 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        1.03     GC        0.95     HH        1.00*    
!   HN        1.09     KK        0.98     KP        1.01     LA        1.00     
!   MC        1.00*    MK        0.91     NY        1.08     ON        0.96     
!   OV        0.91     PT        0.87     SC        1.00*    TS        1.01     
!   WF        1.00*    WZ        2.13     GN        1.00*    NL        1.00*    
! 
!  A total of 9 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.91     FD        0.93     GC        0.98     HH        1.00*    
!   HN        0.97     KK        0.97     KP        0.91     LA        0.93     
!   MC        0.86     MK        0.95     NY        0.98     ON        1.01     
!   OV        0.89     PT        1.01     SC        1.02     TS        1.02     
!   WF        1.01     WZ        1.11     GN        1.04     NL        0.91     
! 
! 
! Fit before self-cal, rms=0.262116Jy  sigma=0.001445
! Fit after  self-cal, rms=0.276135Jy  sigma=0.001385
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.321 mas, bmaj=3.187 mas, bpa=-7.095 degrees
! Estimated noise=310.668 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.000334748 Jy
! Component: 100  -  total flux cleaned = -0.00129163 Jy
! Component: 150  -  total flux cleaned = -0.00215834 Jy
! Component: 200  -  total flux cleaned = -0.00246595 Jy
! Total flux subtracted in 200 components = -0.00246595 Jy
! Clean residual min=-0.004601 max=0.003658 Jy/beam
! Clean residual mean=-0.000287 rms=0.000978 Jy/beam
! Combined flux in latest and established models = 0.800768 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 53 components and 0.800768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.275979Jy  sigma=0.001384
! Fit after  self-cal, rms=0.276256Jy  sigma=0.001384
! 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.276256Jy  sigma=0.001384
! Fit after  self-cal, rms=0.302887Jy  sigma=0.001333
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.324 mas, bmaj=3.193 mas, bpa=-7.054 degrees
! Estimated noise=310.393 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00133585 Jy
! Component: 100  -  total flux cleaned = 0.000793599 Jy
! Component: 150  -  total flux cleaned = 0.000636398 Jy
! Component: 200  -  total flux cleaned = 0.000576076 Jy
! Total flux subtracted in 200 components = 0.000576076 Jy
! Clean residual min=-0.002180 max=0.001826 Jy/beam
! Clean residual mean=-0.000095 rms=0.000489 Jy/beam
! Combined flux in latest and established models = 0.801344 Jy
selfcal
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 57 components and 0.801344 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302815Jy  sigma=0.001332
! Fit after  self-cal, rms=0.303078Jy  sigma=0.001332
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.000425384 Jy
! Component: 100  -  total flux cleaned = 0.000320104 Jy
! Component: 150  -  total flux cleaned = 0.000272299 Jy
! Component: 200  -  total flux cleaned = 0.000186947 Jy
! Total flux subtracted in 200 components = 0.000186947 Jy
! Clean residual min=-0.002123 max=0.001778 Jy/beam
! Clean residual mean=-0.000096 rms=0.000483 Jy/beam
! Combined flux in latest and established models = 0.801531 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 61 components and 0.801531 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.303062Jy  sigma=0.001332
! Fit after  self-cal, rms=0.303064Jy  sigma=0.001332
! 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.303064Jy  sigma=0.001332
! Fit after  self-cal, rms=0.321967Jy  sigma=0.001325
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.325 mas, bmaj=3.198 mas, bpa=-7.164 degrees
! Estimated noise=310.232 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00103057 Jy
! Component: 100  -  total flux cleaned = -0.00132594 Jy
! Component: 150  -  total flux cleaned = -0.00132539 Jy
! Component: 200  -  total flux cleaned = -0.0013261 Jy
! Total flux subtracted in 200 components = -0.0013261 Jy
! Clean residual min=-0.002061 max=0.001821 Jy/beam
! Clean residual mean=-0.000107 rms=0.000454 Jy/beam
! Combined flux in latest and established models = 0.800205 Jy
selfcal
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 62 components and 0.800204 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.321948Jy  sigma=0.001325
! Fit after  self-cal, rms=0.322488Jy  sigma=0.001324
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.3334e-05 Jy
! Component: 100  -  total flux cleaned = 7.41052e-05 Jy
! Component: 150  -  total flux cleaned = 7.4117e-05 Jy
! Component: 200  -  total flux cleaned = 4.65206e-05 Jy
! Total flux subtracted in 200 components = 4.65206e-05 Jy
! Clean residual min=-0.002076 max=0.001838 Jy/beam
! Clean residual mean=-0.000107 rms=0.000452 Jy/beam
! Combined flux in latest and established models = 0.800251 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 66 components and 0.800251 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.322481Jy  sigma=0.001324
! Fit after  self-cal, rms=0.322480Jy  sigma=0.001324
! 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.322480Jy  sigma=0.001324
! Fit after  self-cal, rms=0.453953Jy  sigma=0.001324
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.037 mas, bmaj=8.278 mas, bpa=13.75 degrees
! Estimated noise=463.748 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00120894 Jy
! Component: 100  -  total flux cleaned = -0.00127705 Jy
! Component: 150  -  total flux cleaned = -0.00132121 Jy
! Component: 200  -  total flux cleaned = -0.00135026 Jy
! Total flux subtracted in 200 components = -0.00135026 Jy
! Clean residual min=-0.002277 max=0.001760 Jy/beam
! Clean residual mean=-0.000391 rms=0.000634 Jy/beam
! Combined flux in latest and established models = 0.798901 Jy
selfcal
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 70 components and 0.798901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.453954Jy  sigma=0.001324
! Fit after  self-cal, rms=0.453813Jy  sigma=0.001324
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 = 6.90825e-05 Jy
! Component: 100  -  total flux cleaned = 3.64322e-05 Jy
! Component: 150  -  total flux cleaned = 1.54103e-05 Jy
! Component: 200  -  total flux cleaned = 1.76473e-06 Jy
! Total flux subtracted in 200 components = 1.76473e-06 Jy
! Clean residual min=-0.002280 max=0.001748 Jy/beam
! Clean residual mean=-0.000391 rms=0.000634 Jy/beam
! Combined flux in latest and established models = 0.798903 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 70 components and 0.798903 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.453814Jy  sigma=0.001324
! Fit after  self-cal, rms=0.453815Jy  sigma=0.001324
! 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.327 mas, bmaj=3.202 mas, bpa=-7.222 degrees
! Estimated noise=310.2 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.327 x 3.202 at -7.222 degrees (North through East)
! Clean map  min=-0.0019117  max=0.68684 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.453815Jy  sigma=0.001324
! Fit after  self-cal, rms=0.958123Jy  sigma=0.001236
! Inverting map and beam 
! Estimated beam: bmin=2.329 mas, bmaj=3.202 mas, bpa=-7.15 degrees
! Estimated noise=310.006 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00138144 Jy
! Component: 100  -  total flux cleaned = -0.00165406 Jy
! Component: 150  -  total flux cleaned = -0.0017889 Jy
! Component: 200  -  total flux cleaned = -0.0018566 Jy
! Total flux subtracted in 200 components = -0.0018566 Jy
! Clean residual min=-0.001834 max=0.001626 Jy/beam
! Clean residual mean=-0.000085 rms=0.000419 Jy/beam
! Combined flux in latest and established models = 0.797046 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 74 components and 0.797046 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.958114Jy  sigma=0.001236
! Fit after  self-cal, rms=0.958117Jy  sigma=0.001236
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -6.68818e-05 Jy
! Component: 100  -  total flux cleaned = -8.56789e-05 Jy
! Component: 150  -  total flux cleaned = -8.58855e-05 Jy
! Component: 200  -  total flux cleaned = -0.000102483 Jy
! Total flux subtracted in 200 components = -0.000102483 Jy
! Clean residual min=-0.001840 max=0.001629 Jy/beam
! Clean residual mean=-0.000084 rms=0.000418 Jy/beam
! Combined flux in latest and established models = 0.796943 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 75 components and 0.796943 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.958118Jy  sigma=0.001236
! Fit after  self-cal, rms=0.958117Jy  sigma=0.001236
! 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.958117Jy  sigma=0.001236
! Fit after  self-cal, rms=1.488758Jy  sigma=0.001236
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=1.91 mas, bmaj=2.573 mas, bpa=-3.994 degrees
! Estimated noise=562.188 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.526742 Jy
! Component: 100  -  total flux cleaned = 0.642092 Jy
! Component: 150  -  total flux cleaned = 0.685401 Jy
! Component: 200  -  total flux cleaned = 0.713112 Jy
! Total flux subtracted in 200 components = 0.713112 Jy
! Clean residual min=-0.003497 max=0.014977 Jy/beam
! Clean residual mean=0.000025 rms=0.001072 Jy/beam
! Combined flux in latest and established models = 0.713112 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 11 model components to the UV plane model.
! The established model now contains 11 components and 0.713112 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.33 mas, bmaj=3.204 mas, bpa=-7.201 degrees
! Estimated noise=309.97 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)
! Added new window around map position (2, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.032002 Jy
! Component: 100  -  total flux cleaned = 0.0503392 Jy
! Component: 150  -  total flux cleaned = 0.0619745 Jy
! Component: 200  -  total flux cleaned = 0.0695978 Jy
! Total flux subtracted in 200 components = 0.0695978 Jy
! Clean residual min=-0.001824 max=0.004085 Jy/beam
! Clean residual mean=-0.000035 rms=0.000517 Jy/beam
! Combined flux in latest and established models = 0.78271 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 42 components and 0.78271 Jy
! Inverting map 
! Added new window around map position (6, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00503672 Jy
! Component: 100  -  total flux cleaned = 0.00839991 Jy
! Component: 150  -  total flux cleaned = 0.0106761 Jy
! Component: 200  -  total flux cleaned = 0.0122454 Jy
! Total flux subtracted in 200 components = 0.0122454 Jy
! Clean residual min=-0.001829 max=0.001800 Jy/beam
! Clean residual mean=-0.000080 rms=0.000422 Jy/beam
! Combined flux in latest and established models = 0.794955 Jy
! Adding 19 model components to the UV plane model.
! The established model now contains 52 components and 0.794955 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=8.042 mas, bmaj=8.284 mas, bpa=13.37 degrees
! Estimated noise=462.067 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000990471 Jy
! Component: 100  -  total flux cleaned = 0.00102686 Jy
! Component: 150  -  total flux cleaned = 0.000979134 Jy
! Component: 200  -  total flux cleaned = 0.000922937 Jy
! Total flux subtracted in 200 components = 0.000922937 Jy
! Clean residual min=-0.002056 max=0.001720 Jy/beam
! Clean residual mean=-0.000303 rms=0.000603 Jy/beam
! Combined flux in latest and established models = 0.795878 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.12916e-05 Jy
! Component: 100  -  total flux cleaned = -7.46545e-05 Jy
! Component: 150  -  total flux cleaned = -0.000113751 Jy
! Component: 200  -  total flux cleaned = -0.000148967 Jy
! Total flux subtracted in 200 components = -0.000148967 Jy
! Clean residual min=-0.002035 max=0.001730 Jy/beam
! Clean residual mean=-0.000300 rms=0.000601 Jy/beam
! Combined flux in latest and established models = 0.795729 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 67 components and 0.795729 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.33 mas, bmaj=3.204 mas, bpa=-7.201 degrees
! Estimated noise=309.97 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000150942 Jy
! Component: 100  -  total flux cleaned = -0.000112219 Jy
! Component: 150  -  total flux cleaned = -7.68613e-05 Jy
! Component: 200  -  total flux cleaned = -4.35974e-05 Jy
! Total flux subtracted in 200 components = -4.35974e-05 Jy
! Clean residual min=-0.001813 max=0.001763 Jy/beam
! Clean residual mean=-0.000083 rms=0.000417 Jy/beam
! Combined flux in latest and established models = 0.795686 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 76 components and 0.795685 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.488772Jy  sigma=0.001236
! Fit after  self-cal, rms=1.488776Jy  sigma=0.001236
wmodel J0646+4451_S_1999_12_20_pus_map.mod
! Writing 76 model components to file: J0646+4451_S_1999_12_20_pus_map.mod
wobs J0646+4451_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J0646+4451_S_1999_12_20_pus_uvs.fits
wwins J0646+4451_S_1999_12_20_pus_map.win
! wwins: Wrote 4 windows to J0646+4451_S_1999_12_20_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.000298684 Jy
! Component: 100  -  total flux cleaned = -0.000661256 Jy
! Component: 150  -  total flux cleaned = -0.000978023 Jy
! Component: 200  -  total flux cleaned = -0.00134031 Jy
! Component: 250  -  total flux cleaned = -0.00169366 Jy
! Component: 300  -  total flux cleaned = -0.00198651 Jy
! Component: 350  -  total flux cleaned = -0.00224885 Jy
! Component: 400  -  total flux cleaned = -0.00253271 Jy
! Component: 450  -  total flux cleaned = -0.0027868 Jy
! Component: 500  -  total flux cleaned = -0.00306276 Jy
! Component: 550  -  total flux cleaned = -0.00333511 Jy
! Component: 600  -  total flux cleaned = -0.0035797 Jy
! Component: 650  -  total flux cleaned = -0.00377322 Jy
! Component: 700  -  total flux cleaned = -0.00398863 Jy
! Component: 750  -  total flux cleaned = -0.00410732 Jy
! Component: 800  -  total flux cleaned = -0.0043655 Jy
! Component: 850  -  total flux cleaned = -0.0045512 Jy
! Component: 900  -  total flux cleaned = -0.00475818 Jy
! Component: 950  -  total flux cleaned = -0.004986 Jy
! Component: 1000  -  total flux cleaned = -0.00514414 Jy
! Component: 1050  -  total flux cleaned = -0.00532374 Jy
! Component: 1100  -  total flux cleaned = -0.00547992 Jy
! Component: 1150  -  total flux cleaned = -0.00572353 Jy
! Component: 1200  -  total flux cleaned = -0.00587734 Jy
! Component: 1250  -  total flux cleaned = -0.00605219 Jy
! Component: 1300  -  total flux cleaned = -0.00622595 Jy
! Component: 1350  -  total flux cleaned = -0.00642023 Jy
! Component: 1400  -  total flux cleaned = -0.00661348 Jy
! Component: 1450  -  total flux cleaned = -0.00678426 Jy
! Component: 1500  -  total flux cleaned = -0.00701771 Jy
! Component: 1550  -  total flux cleaned = -0.00714441 Jy
! Component: 1600  -  total flux cleaned = -0.00731262 Jy
! Component: 1650  -  total flux cleaned = -0.0074592 Jy
! Component: 1700  -  total flux cleaned = -0.00766732 Jy
! Component: 1750  -  total flux cleaned = -0.00775026 Jy
! Component: 1800  -  total flux cleaned = -0.0079565 Jy
! Component: 1850  -  total flux cleaned = -0.00803868 Jy
! Component: 1900  -  total flux cleaned = -0.00820221 Jy
! Component: 1950  -  total flux cleaned = -0.00836501 Jy
! Component: 2000  -  total flux cleaned = -0.00848653 Jy
! Total flux subtracted in 2048 components = -0.00856719 Jy
! Clean residual min=-0.001169 max=0.001009 Jy/beam
! Clean residual mean=-0.000044 rms=0.000380 Jy/beam
! Combined flux in latest and established models = 0.787118 Jy
keep
! Adding 158 model components to the UV plane model.
! The established model now contains 234 components and 0.787118 Jy
![Exited script file: muppet]
wmap "J0646+4451_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.33 x 3.204 at -7.201 degrees (North through East)
! Clean map  min=-0.001732  max=0.68726 Jy/beam
! Writing clean map to FITS file: J0646+4451_S_1999_12_20_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.687257 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000380227 
device "J0646+4451_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J0646+4451_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.165976 0.165976 0.331951 0.663903 1.32781 2.65561 5.31122 10.6224 21.2449 42.4898 84.9795
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.687 
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.33 x 3.204 at -7.201 degrees (North through East)
! Clean map  min=-0.001732  max=0.68726 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0646+4451_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J0646+4451_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0646+4451_S_1999_12_20_pus_uvs.log closed on Thu Dec 20 15:00:03 2007