! Started logfile: J0614+6046_S_1999_12_20_pus_uvs.log on Thu Dec 20 14:58:08 2007
obs J0614+6046_S_1999_12_20_pus_uva.fits
! Reading UV FITS file: J0614+6046_S_1999_12_20_pus_uva.fits
! AN table 1: 144 integrations on 190 of 190 possible baselines.
! AN table 2: 295 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.300983 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0614+6046
! 
! 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 100420 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 J0614+6046_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 2271 telescope corrections were flagged in sub-array 1.
!  A total of 2308 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 2271 telescope corrections were flagged in sub-array 1.
!  A total of 2308 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 2271 telescope corrections were flagged in sub-array 1.
!  A total of 2323 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 2271 telescope corrections were flagged in sub-array 1.
!  A total of 2301 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.762169Jy  sigma=0.005083
! Fit after  self-cal, rms=0.606961Jy  sigma=0.003681
! 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.014 mas, bmaj=2.277 mas, bpa=-29.49 degrees
! Estimated noise=922.274 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.422273 Jy
! Component: 100  -  total flux cleaned = 0.556496 Jy
! Total flux subtracted in 100 components = 0.556496 Jy
! Clean residual min=-0.027056 max=0.112919 Jy/beam
! Clean residual mean=0.000185 rms=0.008198 Jy/beam
! Combined flux in latest and established models = 0.556496 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.556496 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.457486Jy  sigma=0.002504
! Fit after  self-cal, rms=0.457571Jy  sigma=0.002500
! Inverting map 
! Added new window around map position (2.5, -3).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.108006 Jy
! Component: 100  -  total flux cleaned = 0.175558 Jy
! Total flux subtracted in 100 components = 0.175558 Jy
! Clean residual min=-0.020589 max=0.038473 Jy/beam
! Clean residual mean=0.000100 rms=0.005634 Jy/beam
! Combined flux in latest and established models = 0.732054 Jy
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 16 components and 0.732054 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.415803Jy  sigma=0.001895
! Fit after  self-cal, rms=0.413815Jy  sigma=0.001882
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0544127 Jy
! Component: 100  -  total flux cleaned = 0.0941215 Jy
! Total flux subtracted in 100 components = 0.0941215 Jy
! Clean residual min=-0.017317 max=0.025867 Jy/beam
! Clean residual mean=0.000052 rms=0.004539 Jy/beam
! Combined flux in latest and established models = 0.826176 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 24 components and 0.826176 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.400415Jy  sigma=0.001636
! Fit after  self-cal, rms=0.399852Jy  sigma=0.001632
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0336585 Jy
! Component: 100  -  total flux cleaned = 0.0589703 Jy
! Total flux subtracted in 100 components = 0.0589703 Jy
! Clean residual min=-0.015256 max=0.021310 Jy/beam
! Clean residual mean=0.000023 rms=0.004033 Jy/beam
! Combined flux in latest and established models = 0.885146 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 32 components and 0.885146 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.394232Jy  sigma=0.001514
! Fit after  self-cal, rms=0.393982Jy  sigma=0.001512
! 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.724 mas, bmaj=2.957 mas, bpa=-26.3 degrees
! Estimated noise=307.359 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 (2.5, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0497124 Jy
! Component: 100  -  total flux cleaned = 0.0825407 Jy
! Component: 150  -  total flux cleaned = 0.105749 Jy
! Component: 200  -  total flux cleaned = 0.122604 Jy
! Total flux subtracted in 200 components = 0.122604 Jy
! Clean residual min=-0.009128 max=0.015636 Jy/beam
! Clean residual mean=-0.000072 rms=0.002663 Jy/beam
! Combined flux in latest and established models = 1.00775 Jy
! Performing phase self-cal
! Adding 46 model components to the UV plane model.
! The established model now contains 70 components and 1.00775 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.388138Jy  sigma=0.001368
! Fit after  self-cal, rms=0.387685Jy  sigma=0.001365
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.00     HH        1.00*    
!   HN        1.00*    KK        1.01     KP        1.00*    LA        1.00*    
!   MC        1.00*    MK        0.99     NY        1.00*    ON        0.88     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.98     
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.97     GC        0.99     HH        1.00*    
!   HN        0.99     KK        1.05     KP        0.94     LA        0.96     
!   MC        0.94     MK        1.03     NY        0.99     ON        1.00     
!   OV        0.97     PT        0.99     SC        1.03     TS        1.11     
!   WF        1.07     WZ        0.97     GN        0.97     NL        0.95     
! 
! 
! Correcting IF 2.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        0.96     HH        1.00*    
!   HN        1.00*    KK        1.00     KP        1.00*    LA        1.00*    
!   MC        1.00*    MK        0.98     NY        1.00*    ON        0.96     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.97     
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.02     GC        0.98     HH        1.00*    
!   HN        1.09     KK        1.10     KP        0.97     LA        0.94     
!   MC        0.85     MK        1.01     NY        0.99     ON        1.03     
!   OV        0.94     PT        0.97     SC        1.01     TS        1.14     
!   WF        1.07     WZ        1.02     GN        0.97     NL        0.94     
! 
! 
! Correcting IF 3.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        0.97     HH        1.00*    
!   HN        1.00*    KK        1.03     KP        1.00*    LA        1.00*    
!   MC        1.00*    MK        0.99     NY        1.00*    ON        0.86     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.96     
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00     GC        1.00     HH        1.00*    
!   HN        1.03     KK        1.15     KP        0.97     LA        0.98     
!   MC        1.00*    MK        1.01     NY        0.99     ON        1.03     
!   OV        0.98     PT        0.95     SC        1.05     TS        1.08     
!   WF        1.08     WZ        1.04     GN        0.98     NL        0.94     
! 
! 
! Correcting IF 4.
!  A total of 48 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        0.96     HH        1.00*    
!   HN        1.00*    KK        1.03     KP        1.00*    LA        1.00*    
!   MC        1.00*    MK        1.03     NY        1.00*    ON        0.91     
!   OV        1.00*    PT        1.00*    SC        1.00*    TS        0.98     
!   WF        1.00*    WZ        1.00*    GN        1.00*    NL        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.99     GC        1.00     HH        1.00*    
!   HN        1.07     KK        1.13     KP        0.98     LA        0.99     
!   MC        0.92     MK        1.06     NY        0.99     ON        1.03     
!   OV        0.95     PT        1.00     SC        1.05     TS        1.11     
!   WF        1.09     WZ        1.03     GN        0.98     NL        0.93     
! 
! 
! Fit before self-cal, rms=0.387685Jy  sigma=0.001365
! Fit after  self-cal, rms=0.392533Jy  sigma=0.001320
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.747 mas, bmaj=3.012 mas, bpa=-21.59 degrees
! Estimated noise=307.515 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 (2, -5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00459484 Jy
! Component: 100  -  total flux cleaned = 0.00478784 Jy
! Component: 150  -  total flux cleaned = 0.00510503 Jy
! Component: 200  -  total flux cleaned = 0.00538444 Jy
! Total flux subtracted in 200 components = 0.00538444 Jy
! Clean residual min=-0.002715 max=0.003294 Jy/beam
! Clean residual mean=0.000056 rms=0.000721 Jy/beam
! Combined flux in latest and established models = 1.01314 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 88 components and 1.01314 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.392295Jy  sigma=0.001316
! Fit after  self-cal, rms=0.392363Jy  sigma=0.001316
! 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.392363Jy  sigma=0.001316
! Fit after  self-cal, rms=0.390774Jy  sigma=0.001316
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.748 mas, bmaj=3.016 mas, bpa=-20.81 degrees
! Estimated noise=307.717 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00117803 Jy
! Component: 100  -  total flux cleaned = 0.00169424 Jy
! Component: 150  -  total flux cleaned = 0.00202009 Jy
! Component: 200  -  total flux cleaned = 0.0022148 Jy
! Total flux subtracted in 200 components = 0.0022148 Jy
! Clean residual min=-0.002417 max=0.002703 Jy/beam
! Clean residual mean=0.000040 rms=0.000645 Jy/beam
! Combined flux in latest and established models = 1.01535 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 92 components and 1.01535 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.390695Jy  sigma=0.001315
! Fit after  self-cal, rms=0.390668Jy  sigma=0.001314
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 (29.5, 54.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00162643 Jy
! Component: 100  -  total flux cleaned = 0.00207207 Jy
! Component: 150  -  total flux cleaned = 0.00230467 Jy
! Component: 200  -  total flux cleaned = 0.00251614 Jy
! Total flux subtracted in 200 components = 0.00251614 Jy
! Clean residual min=-0.002345 max=0.002441 Jy/beam
! Clean residual mean=0.000028 rms=0.000614 Jy/beam
! Combined flux in latest and established models = 1.01787 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 102 components and 1.01787 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.390630Jy  sigma=0.001314
! Fit after  self-cal, rms=0.390623Jy  sigma=0.001314
! 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.390623Jy  sigma=0.001314
! Fit after  self-cal, rms=0.389619Jy  sigma=0.001313
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.748 mas, bmaj=3.021 mas, bpa=-20.07 degrees
! Estimated noise=308.343 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000606774 Jy
! Component: 100  -  total flux cleaned = 0.000924122 Jy
! Component: 150  -  total flux cleaned = 0.00134278 Jy
! Component: 200  -  total flux cleaned = 0.00153294 Jy
! Total flux subtracted in 200 components = 0.00153294 Jy
! Clean residual min=-0.002259 max=0.002347 Jy/beam
! Clean residual mean=0.000022 rms=0.000596 Jy/beam
! Combined flux in latest and established models = 1.0194 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 112 components and 1.0194 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.389586Jy  sigma=0.001313
! Fit after  self-cal, rms=0.389580Jy  sigma=0.001313
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.000390526 Jy
! Component: 100  -  total flux cleaned = 0.000618193 Jy
! Component: 150  -  total flux cleaned = 0.000726202 Jy
! Component: 200  -  total flux cleaned = 0.000830365 Jy
! Total flux subtracted in 200 components = 0.000830365 Jy
! Clean residual min=-0.002213 max=0.002244 Jy/beam
! Clean residual mean=0.000018 rms=0.000584 Jy/beam
! Combined flux in latest and established models = 1.02023 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 118 components and 1.02023 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.389560Jy  sigma=0.001313
! Fit after  self-cal, rms=0.389560Jy  sigma=0.001313
! 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.389560Jy  sigma=0.001313
! Fit after  self-cal, rms=0.389666Jy  sigma=0.001312
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.499 mas, bmaj=10.05 mas, bpa=57.32 degrees
! Estimated noise=427.291 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0021539 Jy
! Component: 100  -  total flux cleaned = 0.00323654 Jy
! Component: 150  -  total flux cleaned = 0.00364093 Jy
! Component: 200  -  total flux cleaned = 0.00370272 Jy
! Total flux subtracted in 200 components = 0.00370272 Jy
! Clean residual min=-0.002791 max=0.003176 Jy/beam
! Clean residual mean=0.000015 rms=0.000861 Jy/beam
! Combined flux in latest and established models = 1.02393 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 132 components and 1.02393 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.389667Jy  sigma=0.001312
! Fit after  self-cal, rms=0.389666Jy  sigma=0.001312
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.000382134 Jy
! Component: 100  -  total flux cleaned = 0.000500869 Jy
! Component: 150  -  total flux cleaned = 0.000480608 Jy
! Component: 200  -  total flux cleaned = 0.000481024 Jy
! Total flux subtracted in 200 components = 0.000481024 Jy
! Clean residual min=-0.002682 max=0.003112 Jy/beam
! Clean residual mean=0.000009 rms=0.000844 Jy/beam
! Combined flux in latest and established models = 1.02441 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 140 components and 1.02441 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.389661Jy  sigma=0.001312
! Fit after  self-cal, rms=0.389661Jy  sigma=0.001312
! 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.749 mas, bmaj=3.023 mas, bpa=-19.57 degrees
! Estimated noise=308.961 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.749 x 3.023 at -19.57 degrees (North through East)
! Clean map  min=-0.0023464  max=0.61051 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.389661Jy  sigma=0.001312
! Fit after  self-cal, rms=0.339310Jy  sigma=0.001223
! Inverting map and beam 
! Estimated beam: bmin=2.751 mas, bmaj=3.021 mas, bpa=-19.74 degrees
! Estimated noise=308.466 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00164769 Jy
! Component: 100  -  total flux cleaned = -0.00198682 Jy
! Component: 150  -  total flux cleaned = -0.00214128 Jy
! Component: 200  -  total flux cleaned = -0.00223769 Jy
! Total flux subtracted in 200 components = -0.00223769 Jy
! Clean residual min=-0.001947 max=0.001939 Jy/beam
! Clean residual mean=0.000018 rms=0.000472 Jy/beam
! Combined flux in latest and established models = 1.02218 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 155 components and 1.02218 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339291Jy  sigma=0.001222
! Fit after  self-cal, rms=0.339308Jy  sigma=0.001222
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000168986 Jy
! Component: 100  -  total flux cleaned = -0.000258084 Jy
! Component: 150  -  total flux cleaned = -0.00025804 Jy
! Component: 200  -  total flux cleaned = -0.000259456 Jy
! Total flux subtracted in 200 components = -0.000259456 Jy
! Clean residual min=-0.001905 max=0.001932 Jy/beam
! Clean residual mean=0.000019 rms=0.000466 Jy/beam
! Combined flux in latest and established models = 1.02192 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 159 components and 1.02192 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339297Jy  sigma=0.001222
! Fit after  self-cal, rms=0.339306Jy  sigma=0.001222
! 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.339306Jy  sigma=0.001222
! Fit after  self-cal, rms=0.339390Jy  sigma=0.001222
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.018 mas, bmaj=2.331 mas, bpa=-21.82 degrees
! Estimated noise=935.62 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.431029 Jy
! Component: 100  -  total flux cleaned = 0.572436 Jy
! Component: 150  -  total flux cleaned = 0.665046 Jy
! Component: 200  -  total flux cleaned = 0.731193 Jy
! Total flux subtracted in 200 components = 0.731193 Jy
! Clean residual min=-0.016317 max=0.037840 Jy/beam
! Clean residual mean=0.000130 rms=0.004810 Jy/beam
! Combined flux in latest and established models = 0.731192 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 17 model components to the UV plane model.
! The established model now contains 17 components and 0.731192 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.753 mas, bmaj=3.023 mas, bpa=-19.54 degrees
! Estimated noise=308.505 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.0968683 Jy
! Component: 100  -  total flux cleaned = 0.155586 Jy
! Component: 150  -  total flux cleaned = 0.194151 Jy
! Component: 200  -  total flux cleaned = 0.22049 Jy
! Total flux subtracted in 200 components = 0.22049 Jy
! Clean residual min=-0.004441 max=0.014506 Jy/beam
! Clean residual mean=0.000418 rms=0.002320 Jy/beam
! Combined flux in latest and established models = 0.951683 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 49 components and 0.951683 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0183486 Jy
! Component: 100  -  total flux cleaned = 0.0313583 Jy
! Component: 150  -  total flux cleaned = 0.0407244 Jy
! Component: 200  -  total flux cleaned = 0.0475587 Jy
! Total flux subtracted in 200 components = 0.0475587 Jy
! Clean residual min=-0.002015 max=0.004437 Jy/beam
! Clean residual mean=0.000138 rms=0.000812 Jy/beam
! Combined flux in latest and established models = 0.999242 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 73 components and 0.999242 Jy
! Inverting map 
! Added new window around map position (-3, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00514161 Jy
! Component: 100  -  total flux cleaned = 0.00895279 Jy
! Component: 150  -  total flux cleaned = 0.01194 Jy
! Component: 200  -  total flux cleaned = 0.0143055 Jy
! Total flux subtracted in 200 components = 0.0143055 Jy
! Clean residual min=-0.001779 max=0.002341 Jy/beam
! Clean residual mean=0.000055 rms=0.000521 Jy/beam
! Combined flux in latest and established models = 1.01355 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 95 components and 1.01355 Jy
! Inverting map 
! Added new window around map position (9.5, 5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00240545 Jy
! Component: 100  -  total flux cleaned = 0.0041155 Jy
! Component: 150  -  total flux cleaned = 0.00520685 Jy
! Component: 200  -  total flux cleaned = 0.00571828 Jy
! Total flux subtracted in 200 components = 0.00571828 Jy
! Clean residual min=-0.001950 max=0.001825 Jy/beam
! Clean residual mean=0.000021 rms=0.000452 Jy/beam
! Combined flux in latest and established models = 1.01927 Jy
! Adding 34 model components to the UV plane model.
! The established model now contains 114 components and 1.01927 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.499 mas, bmaj=10.05 mas, bpa=57.32 degrees
! Estimated noise=426.075 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00178716 Jy
! Component: 100  -  total flux cleaned = 0.00266076 Jy
! Component: 150  -  total flux cleaned = 0.00295229 Jy
! Component: 200  -  total flux cleaned = 0.0030754 Jy
! Total flux subtracted in 200 components = 0.0030754 Jy
! Clean residual min=-0.002249 max=0.001575 Jy/beam
! Clean residual mean=0.000014 rms=0.000516 Jy/beam
! Combined flux in latest and established models = 1.02234 Jy
flux_cutoff = imstat(rms) * dynam
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  keep
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000125219 Jy
! Component: 100  -  total flux cleaned = 0.000161476 Jy
! Component: 150  -  total flux cleaned = 0.000210739 Jy
! Component: 200  -  total flux cleaned = 0.000254624 Jy
! Total flux subtracted in 200 components = 0.000254624 Jy
! Clean residual min=-0.002207 max=0.001544 Jy/beam
! Clean residual mean=0.000007 rms=0.000504 Jy/beam
! Combined flux in latest and established models = 1.0226 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 143 components and 1.0226 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.753 mas, bmaj=3.023 mas, bpa=-19.54 degrees
! Estimated noise=308.505 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00105339 Jy
! Component: 100  -  total flux cleaned = -0.00114675 Jy
! Component: 150  -  total flux cleaned = -0.00114747 Jy
! Component: 200  -  total flux cleaned = -0.00110898 Jy
! Total flux subtracted in 200 components = -0.00110898 Jy
! Clean residual min=-0.001930 max=0.001748 Jy/beam
! Clean residual mean=0.000009 rms=0.000428 Jy/beam
! Combined flux in latest and established models = 1.02149 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 152 components and 1.02149 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339354Jy  sigma=0.001222
! Fit after  self-cal, rms=0.339366Jy  sigma=0.001222
wmodel J0614+6046_S_1999_12_20_pus_map.mod
! Writing 152 model components to file: J0614+6046_S_1999_12_20_pus_map.mod
wobs J0614+6046_S_1999_12_20_pus_uvs.fits
! Writing UV FITS file: J0614+6046_S_1999_12_20_pus_uvs.fits
wwins J0614+6046_S_1999_12_20_pus_map.win
! wwins: Wrote 7 windows to J0614+6046_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.000349748 Jy
! Component: 100  -  total flux cleaned = -0.000471957 Jy
! Component: 150  -  total flux cleaned = -0.000444429 Jy
! Component: 200  -  total flux cleaned = -0.000417749 Jy
! Component: 250  -  total flux cleaned = -0.000312379 Jy
! Component: 300  -  total flux cleaned = -0.000260827 Jy
! Component: 350  -  total flux cleaned = -0.000159915 Jy
! Component: 400  -  total flux cleaned = -8.54028e-05 Jy
! Component: 450  -  total flux cleaned = -1.26861e-05 Jy
! Component: 500  -  total flux cleaned = -1.28399e-05 Jy
! Component: 550  -  total flux cleaned = 5.78338e-05 Jy
! Component: 600  -  total flux cleaned = 5.75085e-05 Jy
! Component: 650  -  total flux cleaned = 8.03336e-05 Jy
! Component: 700  -  total flux cleaned = 8.0329e-05 Jy
! Component: 750  -  total flux cleaned = 0.000125088 Jy
! Component: 800  -  total flux cleaned = 8.08411e-05 Jy
! Component: 850  -  total flux cleaned = 0.000125258 Jy
! Component: 900  -  total flux cleaned = 0.000234033 Jy
! Component: 950  -  total flux cleaned = 0.000255425 Jy
! Component: 1000  -  total flux cleaned = 0.000191158 Jy
! Component: 1050  -  total flux cleaned = 0.000233309 Jy
! Component: 1100  -  total flux cleaned = 0.000149205 Jy
! Component: 1150  -  total flux cleaned = 0.000149124 Jy
! Component: 1200  -  total flux cleaned = 0.000107747 Jy
! Component: 1250  -  total flux cleaned = 0.000107804 Jy
! Component: 1300  -  total flux cleaned = 0.000107814 Jy
! Component: 1350  -  total flux cleaned = 6.73797e-05 Jy
! Component: 1400  -  total flux cleaned = 2.72353e-05 Jy
! Component: 1450  -  total flux cleaned = -3.23761e-05 Jy
! Component: 1500  -  total flux cleaned = -5.18586e-05 Jy
! Component: 1550  -  total flux cleaned = -1.24527e-05 Jy
! Component: 1600  -  total flux cleaned = -1.25671e-05 Jy
! Component: 1650  -  total flux cleaned = -8.99964e-05 Jy
! Component: 1700  -  total flux cleaned = -5.15176e-05 Jy
! Component: 1750  -  total flux cleaned = -5.15109e-05 Jy
! Component: 1800  -  total flux cleaned = -7.04757e-05 Jy
! Component: 1850  -  total flux cleaned = -1.38851e-05 Jy
! Component: 1900  -  total flux cleaned = -7.0342e-05 Jy
! Component: 1950  -  total flux cleaned = -0.000107574 Jy
! Component: 2000  -  total flux cleaned = -5.18829e-05 Jy
! Total flux subtracted in 2048 components = -8.87123e-05 Jy
! Clean residual min=-0.001259 max=0.001048 Jy/beam
! Clean residual mean=0.000008 rms=0.000334 Jy/beam
! Combined flux in latest and established models = 1.0214 Jy
keep
! Adding 143 model components to the UV plane model.
! The established model now contains 295 components and 1.0214 Jy
![Exited script file: muppet]
wmap "J0614+6046_S_1999_12_20_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.753 x 3.023 at -19.54 degrees (North through East)
! Clean map  min=-0.0016606  max=0.61148 Jy/beam
! Writing clean map to FITS file: J0614+6046_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.611484 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000333795 
device "J0614+6046_S_1999_12_20_pus\_map.eps/VPS"
! Attempting to open device: 'J0614+6046_S_1999_12_20_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.163763 0.163763 0.327526 0.655053 1.31011 2.62021 5.24042 10.4808 20.9617 41.9234 83.8468
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.001 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.611 
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.753 x 3.023 at -19.54 degrees (North through East)
! Clean map  min=-0.0016606  max=0.61148 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0614+6046_S_1999_12_20_pus\_map.gif/vgif"
! Attempting to open device: 'J0614+6046_S_1999_12_20_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0614+6046_S_1999_12_20_pus_uvs.log closed on Thu Dec 20 14:58:56 2007