! Started logfile: J1130+3815_S_2000_12_04_pus_uvs.log on Thu Oct 18 16:37:50 2007
obs J1130+3815_S_2000_12_04_pus_uva.fits
! Reading UV FITS file: J1130+3815_S_2000_12_04_pus_uva.fits
! AN table 1: 93 integrations on 190 of 190 possible baselines.
! AN table 2: 183 integrations on 190 of 190 possible baselines.
! AN table 3: 106 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.172155 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1130+3815
! 
! 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 2173 lines of history.
! 
! Reading 49980 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 J1130+3815_S_2000_12_04_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 1412 telescope corrections were flagged in sub-array 1.
!  A total of 2305 telescope corrections were flagged in sub-array 2.
!  A total of 1522 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1412 telescope corrections were flagged in sub-array 1.
!  A total of 2299 telescope corrections were flagged in sub-array 2.
!  A total of 1522 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1412 telescope corrections were flagged in sub-array 1.
!  A total of 2299 telescope corrections were flagged in sub-array 2.
!  A total of 1522 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1412 telescope corrections were flagged in sub-array 1.
!  A total of 2302 telescope corrections were flagged in sub-array 2.
!  A total of 1522 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.788547Jy  sigma=0.006161
! Fit after  self-cal, rms=0.533596Jy  sigma=0.004017
! 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.91 mas, bmaj=2.992 mas, bpa=-9.283 degrees
! Estimated noise=707.513 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.428012 Jy
! Component: 100  -  total flux cleaned = 0.525768 Jy
! Total flux subtracted in 100 components = 0.525768 Jy
! Clean residual min=-0.010558 max=0.036709 Jy/beam
! Clean residual mean=-0.000045 rms=0.002895 Jy/beam
! Combined flux in latest and established models = 0.525768 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.525768 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.279502Jy  sigma=0.001907
! Fit after  self-cal, rms=0.279414Jy  sigma=0.001907
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0404958 Jy
! Component: 100  -  total flux cleaned = 0.0648624 Jy
! Total flux subtracted in 100 components = 0.0648624 Jy
! Clean residual min=-0.009016 max=0.013156 Jy/beam
! Clean residual mean=-0.000029 rms=0.002193 Jy/beam
! Combined flux in latest and established models = 0.590631 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 18 components and 0.590631 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273632Jy  sigma=0.001812
! Fit after  self-cal, rms=0.273462Jy  sigma=0.001812
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0167341 Jy
! Component: 100  -  total flux cleaned = 0.0285405 Jy
! Total flux subtracted in 100 components = 0.0285405 Jy
! Clean residual min=-0.008828 max=0.011443 Jy/beam
! Clean residual mean=-0.000022 rms=0.002043 Jy/beam
! Combined flux in latest and established models = 0.619171 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 29 components and 0.619171 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.272619Jy  sigma=0.001793
! Fit after  self-cal, rms=0.272570Jy  sigma=0.001793
! 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.22 mas, bmaj=3.567 mas, bpa=-12.41 degrees
! Estimated noise=405.203 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 (-5.5, 2.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0151256 Jy
! Component: 100  -  total flux cleaned = 0.0253237 Jy
! Component: 150  -  total flux cleaned = 0.0329136 Jy
! Component: 200  -  total flux cleaned = 0.0371859 Jy
! Total flux subtracted in 200 components = 0.0371859 Jy
! Clean residual min=-0.007940 max=0.009685 Jy/beam
! Clean residual mean=-0.000192 rms=0.001992 Jy/beam
! Combined flux in latest and established models = 0.656357 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 55 components and 0.656357 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.271796Jy  sigma=0.001780
! Fit after  self-cal, rms=0.271694Jy  sigma=0.001780
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.03     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.47     KK        1.00*    KP        0.94     
!   LA        1.03     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.01     NY        1.04     OV        1.01     PT        1.00     
!   SC        1.00*    TS        1.01     WF        1.06     WZ        1.00*    
! 
!  A total of 96 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.98     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00     KP        0.98     
!   LA        1.04     MA        2.02     MC        1.07     MK        1.03     
!   NL        0.99     NY        0.98     OV        0.97     PT        1.00     
!   SC        1.06     TS        1.00     WF        1.09     WZ        0.97     
! 
!  A total of 24 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.89     FD        0.91     GC        1.07     GG        1.00*    
!   HH        1.00*    HN        0.80     KK        0.98     KP        1.19     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        0.86     NY        1.01     OV        1.00*    PT        0.90     
!   SC        1.02     TS        1.08     WF        1.39     WZ        1.17     
! 
! 
! Correcting IF 2.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.03     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.45     KK        1.00*    KP        0.98     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        0.97     NY        0.98     OV        0.98     PT        1.01     
!   SC        1.00*    TS        0.99     WF        1.09     WZ        1.00*    
! 
!  A total of 102 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.99     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        0.96     KP        0.98     
!   LA        1.00     MA        1.69     MC        0.97     MK        1.03     
!   NL        0.95     NY        1.03     OV        0.95     PT        1.01     
!   SC        1.04     TS        1.01     WF        1.03     WZ        0.96     
! 
!  A total of 24 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.88     FD        0.93     GC        1.12     GG        1.00*    
!   HH        1.00*    HN        0.82     KK        0.94     KP        0.94     
!   LA        0.91     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        0.83     NY        1.00     OV        1.00*    PT        0.92     
!   SC        0.99     TS        1.08     WF        1.55     WZ        1.17     
! 
! 
! Correcting IF 3.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        1.04     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.37     KK        1.00*    KP        1.04     
!   LA        1.02     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        0.96     NY        1.00     OV        0.97     PT        1.01     
!   SC        1.00*    TS        0.99     WF        1.04     WZ        1.00*    
! 
!  A total of 102 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        0.99     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.15     KK        0.92     KP        1.10     
!   LA        0.95     MA        1.10     MC        1.99     MK        0.99     
!   NL        1.14     NY        0.99     OV        1.06     PT        0.93     
!   SC        1.02     TS        1.00     WF        0.97     WZ        0.85     
! 
!  A total of 24 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.86     FD        0.94     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.84     KK        0.90     KP        0.96     
!   LA        0.94     MA        1.00*    MC        1.00*    MK        0.93     
!   NL        0.91     NY        1.00     OV        1.00*    PT        0.91     
!   SC        1.02     TS        1.07     WF        0.95     WZ        0.98     
! 
! 
! Correcting IF 4.
!  A total of 27 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        1.02     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.37     KK        1.00*    KP        1.01     
!   LA        1.03     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.02     NY        1.06     OV        1.01     PT        1.04     
!   SC        1.00*    TS        0.98     WF        1.05     WZ        1.00*    
! 
!  A total of 99 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.00     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.95     KP        0.99     
!   LA        1.00     MA        1.24     MC        0.98     MK        1.02     
!   NL        0.97     NY        1.03     OV        0.98     PT        1.09     
!   SC        1.08     TS        1.01     WF        1.00     WZ        0.99     
! 
!  A total of 24 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.86     FD        0.91     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.83     KK        0.95     KP        0.91     
!   LA        0.89     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        0.86     NY        1.05     OV        1.00*    PT        0.88     
!   SC        1.08     TS        1.08     WF        1.08     WZ        1.20     
! 
! 
! Fit before self-cal, rms=0.271694Jy  sigma=0.001780
! Fit after  self-cal, rms=0.325551Jy  sigma=0.001697
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.248 mas, bmaj=3.63 mas, bpa=-12.01 degrees
! Estimated noise=408.607 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 (-11.5, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00360328 Jy
! Component: 100  -  total flux cleaned = 0.00415544 Jy
! Component: 150  -  total flux cleaned = 0.00484728 Jy
! Component: 200  -  total flux cleaned = 0.00533766 Jy
! Total flux subtracted in 200 components = 0.00533766 Jy
! Clean residual min=-0.003540 max=0.003179 Jy/beam
! Clean residual mean=0.000041 rms=0.000841 Jy/beam
! Combined flux in latest and established models = 0.661695 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 77 components and 0.661695 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325454Jy  sigma=0.001696
! Fit after  self-cal, rms=0.326056Jy  sigma=0.001695
! 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.326056Jy  sigma=0.001695
! Fit after  self-cal, rms=0.330708Jy  sigma=0.001687
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.251 mas, bmaj=3.626 mas, bpa=-12.03 degrees
! Estimated noise=408.704 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00161031 Jy
! Component: 100  -  total flux cleaned = 0.00185948 Jy
! Component: 150  -  total flux cleaned = 0.00207007 Jy
! Component: 200  -  total flux cleaned = 0.00206773 Jy
! Total flux subtracted in 200 components = 0.00206773 Jy
! Clean residual min=-0.003406 max=0.002960 Jy/beam
! Clean residual mean=-0.000020 rms=0.000748 Jy/beam
! Combined flux in latest and established models = 0.663762 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 98 components and 0.663762 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330670Jy  sigma=0.001687
! Fit after  self-cal, rms=0.330728Jy  sigma=0.001687
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.00062556 Jy
! Component: 100  -  total flux cleaned = 0.000738273 Jy
! Component: 150  -  total flux cleaned = 0.000841795 Jy
! Component: 200  -  total flux cleaned = 0.000889697 Jy
! Total flux subtracted in 200 components = 0.000889697 Jy
! Clean residual min=-0.003414 max=0.002908 Jy/beam
! Clean residual mean=-0.000025 rms=0.000739 Jy/beam
! Combined flux in latest and established models = 0.664652 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 104 components and 0.664652 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330709Jy  sigma=0.001687
! Fit after  self-cal, rms=0.330709Jy  sigma=0.001687
! 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.330709Jy  sigma=0.001687
! Fit after  self-cal, rms=0.332344Jy  sigma=0.001686
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.253 mas, bmaj=3.626 mas, bpa=-12.01 degrees
! Estimated noise=408.956 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000971198 Jy
! Component: 100  -  total flux cleaned = 0.00112998 Jy
! Component: 150  -  total flux cleaned = 0.00117637 Jy
! Component: 200  -  total flux cleaned = 0.00122039 Jy
! Total flux subtracted in 200 components = 0.00122039 Jy
! Clean residual min=-0.003371 max=0.002851 Jy/beam
! Clean residual mean=-0.000040 rms=0.000736 Jy/beam
! Combined flux in latest and established models = 0.665873 Jy
selfcal
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 113 components and 0.665873 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332330Jy  sigma=0.001686
! Fit after  self-cal, rms=0.332326Jy  sigma=0.001686
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.000335221 Jy
! Component: 100  -  total flux cleaned = 0.000416732 Jy
! Component: 150  -  total flux cleaned = 0.000494041 Jy
! Component: 200  -  total flux cleaned = 0.000603336 Jy
! Total flux subtracted in 200 components = 0.000603336 Jy
! Clean residual min=-0.003343 max=0.002824 Jy/beam
! Clean residual mean=-0.000042 rms=0.000732 Jy/beam
! Combined flux in latest and established models = 0.666476 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 118 components and 0.666476 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332318Jy  sigma=0.001686
! Fit after  self-cal, rms=0.332317Jy  sigma=0.001686
! 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.332317Jy  sigma=0.001686
! Fit after  self-cal, rms=0.332831Jy  sigma=0.001686
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.752 mas, bmaj=8.444 mas, bpa=10.67 degrees
! Estimated noise=606.895 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00222821 Jy
! Component: 100  -  total flux cleaned = 0.00251741 Jy
! Component: 150  -  total flux cleaned = 0.00269977 Jy
! Component: 200  -  total flux cleaned = 0.0027566 Jy
! Total flux subtracted in 200 components = 0.0027566 Jy
! Clean residual min=-0.004834 max=0.004550 Jy/beam
! Clean residual mean=-0.000219 rms=0.001350 Jy/beam
! Combined flux in latest and established models = 0.669233 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 126 components and 0.669233 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332836Jy  sigma=0.001686
! Fit after  self-cal, rms=0.332827Jy  sigma=0.001686
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.000334522 Jy
! Component: 100  -  total flux cleaned = 0.00046032 Jy
! Component: 150  -  total flux cleaned = 0.00047999 Jy
! Component: 200  -  total flux cleaned = 0.000515779 Jy
! Total flux subtracted in 200 components = 0.000515779 Jy
! Clean residual min=-0.004781 max=0.004521 Jy/beam
! Clean residual mean=-0.000226 rms=0.001343 Jy/beam
! Combined flux in latest and established models = 0.669749 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 129 components and 0.669748 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.332830Jy  sigma=0.001686
! Fit after  self-cal, rms=0.332828Jy  sigma=0.001686
! 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.255 mas, bmaj=3.627 mas, bpa=-11.99 degrees
! Estimated noise=409.056 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.255 x 3.627 at -11.99 degrees (North through East)
! Clean map  min=-0.0029064  max=0.55956 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.332828Jy  sigma=0.001686
! Fit after  self-cal, rms=0.519879Jy  sigma=0.001573
! Inverting map and beam 
! Estimated beam: bmin=2.255 mas, bmaj=3.632 mas, bpa=-12.03 degrees
! Estimated noise=408.645 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00176904 Jy
! Component: 100  -  total flux cleaned = -0.00229735 Jy
! Component: 150  -  total flux cleaned = -0.00261501 Jy
! Component: 200  -  total flux cleaned = -0.00271983 Jy
! Total flux subtracted in 200 components = -0.00271983 Jy
! Clean residual min=-0.002994 max=0.002512 Jy/beam
! Clean residual mean=-0.000056 rms=0.000684 Jy/beam
! Combined flux in latest and established models = 0.667029 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 137 components and 0.667029 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.519858Jy  sigma=0.001573
! Fit after  self-cal, rms=0.519875Jy  sigma=0.001573
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000258887 Jy
! Component: 100  -  total flux cleaned = -0.000258921 Jy
! Component: 150  -  total flux cleaned = -0.000286714 Jy
! Component: 200  -  total flux cleaned = -0.000286671 Jy
! Total flux subtracted in 200 components = -0.000286671 Jy
! Clean residual min=-0.003006 max=0.002494 Jy/beam
! Clean residual mean=-0.000056 rms=0.000682 Jy/beam
! Combined flux in latest and established models = 0.666742 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 143 components and 0.666742 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.519869Jy  sigma=0.001573
! Fit after  self-cal, rms=0.519873Jy  sigma=0.001573
! 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.519873Jy  sigma=0.001573
! Fit after  self-cal, rms=0.519622Jy  sigma=0.001573
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.937 mas, bmaj=3.018 mas, bpa=-9.222 degrees
! Estimated noise=694.308 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.428356 Jy
! Component: 100  -  total flux cleaned = 0.524069 Jy
! Component: 150  -  total flux cleaned = 0.560229 Jy
! Component: 200  -  total flux cleaned = 0.579423 Jy
! Total flux subtracted in 200 components = 0.579423 Jy
! Clean residual min=-0.004432 max=0.010509 Jy/beam
! Clean residual mean=-0.000016 rms=0.001246 Jy/beam
! Combined flux in latest and established models = 0.579422 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 15 model components to the UV plane model.
! The established model now contains 15 components and 0.579422 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.257 mas, bmaj=3.634 mas, bpa=-12.01 degrees
! Estimated noise=408.498 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.0226812 Jy
! Component: 100  -  total flux cleaned = 0.0374902 Jy
! Component: 150  -  total flux cleaned = 0.0481951 Jy
! Component: 200  -  total flux cleaned = 0.0561386 Jy
! Total flux subtracted in 200 components = 0.0561386 Jy
! Clean residual min=-0.002802 max=0.004585 Jy/beam
! Clean residual mean=0.000088 rms=0.000926 Jy/beam
! Combined flux in latest and established models = 0.635561 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 58 components and 0.635561 Jy
! Inverting map 
! Added new window around map position (-2, 3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00605419 Jy
! Component: 100  -  total flux cleaned = 0.0107581 Jy
! Component: 150  -  total flux cleaned = 0.0144787 Jy
! Component: 200  -  total flux cleaned = 0.0174566 Jy
! Total flux subtracted in 200 components = 0.0174566 Jy
! Clean residual min=-0.002942 max=0.002522 Jy/beam
! Clean residual mean=0.000007 rms=0.000726 Jy/beam
! Combined flux in latest and established models = 0.653018 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 92 components and 0.653018 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.762 mas, bmaj=8.452 mas, bpa=10.7 degrees
! Estimated noise=603.572 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00546034 Jy
! Component: 100  -  total flux cleaned = 0.00842647 Jy
! Component: 150  -  total flux cleaned = 0.0101704 Jy
! Component: 200  -  total flux cleaned = 0.0112165 Jy
! Total flux subtracted in 200 components = 0.0112165 Jy
! Clean residual min=-0.004388 max=0.004121 Jy/beam
! Clean residual mean=-0.000161 rms=0.001218 Jy/beam
! Combined flux in latest and established models = 0.664234 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.000632849 Jy
! Component: 100  -  total flux cleaned = 0.00082443 Jy
! Component: 150  -  total flux cleaned = 0.000910683 Jy
! Component: 200  -  total flux cleaned = 0.000973711 Jy
! Total flux subtracted in 200 components = 0.000973711 Jy
! Clean residual min=-0.004383 max=0.004118 Jy/beam
! Clean residual mean=-0.000178 rms=0.001213 Jy/beam
! Combined flux in latest and established models = 0.665208 Jy
! Adding 68 model components to the UV plane model.
! The established model now contains 149 components and 0.665208 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.257 mas, bmaj=3.634 mas, bpa=-12.01 degrees
! Estimated noise=408.498 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000586139 Jy
! Component: 100  -  total flux cleaned = -0.000638884 Jy
! Component: 150  -  total flux cleaned = -0.000763398 Jy
! Component: 200  -  total flux cleaned = -0.00083686 Jy
! Total flux subtracted in 200 components = -0.00083686 Jy
! Clean residual min=-0.003030 max=0.002507 Jy/beam
! Clean residual mean=-0.000047 rms=0.000683 Jy/beam
! Combined flux in latest and established models = 0.664371 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 164 components and 0.664371 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.519611Jy  sigma=0.001573
! Fit after  self-cal, rms=0.519630Jy  sigma=0.001573
wmodel J1130+3815_S_2000_12_04_pus_map.mod
! Writing 164 model components to file: J1130+3815_S_2000_12_04_pus_map.mod
wobs J1130+3815_S_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J1130+3815_S_2000_12_04_pus_uvs.fits
wwins J1130+3815_S_2000_12_04_pus_map.win
! wwins: Wrote 4 windows to J1130+3815_S_2000_12_04_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.000896055 Jy
! Component: 100  -  total flux cleaned = -0.000983576 Jy
! Component: 150  -  total flux cleaned = -0.00115567 Jy
! Component: 200  -  total flux cleaned = -0.00136505 Jy
! Component: 250  -  total flux cleaned = -0.00152787 Jy
! Component: 300  -  total flux cleaned = -0.00176535 Jy
! Component: 350  -  total flux cleaned = -0.00188121 Jy
! Component: 400  -  total flux cleaned = -0.0021088 Jy
! Component: 450  -  total flux cleaned = -0.0022952 Jy
! Component: 500  -  total flux cleaned = -0.002442 Jy
! Component: 550  -  total flux cleaned = -0.00265907 Jy
! Component: 600  -  total flux cleaned = -0.00280177 Jy
! Component: 650  -  total flux cleaned = -0.00294274 Jy
! Component: 700  -  total flux cleaned = -0.00297785 Jy
! Component: 750  -  total flux cleaned = -0.00318427 Jy
! Component: 800  -  total flux cleaned = -0.0032522 Jy
! Component: 850  -  total flux cleaned = -0.00335276 Jy
! Component: 900  -  total flux cleaned = -0.00338617 Jy
! Component: 950  -  total flux cleaned = -0.00351824 Jy
! Component: 1000  -  total flux cleaned = -0.00358384 Jy
! Component: 1050  -  total flux cleaned = -0.00368087 Jy
! Component: 1100  -  total flux cleaned = -0.00387251 Jy
! Component: 1150  -  total flux cleaned = -0.00387221 Jy
! Component: 1200  -  total flux cleaned = -0.00399812 Jy
! Component: 1250  -  total flux cleaned = -0.00396708 Jy
! Component: 1300  -  total flux cleaned = -0.00409122 Jy
! Component: 1350  -  total flux cleaned = -0.00424464 Jy
! Component: 1400  -  total flux cleaned = -0.00424455 Jy
! Component: 1450  -  total flux cleaned = -0.00436574 Jy
! Component: 1500  -  total flux cleaned = -0.00442599 Jy
! Component: 1550  -  total flux cleaned = -0.00454518 Jy
! Component: 1600  -  total flux cleaned = -0.00460414 Jy
! Component: 1650  -  total flux cleaned = -0.00469223 Jy
! Component: 1700  -  total flux cleaned = -0.00472121 Jy
! Component: 1750  -  total flux cleaned = -0.00477934 Jy
! Component: 1800  -  total flux cleaned = -0.00492336 Jy
! Component: 1850  -  total flux cleaned = -0.00500913 Jy
! Component: 1900  -  total flux cleaned = -0.00500898 Jy
! Component: 1950  -  total flux cleaned = -0.00506573 Jy
! Component: 2000  -  total flux cleaned = -0.00520632 Jy
! Total flux subtracted in 2048 components = -0.00526236 Jy
! Clean residual min=-0.001586 max=0.001827 Jy/beam
! Clean residual mean=-0.000017 rms=0.000544 Jy/beam
! Combined flux in latest and established models = 0.659109 Jy
keep
! Adding 160 model components to the UV plane model.
! The established model now contains 324 components and 0.659109 Jy
![Exited script file: muppet]
wmap "J1130+3815_S_2000_12_04_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.257 x 3.634 at -12.01 degrees (North through East)
! Clean map  min=-0.0023985  max=0.55973 Jy/beam
! Writing clean map to FITS file: J1130+3815_S_2000_12_04_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.559733 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00054564 
device "J1130+3815_S_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J1130+3815_S_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.292446 0.292446 0.584893 1.16979 2.33957 4.67914 9.35828 18.7166 37.4331 74.8662
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0016 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.559 
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.257 x 3.634 at -12.01 degrees (North through East)
! Clean map  min=-0.0023985  max=0.55973 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1130+3815_S_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J1130+3815_S_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1130+3815_S_2000_12_04_pus_uvs.log closed on Thu Oct 18 16:38:11 2007