! Started logfile: J1727+4530_S_2000_05_22_pus_uvs.log on Mon Nov 19 18:54:41 2007
obs J1727+4530_S_2000_05_22_pus_uva.fits
! Reading UV FITS file: J1727+4530_S_2000_05_22_pus_uva.fits
! AN table 1: 23 integrations on 190 of 190 possible baselines.
! AN table 2: 275 integrations on 190 of 190 possible baselines.
! AN table 3: 120 integrations on 190 of 190 possible baselines.
! AN table 4: 30 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.136172 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1727+4530
! 
! 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 2003 lines of history.
! 
! Reading 46364 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 J1727+4530_S_2000_05_22_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 187 telescope corrections were flagged in sub-array 1.
!  A total of 4035 telescope corrections were flagged in sub-array 2.
!  A total of 1937 telescope corrections were flagged in sub-array 3.
!  A total of 315 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 187 telescope corrections were flagged in sub-array 1.
!  A total of 4035 telescope corrections were flagged in sub-array 2.
!  A total of 1813 telescope corrections were flagged in sub-array 3.
!  A total of 315 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 187 telescope corrections were flagged in sub-array 1.
!  A total of 4034 telescope corrections were flagged in sub-array 2.
!  A total of 1813 telescope corrections were flagged in sub-array 3.
!  A total of 315 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 187 telescope corrections were flagged in sub-array 1.
!  A total of 4035 telescope corrections were flagged in sub-array 2.
!  A total of 1813 telescope corrections were flagged in sub-array 3.
!  A total of 315 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.940393Jy  sigma=0.008878
! Fit after  self-cal, rms=0.667315Jy  sigma=0.005495
! 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.023 mas, bmaj=2.5 mas, bpa=2.808 degrees
! Estimated noise=849.527 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.318653 Jy
! Component: 100  -  total flux cleaned = 0.434229 Jy
! Total flux subtracted in 100 components = 0.434229 Jy
! Clean residual min=-0.012853 max=0.053216 Jy/beam
! Clean residual mean=0.000063 rms=0.003971 Jy/beam
! Combined flux in latest and established models = 0.434229 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.434229 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.363093Jy  sigma=0.002249
! Fit after  self-cal, rms=0.362413Jy  sigma=0.002246
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.060153 Jy
! Component: 100  -  total flux cleaned = 0.0947003 Jy
! Total flux subtracted in 100 components = 0.0947003 Jy
! Clean residual min=-0.008836 max=0.018689 Jy/beam
! Clean residual mean=0.000017 rms=0.002690 Jy/beam
! Combined flux in latest and established models = 0.528929 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 14 components and 0.528929 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.351405Jy  sigma=0.001954
! Fit after  self-cal, rms=0.351057Jy  sigma=0.001953
! Inverting map 
! Added new window around map position (-2, 0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0241067 Jy
! Component: 100  -  total flux cleaned = 0.0406509 Jy
! Total flux subtracted in 100 components = 0.0406509 Jy
! Clean residual min=-0.008006 max=0.013137 Jy/beam
! Clean residual mean=-0.000002 rms=0.002356 Jy/beam
! Combined flux in latest and established models = 0.56958 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 22 components and 0.56958 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349592Jy  sigma=0.001895
! Fit after  self-cal, rms=0.349463Jy  sigma=0.001895
! 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.631 mas, bmaj=2.857 mas, bpa=-16.83 degrees
! Estimated noise=366.079 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.0172145 Jy
! Component: 100  -  total flux cleaned = 0.0252523 Jy
! Component: 150  -  total flux cleaned = 0.0300973 Jy
! Component: 200  -  total flux cleaned = 0.0317196 Jy
! Total flux subtracted in 200 components = 0.0317196 Jy
! Clean residual min=-0.011699 max=0.013227 Jy/beam
! Clean residual mean=-0.000228 rms=0.003000 Jy/beam
! Combined flux in latest and established models = 0.601299 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 34 components and 0.601299 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.349557Jy  sigma=0.001865
! Fit after  self-cal, rms=0.349473Jy  sigma=0.001865
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.97     GC        1.07     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        0.96     KP        1.00     
!   MA        1.00*    MC        1.00*    MK        0.98     NL        0.98     
!   NY        0.91     OV        0.97     PT        0.96     SC        1.00*    
!   TS        1.00     WF        1.05     WZ        1.33     LA        0.99     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.93     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        1.01     KP        0.94     
!   MA        1.05     MC        1.05     MK        1.05     NL        1.00     
!   NY        1.06     OV        0.95     PT        0.85     SC        0.98     
!   TS        1.03     WF        1.03     WZ        1.10     LA        0.95     
! 
!  A total of 12 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.05     GC        1.22     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00*    KP        1.11     
!   MA        1.00*    MC        0.96     MK        1.00*    NL        0.99     
!   NY        1.00*    OV        1.11     PT        1.02     SC        0.96     
!   TS        1.00*    WF        1.01     WZ        0.91     LA        1.06     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        1.12     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.98     KP        1.19     
!   MA        0.53     MC        1.08     MK        0.97     NL        1.05     
!   NY        0.96     OV        0.98     PT        1.06     SC        1.00*    
!   TS        1.00     WF        1.00*    WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.01     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.08     KK        1.01     KP        0.86     
!   MA        1.00*    MC        1.00*    MK        0.94     NL        1.03     
!   NY        1.03     OV        0.96     PT        0.98     SC        1.00*    
!   TS        1.02     WF        1.05     WZ        1.24     LA        0.93     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.94     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00     KP        0.92     
!   MA        1.55     MC        0.94     MK        1.00     NL        1.02     
!   NY        1.21     OV        0.93     PT        0.87     SC        1.01     
!   TS        1.03     WF        0.99     WZ        1.08     LA        0.92     
! 
!  A total of 90 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.05     FD        1.08     GC        1.21     GG        1.00*    
!   HH        1.00*    HN        1.05     KK        1.00*    KP        1.07     
!   MA        1.17     MC        1.04     MK        1.00*    NL        1.04     
!   NY        1.00*    OV        1.11     PT        1.03     SC        1.03     
!   TS        1.00*    WF        0.98     WZ        0.89     LA        0.97     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.01     FD        1.11     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.99     KP        1.06     
!   MA        1.06     MC        0.98     MK        0.95     NL        1.11     
!   NY        0.99     OV        0.99     PT        1.05     SC        1.00*    
!   TS        1.05     WF        1.00*    WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.99     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        1.00     KP        0.93     
!   MA        1.00*    MC        1.00*    MK        0.96     NL        0.99     
!   NY        1.00     OV        1.02     PT        0.97     SC        1.00*    
!   TS        1.06     WF        1.05     WZ        1.38     LA        0.98     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.94     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.04     KP        0.94     
!   MA        1.91     MC        0.80     MK        1.01     NL        1.00     
!   NY        1.34     OV        1.01     PT        0.65     SC        1.02     
!   TS        1.08     WF        1.04     WZ        1.13     LA        0.96     
! 
!  A total of 90 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.06     GC        1.27     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        1.07     
!   MA        0.90     MC        1.02     MK        1.00*    NL        1.00     
!   NY        1.00*    OV        1.16     PT        1.02     SC        1.04     
!   TS        1.00*    WF        0.86     WZ        0.98     LA        1.04     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.07     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.95     KP        1.07     
!   MA        0.78     MC        0.88     MK        0.97     NL        1.08     
!   NY        1.00     OV        1.04     PT        1.04     SC        1.00*    
!   TS        1.06     WF        1.00*    WZ        1.00*    LA        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.01     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        1.06     KK        1.04     KP        0.91     
!   MA        1.00*    MC        1.00*    MK        1.02     NL        1.01     
!   NY        0.95     OV        0.97     PT        1.00     SC        1.00*    
!   TS        1.06     WF        1.03     WZ        1.31     LA        1.05     
! 
!  A total of 126 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.95     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.09     KP        0.94     
!   MA        1.80     MC        0.74     MK        1.13     NL        1.03     
!   NY        0.97     OV        0.96     PT        0.64     SC        1.03     
!   TS        1.10     WF        1.05     WZ        1.17     LA        0.97     
! 
!  A total of 90 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.07     FD        1.06     GC        1.19     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        1.08     
!   MA        0.82     MC        1.18     MK        1.00*    NL        1.02     
!   NY        1.00*    OV        1.13     PT        1.02     SC        1.05     
!   TS        1.00*    WF        0.97     WZ        0.93     LA        1.08     
! 
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        1.11     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        1.14     
!   MA        0.75     MC        0.87     MK        1.04     NL        1.06     
!   NY        0.99     OV        1.03     PT        1.08     SC        1.00*    
!   TS        1.08     WF        1.00*    WZ        1.00*    LA        1.00*    
! 
! 
! Fit before self-cal, rms=0.349473Jy  sigma=0.001865
! Fit after  self-cal, rms=0.367024Jy  sigma=0.001678
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.624 mas, bmaj=2.869 mas, bpa=-18.48 degrees
! Estimated noise=366.442 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.000655812 Jy
! Component: 100  -  total flux cleaned = -0.000751845 Jy
! Component: 150  -  total flux cleaned = -0.000899272 Jy
! Component: 200  -  total flux cleaned = -0.00101146 Jy
! Total flux subtracted in 200 components = -0.00101146 Jy
! Clean residual min=-0.003016 max=0.003884 Jy/beam
! Clean residual mean=0.000137 rms=0.000852 Jy/beam
! Combined flux in latest and established models = 0.600288 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 39 components and 0.600288 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.366968Jy  sigma=0.001677
! Fit after  self-cal, rms=0.367231Jy  sigma=0.001676
! 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.367231Jy  sigma=0.001676
! Fit after  self-cal, rms=0.369069Jy  sigma=0.001676
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.625 mas, bmaj=2.873 mas, bpa=-18.68 degrees
! Estimated noise=367.058 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000146219 Jy
! Component: 100  -  total flux cleaned = -0.000260621 Jy
! Component: 150  -  total flux cleaned = -0.000261437 Jy
! Component: 200  -  total flux cleaned = -0.000303178 Jy
! Total flux subtracted in 200 components = -0.000303178 Jy
! Clean residual min=-0.002774 max=0.003895 Jy/beam
! Clean residual mean=0.000160 rms=0.000826 Jy/beam
! Combined flux in latest and established models = 0.599985 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 46 components and 0.599985 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.369047Jy  sigma=0.001676
! Fit after  self-cal, rms=0.369086Jy  sigma=0.001676
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 (-7.5, -4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00375269 Jy
! Component: 100  -  total flux cleaned = 0.00542161 Jy
! Component: 150  -  total flux cleaned = 0.00561928 Jy
! Component: 200  -  total flux cleaned = 0.00561892 Jy
! Total flux subtracted in 200 components = 0.00561892 Jy
! Clean residual min=-0.002752 max=0.003571 Jy/beam
! Clean residual mean=0.000124 rms=0.000800 Jy/beam
! Combined flux in latest and established models = 0.605604 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 67 components and 0.605604 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.369030Jy  sigma=0.001675
! Fit after  self-cal, rms=0.369032Jy  sigma=0.001675
! Inverting map 
! Added new window around map position (-36.5, 2.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00320191 Jy
! Component: 100  -  total flux cleaned = 0.00494806 Jy
! Component: 150  -  total flux cleaned = 0.0054869 Jy
! Component: 200  -  total flux cleaned = 0.00572345 Jy
! Total flux subtracted in 200 components = 0.00572345 Jy
! Clean residual min=-0.002719 max=0.003168 Jy/beam
! Clean residual mean=0.000086 rms=0.000763 Jy/beam
! Combined flux in latest and established models = 0.611327 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 81 components and 0.611327 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.368974Jy  sigma=0.001674
! Fit after  self-cal, rms=0.368971Jy  sigma=0.001674
! 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.368971Jy  sigma=0.001674
! Fit after  self-cal, rms=0.371182Jy  sigma=0.001674
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.626 mas, bmaj=2.877 mas, bpa=-18.95 degrees
! Estimated noise=368.029 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00212602 Jy
! Component: 100  -  total flux cleaned = 0.00288655 Jy
! Component: 150  -  total flux cleaned = 0.0032708 Jy
! Component: 200  -  total flux cleaned = 0.00361981 Jy
! Total flux subtracted in 200 components = 0.00361981 Jy
! Clean residual min=-0.002510 max=0.003080 Jy/beam
! Clean residual mean=0.000099 rms=0.000717 Jy/beam
! Combined flux in latest and established models = 0.614947 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 90 components and 0.614947 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371151Jy  sigma=0.001673
! Fit after  self-cal, rms=0.371168Jy  sigma=0.001673
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.000757925 Jy
! Component: 100  -  total flux cleaned = 0.000959647 Jy
! Component: 150  -  total flux cleaned = 0.00110994 Jy
! Component: 200  -  total flux cleaned = 0.00114571 Jy
! Total flux subtracted in 200 components = 0.00114571 Jy
! Clean residual min=-0.002558 max=0.003067 Jy/beam
! Clean residual mean=0.000092 rms=0.000716 Jy/beam
! Combined flux in latest and established models = 0.616093 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 99 components and 0.616093 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371153Jy  sigma=0.001673
! Fit after  self-cal, rms=0.371157Jy  sigma=0.001673
! Inverting map 
! Added new window around map position (19.5, -56.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00222408 Jy
! Component: 100  -  total flux cleaned = 0.00212052 Jy
! Component: 150  -  total flux cleaned = 0.00211381 Jy
! Component: 200  -  total flux cleaned = 0.00239078 Jy
! Total flux subtracted in 200 components = 0.00239078 Jy
! Clean residual min=-0.002544 max=0.002671 Jy/beam
! Clean residual mean=0.000081 rms=0.000698 Jy/beam
! Combined flux in latest and established models = 0.618483 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 107 components and 0.618483 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371139Jy  sigma=0.001673
! Fit after  self-cal, rms=0.371138Jy  sigma=0.001672
! 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.371138Jy  sigma=0.001672
! Fit after  self-cal, rms=0.372523Jy  sigma=0.001672
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.712 mas, bmaj=8.834 mas, bpa=43.04 degrees
! Estimated noise=607.599 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00241661 Jy
! Component: 100  -  total flux cleaned = 0.0034787 Jy
! Component: 150  -  total flux cleaned = 0.00395862 Jy
! Component: 200  -  total flux cleaned = 0.00434827 Jy
! Total flux subtracted in 200 components = 0.00434827 Jy
! Clean residual min=-0.004196 max=0.003623 Jy/beam
! Clean residual mean=0.000276 rms=0.001211 Jy/beam
! Combined flux in latest and established models = 0.622832 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 124 components and 0.622832 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372512Jy  sigma=0.001672
! Fit after  self-cal, rms=0.372512Jy  sigma=0.001672
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.000476938 Jy
! Component: 100  -  total flux cleaned = 0.000726222 Jy
! Component: 150  -  total flux cleaned = 0.000884497 Jy
! Component: 200  -  total flux cleaned = 0.00102374 Jy
! Total flux subtracted in 200 components = 0.00102374 Jy
! Clean residual min=-0.004242 max=0.003574 Jy/beam
! Clean residual mean=0.000256 rms=0.001211 Jy/beam
! Combined flux in latest and established models = 0.623855 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 134 components and 0.623855 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372516Jy  sigma=0.001673
! Fit after  self-cal, rms=0.372517Jy  sigma=0.001672
! 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.627 mas, bmaj=2.879 mas, bpa=-19.04 degrees
! Estimated noise=368.66 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.627 x 2.879 at -19.04 degrees (North through East)
! Clean map  min=-0.0024085  max=0.45637 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true
  clean clean_niter,clean_gain
  selfcal
  flux_cutoff = imstat(rms) * dynam
  repeat
    if (peak(flux) > flux_cutoff) peakwin win_mult
    clean clean_niter,clean_gain
    flux_cutoff = imstat(rms) * dynam
    selfcal
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true
  end if
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true
! clrmod: Cleared the established and tentative models.
uvw 2,-1
! Uniform weighting binwidth: 2 (pixels).
! Gridding weights will be scaled by errors raised to the power -1.
! Radial weighting is not currently selected.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.034 mas, bmaj=2.539 mas, bpa=2.881 degrees
! Estimated noise=868.066 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.324965 Jy
! Component: 100  -  total flux cleaned = 0.443722 Jy
! Component: 150  -  total flux cleaned = 0.503032 Jy
! Component: 200  -  total flux cleaned = 0.534977 Jy
! Total flux subtracted in 200 components = 0.534977 Jy
! Clean residual min=-0.006337 max=0.016068 Jy/beam
! Clean residual mean=0.000054 rms=0.001689 Jy/beam
! Combined flux in latest and established models = 0.534977 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.534977 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.627 mas, bmaj=2.879 mas, bpa=-19.04 degrees
! Estimated noise=368.66 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.0276434 Jy
! Component: 100  -  total flux cleaned = 0.0426432 Jy
! Component: 150  -  total flux cleaned = 0.0523201 Jy
! Component: 200  -  total flux cleaned = 0.0590242 Jy
! Total flux subtracted in 200 components = 0.0590242 Jy
! Clean residual min=-0.003052 max=0.004003 Jy/beam
! Clean residual mean=0.000254 rms=0.000853 Jy/beam
! Combined flux in latest and established models = 0.594001 Jy
! Adding 45 model components to the UV plane model.
! The established model now contains 50 components and 0.594001 Jy
! Inverting map 
! Added new window around map position (-11.5, -3.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00514588 Jy
! Component: 100  -  total flux cleaned = 0.00930092 Jy
! Component: 150  -  total flux cleaned = 0.0127646 Jy
! Component: 200  -  total flux cleaned = 0.0156833 Jy
! Total flux subtracted in 200 components = 0.0156833 Jy
! Clean residual min=-0.002755 max=0.002823 Jy/beam
! Clean residual mean=0.000157 rms=0.000726 Jy/beam
! Combined flux in latest and established models = 0.609685 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 76 components and 0.609685 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.712 mas, bmaj=8.834 mas, bpa=43.04 degrees
! Estimated noise=607.599 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00492727 Jy
! Component: 100  -  total flux cleaned = 0.00803741 Jy
! Component: 150  -  total flux cleaned = 0.0101847 Jy
! Component: 200  -  total flux cleaned = 0.0117505 Jy
! Total flux subtracted in 200 components = 0.0117505 Jy
! Clean residual min=-0.004365 max=0.003695 Jy/beam
! Clean residual mean=0.000302 rms=0.001188 Jy/beam
! Combined flux in latest and established models = 0.621435 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.000939653 Jy
! Component: 100  -  total flux cleaned = 0.00155436 Jy
! Component: 150  -  total flux cleaned = 0.00207379 Jy
! Component: 200  -  total flux cleaned = 0.00245902 Jy
! Total flux subtracted in 200 components = 0.00245902 Jy
! Clean residual min=-0.004389 max=0.003553 Jy/beam
! Clean residual mean=0.000247 rms=0.001173 Jy/beam
! Combined flux in latest and established models = 0.623894 Jy
! Adding 67 model components to the UV plane model.
! The established model now contains 132 components and 0.623894 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.627 mas, bmaj=2.879 mas, bpa=-19.04 degrees
! Estimated noise=368.66 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000688443 Jy
! Component: 100  -  total flux cleaned = 0.000807853 Jy
! Component: 150  -  total flux cleaned = 0.000806915 Jy
! Component: 200  -  total flux cleaned = 0.000805795 Jy
! Total flux subtracted in 200 components = 0.000805795 Jy
! Clean residual min=-0.002698 max=0.002700 Jy/beam
! Clean residual mean=0.000062 rms=0.000686 Jy/beam
! Combined flux in latest and established models = 0.6247 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 146 components and 0.6247 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372501Jy  sigma=0.001673
! Fit after  self-cal, rms=0.372507Jy  sigma=0.001672
wmodel J1727+4530_S_2000_05_22_pus_map.mod
! Writing 146 model components to file: J1727+4530_S_2000_05_22_pus_map.mod
wobs J1727+4530_S_2000_05_22_pus_uvs.fits
! Writing UV FITS file: J1727+4530_S_2000_05_22_pus_uvs.fits
wwins J1727+4530_S_2000_05_22_pus_map.win
! wwins: Wrote 6 windows to J1727+4530_S_2000_05_22_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.000443912 Jy
! Component: 100  -  total flux cleaned = 0.000629011 Jy
! Component: 150  -  total flux cleaned = 0.00089472 Jy
! Component: 200  -  total flux cleaned = 0.00110828 Jy
! Component: 250  -  total flux cleaned = 0.0013157 Jy
! Component: 300  -  total flux cleaned = 0.0014777 Jy
! Component: 350  -  total flux cleaned = 0.00171532 Jy
! Component: 400  -  total flux cleaned = 0.00194734 Jy
! Component: 450  -  total flux cleaned = 0.00198485 Jy
! Component: 500  -  total flux cleaned = 0.00209655 Jy
! Component: 550  -  total flux cleaned = 0.00217008 Jy
! Component: 600  -  total flux cleaned = 0.00227844 Jy
! Component: 650  -  total flux cleaned = 0.0023492 Jy
! Component: 700  -  total flux cleaned = 0.00241949 Jy
! Component: 750  -  total flux cleaned = 0.00245436 Jy
! Component: 800  -  total flux cleaned = 0.00252272 Jy
! Component: 850  -  total flux cleaned = 0.0025565 Jy
! Component: 900  -  total flux cleaned = 0.00262391 Jy
! Component: 950  -  total flux cleaned = 0.00265659 Jy
! Component: 1000  -  total flux cleaned = 0.00255794 Jy
! Component: 1050  -  total flux cleaned = 0.00259028 Jy
! Component: 1100  -  total flux cleaned = 0.00255785 Jy
! Component: 1150  -  total flux cleaned = 0.00255781 Jy
! Component: 1200  -  total flux cleaned = 0.00252624 Jy
! Component: 1250  -  total flux cleaned = 0.00255758 Jy
! Component: 1300  -  total flux cleaned = 0.00246455 Jy
! Component: 1350  -  total flux cleaned = 0.00249553 Jy
! Component: 1400  -  total flux cleaned = 0.00246528 Jy
! Component: 1450  -  total flux cleaned = 0.00243554 Jy
! Component: 1500  -  total flux cleaned = 0.00246624 Jy
! Component: 1550  -  total flux cleaned = 0.00252617 Jy
! Component: 1600  -  total flux cleaned = 0.00246749 Jy
! Component: 1650  -  total flux cleaned = 0.00255544 Jy
! Component: 1700  -  total flux cleaned = 0.00246827 Jy
! Component: 1750  -  total flux cleaned = 0.00255508 Jy
! Component: 1800  -  total flux cleaned = 0.00258377 Jy
! Component: 1850  -  total flux cleaned = 0.00255512 Jy
! Component: 1900  -  total flux cleaned = 0.00261179 Jy
! Component: 1950  -  total flux cleaned = 0.00261168 Jy
! Component: 2000  -  total flux cleaned = 0.00263953 Jy
! Total flux subtracted in 2048 components = 0.00261171 Jy
! Clean residual min=-0.001817 max=0.001600 Jy/beam
! Clean residual mean=0.000035 rms=0.000519 Jy/beam
! Combined flux in latest and established models = 0.627312 Jy
keep
! Adding 159 model components to the UV plane model.
! The established model now contains 305 components and 0.627312 Jy
![Exited script file: muppet]
wmap "J1727+4530_S_2000_05_22_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.627 x 2.879 at -19.04 degrees (North through East)
! Clean map  min=-0.0023508  max=0.45818 Jy/beam
! Writing clean map to FITS file: J1727+4530_S_2000_05_22_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.458182 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000518199 
device "J1727+4530_S_2000_05_22_pus\_map.eps/VPS"
! Attempting to open device: 'J1727+4530_S_2000_05_22_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.339297 0.339297 0.678594 1.35719 2.71438 5.42876 10.8575 21.715 43.43 86.8601
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.458 
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.627 x 2.879 at -19.04 degrees (North through East)
! Clean map  min=-0.0023508  max=0.45818 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1727+4530_S_2000_05_22_pus\_map.gif/vgif"
! Attempting to open device: 'J1727+4530_S_2000_05_22_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1727+4530_S_2000_05_22_pus_uvs.log closed on Mon Nov 19 18:55:01 2007