! Started logfile: J2148+0657_S_2000_05_22_pus_uvs.log on Tue Nov 20 14:20:35 2007
obs J2148+0657_S_2000_05_22_pus_uva.fits
! Reading UV FITS file: J2148+0657_S_2000_05_22_pus_uva.fits
! AN table 1: 137 integrations on 190 of 190 possible baselines.
! AN table 2: 104 integrations on 190 of 190 possible baselines.
! AN table 3: 129 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.145605 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2148+0657
! 
! 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 2004 lines of history.
! 
! Reading 40944 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 = 1024 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J2148+0657_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 = 1024x1024 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 1664 telescope corrections were flagged in sub-array 1.
!  A total of 1211 telescope corrections were flagged in sub-array 2.
!  A total of 2245 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1664 telescope corrections were flagged in sub-array 1.
!  A total of 1211 telescope corrections were flagged in sub-array 2.
!  A total of 2237 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1664 telescope corrections were flagged in sub-array 1.
!  A total of 1211 telescope corrections were flagged in sub-array 2.
!  A total of 2237 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1664 telescope corrections were flagged in sub-array 1.
!  A total of 1211 telescope corrections were flagged in sub-array 2.
!  A total of 2245 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.997198Jy  sigma=0.020087
! Fit after  self-cal, rms=1.347104Jy  sigma=0.013519
! 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.041 mas, bmaj=5.46 mas, bpa=-1.486 degrees
! Estimated noise=713.401 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 = 1.56525 Jy
! Component: 100  -  total flux cleaned = 2.02858 Jy
! Total flux subtracted in 100 components = 2.02858 Jy
! Clean residual min=-0.068436 max=0.207120 Jy/beam
! Clean residual mean=0.000452 rms=0.017153 Jy/beam
! Combined flux in latest and established models = 2.02858 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 9 components and 2.02858 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.602644Jy  sigma=0.006030
! Fit after  self-cal, rms=0.602530Jy  sigma=0.006029
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.225462 Jy
! Component: 100  -  total flux cleaned = 0.340918 Jy
! Total flux subtracted in 100 components = 0.340918 Jy
! Clean residual min=-0.060719 max=0.162487 Jy/beam
! Clean residual mean=0.000288 rms=0.013290 Jy/beam
! Combined flux in latest and established models = 2.3695 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 17 components and 2.3695 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.475825Jy  sigma=0.004536
! Fit after  self-cal, rms=0.475133Jy  sigma=0.004533
! Inverting map 
! Added new window around map position (4, -3.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.152958 Jy
! Component: 100  -  total flux cleaned = 0.237401 Jy
! Total flux subtracted in 100 components = 0.237401 Jy
! Clean residual min=-0.053605 max=0.086245 Jy/beam
! Clean residual mean=0.000184 rms=0.011092 Jy/beam
! Combined flux in latest and established models = 2.6069 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 46 components and 2.6069 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.394834Jy  sigma=0.003655
! Fit after  self-cal, rms=0.382030Jy  sigma=0.003561
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0800442 Jy
! Component: 100  -  total flux cleaned = 0.134199 Jy
! Total flux subtracted in 100 components = 0.134199 Jy
! Clean residual min=-0.045216 max=0.059952 Jy/beam
! Clean residual mean=0.000125 rms=0.009843 Jy/beam
! Combined flux in latest and established models = 2.7411 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 64 components and 2.7411 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353077Jy  sigma=0.003204
! Fit after  self-cal, rms=0.349603Jy  sigma=0.003181
! 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.888 mas, bmaj=6.29 mas, bpa=4.437 degrees
! Estimated noise=385.87 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.0866153 Jy
! Component: 100  -  total flux cleaned = 0.141063 Jy
! Component: 150  -  total flux cleaned = 0.17855 Jy
! Component: 200  -  total flux cleaned = 0.204777 Jy
! Total flux subtracted in 200 components = 0.204777 Jy
! Clean residual min=-0.036277 max=0.062129 Jy/beam
! Clean residual mean=0.000439 rms=0.009898 Jy/beam
! Combined flux in latest and established models = 2.94588 Jy
! Performing phase self-cal
! Adding 43 model components to the UV plane model.
! The established model now contains 90 components and 2.94588 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328822Jy  sigma=0.002883
! Fit after  self-cal, rms=0.327087Jy  sigma=0.002868
! Inverting map 
! Added new window around map position (24.5, -70).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0592013 Jy
! Component: 100  -  total flux cleaned = 0.0946616 Jy
! Component: 150  -  total flux cleaned = 0.121976 Jy
! Component: 200  -  total flux cleaned = 0.14435 Jy
! Total flux subtracted in 200 components = 0.14435 Jy
! Clean residual min=-0.030441 max=0.034502 Jy/beam
! Clean residual mean=-0.000129 rms=0.007931 Jy/beam
! Combined flux in latest and established models = 3.09023 Jy
! Performing phase self-cal
! Adding 53 model components to the UV plane model.
! The established model now contains 136 components and 3.09023 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.316023Jy  sigma=0.002717
! Fit after  self-cal, rms=0.315324Jy  sigma=0.002709
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        1.01     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.96     KP        0.74     
!   MA        1.00*    MC        1.00*    MK        0.97     NL        1.03     
!   NY        1.00*    OV        1.06     PT        1.00     SC        1.04     
!   TS        0.99     WF        1.04     WZ        1.00*    LA        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.04     FD        0.98     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        0.99     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        1.02     
!   NY        1.00*    OV        1.06     PT        0.96     SC        1.05     
!   TS        1.00*    WF        1.04     WZ        1.00*    LA        0.98     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.94     GC        1.12     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        0.96     
!   MA        1.00*    MC        1.09     MK        1.17     NL        1.02     
!   NY        1.00*    OV        1.00     PT        0.93     SC        0.99     
!   TS        1.00*    WF        1.25     WZ        1.14     LA        0.94     
! 
! 
! Correcting IF 2.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.02     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.06     KK        0.97     KP        0.86     
!   MA        1.00*    MC        1.00*    MK        0.92     NL        1.05     
!   NY        1.00*    OV        1.04     PT        1.00     SC        1.06     
!   TS        1.01     WF        1.03     WZ        1.00*    LA        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.02     FD        1.01     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        0.97     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        1.04     
!   NY        1.00*    OV        1.04     PT        0.96     SC        1.05     
!   TS        1.00*    WF        1.02     WZ        1.00*    LA        0.94     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.97     GC        1.09     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.00*    KP        0.95     
!   MA        1.62     MC        0.95     MK        1.09     NL        1.04     
!   NY        1.00*    OV        0.98     PT        0.92     SC        1.00     
!   TS        1.00*    WF        1.00     WZ        1.15     LA        0.89     
! 
! 
! Correcting IF 3.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        0.92     KP        0.96     
!   MA        1.00*    MC        1.00*    MK        0.90     NL        0.99     
!   NY        1.00*    OV        1.03     PT        0.94     SC        1.03     
!   TS        1.00     WF        1.01     WZ        1.00*    LA        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.95     FD        0.97     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        1.12     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        0.97     
!   NY        1.00*    OV        1.04     PT        0.93     SC        1.02     
!   TS        1.00*    WF        1.02     WZ        1.00*    LA        0.97     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.94     FD        0.94     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        0.89     
!   MA        3.74     MC        1.34     MK        1.07     NL        0.98     
!   NY        1.00*    OV        1.01     PT        0.90     SC        0.97     
!   TS        1.00*    WF        0.99     WZ        1.10     LA        0.93     
! 
! 
! Correcting IF 4.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.99     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        0.94     KP        0.89     
!   MA        1.00*    MC        1.00*    MK        0.93     NL        1.00     
!   NY        1.00*    OV        1.00     PT        0.99     SC        1.01     
!   TS        0.98     WF        1.01     WZ        1.00*    LA        1.00*    
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        0.98     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00*    KP        0.97     
!   MA        1.00*    MC        1.00*    MK        1.00*    NL        0.99     
!   NY        1.00*    OV        1.00     PT        1.03     SC        1.01     
!   TS        1.00*    WF        1.01     WZ        1.00*    LA        0.99     
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        0.94     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.00*    KP        0.96     
!   MA        1.00*    MC        1.74     MK        1.11     NL        0.99     
!   NY        1.00*    OV        0.97     PT        0.94     SC        0.96     
!   TS        1.00*    WF        0.97     WZ        1.08     LA        0.94     
! 
! 
! Fit before self-cal, rms=0.315324Jy  sigma=0.002709
! Fit after  self-cal, rms=0.272363Jy  sigma=0.001988
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.95 mas, bmaj=6.324 mas, bpa=5.113 degrees
! Estimated noise=388.042 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 (26, -54).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0267277 Jy
! Component: 100  -  total flux cleaned = 0.0348478 Jy
! Component: 150  -  total flux cleaned = 0.0397371 Jy
! Component: 200  -  total flux cleaned = 0.0435346 Jy
! Total flux subtracted in 200 components = 0.0435346 Jy
! Clean residual min=-0.013810 max=0.015421 Jy/beam
! Clean residual mean=0.000347 rms=0.003270 Jy/beam
! Combined flux in latest and established models = 3.13376 Jy
! Performing phase self-cal
! Adding 40 model components to the UV plane model.
! The established model now contains 171 components and 3.13376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.269128Jy  sigma=0.001932
! Fit after  self-cal, rms=0.269525Jy  sigma=0.001930
! 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.269525Jy  sigma=0.001930
! Fit after  self-cal, rms=0.268088Jy  sigma=0.001902
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.957 mas, bmaj=6.331 mas, bpa=5.199 degrees
! Estimated noise=387.664 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000170666 Jy
! Component: 100  -  total flux cleaned = 0.00294538 Jy
! Component: 150  -  total flux cleaned = 0.00532266 Jy
! Component: 200  -  total flux cleaned = 0.00838345 Jy
! Total flux subtracted in 200 components = 0.00838345 Jy
! Clean residual min=-0.011875 max=0.014142 Jy/beam
! Clean residual mean=0.000357 rms=0.002833 Jy/beam
! Combined flux in latest and established models = 3.14214 Jy
selfcal
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 185 components and 3.14214 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.266474Jy  sigma=0.001879
! Fit after  self-cal, rms=0.266454Jy  sigma=0.001879
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 (32.5, -52.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00792463 Jy
! Component: 100  -  total flux cleaned = 0.00988426 Jy
! Component: 150  -  total flux cleaned = 0.0117222 Jy
! Component: 200  -  total flux cleaned = 0.013101 Jy
! Total flux subtracted in 200 components = 0.013101 Jy
! Clean residual min=-0.011313 max=0.012556 Jy/beam
! Clean residual mean=0.000309 rms=0.002639 Jy/beam
! Combined flux in latest and established models = 3.15524 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 204 components and 3.15525 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265478Jy  sigma=0.001864
! Fit after  self-cal, rms=0.265431Jy  sigma=0.001864
! Inverting map 
! Added new window around map position (-1.5, -36.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0124422 Jy
! Component: 100  -  total flux cleaned = 0.0173624 Jy
! Component: 150  -  total flux cleaned = 0.0189609 Jy
! Component: 200  -  total flux cleaned = 0.0201632 Jy
! Total flux subtracted in 200 components = 0.0201632 Jy
! Clean residual min=-0.010873 max=0.010180 Jy/beam
! Clean residual mean=0.000223 rms=0.002433 Jy/beam
! Combined flux in latest and established models = 3.17541 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 218 components and 3.17541 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.264479Jy  sigma=0.001852
! Fit after  self-cal, rms=0.264474Jy  sigma=0.001852
! 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.264474Jy  sigma=0.001852
! Fit after  self-cal, rms=0.266527Jy  sigma=0.001844
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.969 mas, bmaj=6.341 mas, bpa=5.334 degrees
! Estimated noise=387.959 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00523062 Jy
! Component: 100  -  total flux cleaned = -0.00523481 Jy
! Component: 150  -  total flux cleaned = -0.00490834 Jy
! Component: 200  -  total flux cleaned = -0.00365823 Jy
! Total flux subtracted in 200 components = -0.00365823 Jy
! Clean residual min=-0.009261 max=0.009812 Jy/beam
! Clean residual mean=0.000348 rms=0.002218 Jy/beam
! Combined flux in latest and established models = 3.17175 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 222 components and 3.17175 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265649Jy  sigma=0.001833
! Fit after  self-cal, rms=0.265675Jy  sigma=0.001833
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, -5.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00767409 Jy
! Component: 100  -  total flux cleaned = 0.00890025 Jy
! Component: 150  -  total flux cleaned = 0.0100186 Jy
! Component: 200  -  total flux cleaned = 0.0108167 Jy
! Total flux subtracted in 200 components = 0.0108167 Jy
! Clean residual min=-0.008773 max=0.009132 Jy/beam
! Clean residual mean=0.000299 rms=0.002062 Jy/beam
! Combined flux in latest and established models = 3.18257 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 230 components and 3.18257 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.264960Jy  sigma=0.001825
! Fit after  self-cal, rms=0.264958Jy  sigma=0.001825
! Inverting map 
! Added new window around map position (48.5, -92.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00934494 Jy
! Component: 100  -  total flux cleaned = 0.0125852 Jy
! Component: 150  -  total flux cleaned = 0.0138214 Jy
! Component: 200  -  total flux cleaned = 0.0147599 Jy
! Total flux subtracted in 200 components = 0.0147599 Jy
! Clean residual min=-0.008689 max=0.007810 Jy/beam
! Clean residual mean=0.000258 rms=0.001933 Jy/beam
! Combined flux in latest and established models = 3.19733 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 248 components and 3.19733 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.264396Jy  sigma=0.001818
! Fit after  self-cal, rms=0.264386Jy  sigma=0.001818
! 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.264386Jy  sigma=0.001818
! Fit after  self-cal, rms=0.266323Jy  sigma=0.001815
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.03 mas, bmaj=10.08 mas, bpa=12.45 degrees
! Estimated noise=473.976 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00970882 Jy
! Component: 100  -  total flux cleaned = 0.0164345 Jy
! Component: 150  -  total flux cleaned = 0.0204453 Jy
! Component: 200  -  total flux cleaned = 0.022532 Jy
! Total flux subtracted in 200 components = 0.022532 Jy
! Clean residual min=-0.007187 max=0.010465 Jy/beam
! Clean residual mean=0.000546 rms=0.002703 Jy/beam
! Combined flux in latest and established models = 3.21986 Jy
selfcal
! Performing phase self-cal
! Adding 60 model components to the UV plane model.
! The established model now contains 295 components and 3.21986 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.266020Jy  sigma=0.001812
! Fit after  self-cal, rms=0.266020Jy  sigma=0.001812
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.00271578 Jy
! Component: 100  -  total flux cleaned = 0.00401742 Jy
! Component: 150  -  total flux cleaned = 0.00493971 Jy
! Component: 200  -  total flux cleaned = 0.00567416 Jy
! Total flux subtracted in 200 components = 0.00567416 Jy
! Clean residual min=-0.006978 max=0.010182 Jy/beam
! Clean residual mean=0.000490 rms=0.002636 Jy/beam
! Combined flux in latest and established models = 3.22553 Jy
! Performing phase self-cal
! Adding 47 model components to the UV plane model.
! The established model now contains 324 components and 3.22553 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.265886Jy  sigma=0.001811
! Fit after  self-cal, rms=0.265881Jy  sigma=0.001811
! 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.978 mas, bmaj=6.348 mas, bpa=5.423 degrees
! Estimated noise=388.172 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.978 x 6.348 at 5.423 degrees (North through East)
! Clean map  min=-0.0069023  max=2.1635 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.265881Jy  sigma=0.001811
! Fit after  self-cal, rms=0.238669Jy  sigma=0.001380
! Inverting map and beam 
! Estimated beam: bmin=2.978 mas, bmaj=6.349 mas, bpa=5.41 degrees
! Estimated noise=387.497 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00534397 Jy
! Component: 100  -  total flux cleaned = -0.00559837 Jy
! Component: 150  -  total flux cleaned = -0.00607344 Jy
! Component: 200  -  total flux cleaned = -0.00652126 Jy
! Total flux subtracted in 200 components = -0.00652126 Jy
! Clean residual min=-0.007489 max=0.008130 Jy/beam
! Clean residual mean=0.000294 rms=0.001514 Jy/beam
! Combined flux in latest and established models = 3.21901 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 330 components and 3.21901 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238094Jy  sigma=0.001373
! Fit after  self-cal, rms=0.238117Jy  sigma=0.001373
! Inverting map 
! Added new window around map position (-4, 27).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00584711 Jy
! Component: 100  -  total flux cleaned = 0.00731149 Jy
! Component: 150  -  total flux cleaned = 0.00749902 Jy
! Component: 200  -  total flux cleaned = 0.00824238 Jy
! Total flux subtracted in 200 components = 0.00824238 Jy
! Clean residual min=-0.007299 max=0.006553 Jy/beam
! Clean residual mean=0.000258 rms=0.001451 Jy/beam
! Combined flux in latest and established models = 3.22725 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 342 components and 3.22725 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237709Jy  sigma=0.001368
! Fit after  self-cal, rms=0.237735Jy  sigma=0.001368
! 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.237735Jy  sigma=0.001368
! Fit after  self-cal, rms=0.239477Jy  sigma=0.001367
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.131 mas, bmaj=5.448 mas, bpa=-0.5979 degrees
! Estimated noise=731.401 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.60014 Jy
! Component: 100  -  total flux cleaned = 2.03335 Jy
! Component: 150  -  total flux cleaned = 2.28068 Jy
! Component: 200  -  total flux cleaned = 2.44296 Jy
! Total flux subtracted in 200 components = 2.44296 Jy
! Clean residual min=-0.026047 max=0.087760 Jy/beam
! Clean residual mean=0.000303 rms=0.007614 Jy/beam
! Combined flux in latest and established models = 2.44296 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 19 model components to the UV plane model.
! The established model now contains 19 components and 2.44296 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.984 mas, bmaj=6.354 mas, bpa=5.448 degrees
! Estimated noise=387.433 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.176058 Jy
! Component: 100  -  total flux cleaned = 0.278004 Jy
! Component: 150  -  total flux cleaned = 0.347073 Jy
! Component: 200  -  total flux cleaned = 0.400841 Jy
! Total flux subtracted in 200 components = 0.400841 Jy
! Clean residual min=-0.015018 max=0.032077 Jy/beam
! Clean residual mean=0.001834 rms=0.006788 Jy/beam
! Combined flux in latest and established models = 2.8438 Jy
! Adding 71 model components to the UV plane model.
! The established model now contains 79 components and 2.8438 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0440959 Jy
! Component: 100  -  total flux cleaned = 0.0810868 Jy
! Component: 150  -  total flux cleaned = 0.112504 Jy
! Component: 200  -  total flux cleaned = 0.139409 Jy
! Total flux subtracted in 200 components = 0.139409 Jy
! Clean residual min=-0.010535 max=0.017093 Jy/beam
! Clean residual mean=0.001259 rms=0.004079 Jy/beam
! Combined flux in latest and established models = 2.98321 Jy
! Adding 88 model components to the UV plane model.
! The established model now contains 152 components and 2.98321 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.034 mas, bmaj=10.08 mas, bpa=12.45 degrees
! Estimated noise=472.131 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0462028 Jy
! Component: 100  -  total flux cleaned = 0.0792197 Jy
! Component: 150  -  total flux cleaned = 0.104098 Jy
! Component: 200  -  total flux cleaned = 0.123735 Jy
! Total flux subtracted in 200 components = 0.123735 Jy
! Clean residual min=-0.010447 max=0.014486 Jy/beam
! Clean residual mean=0.001866 rms=0.004128 Jy/beam
! Combined flux in latest and established models = 3.10694 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.016162 Jy
! Component: 100  -  total flux cleaned = 0.0298031 Jy
! Component: 150  -  total flux cleaned = 0.0414607 Jy
! Component: 200  -  total flux cleaned = 0.051618 Jy
! Total flux subtracted in 200 components = 0.051618 Jy
! Clean residual min=-0.007833 max=0.010266 Jy/beam
! Clean residual mean=0.001365 rms=0.002985 Jy/beam
! Combined flux in latest and established models = 3.15856 Jy
! Adding 212 model components to the UV plane model.
! The established model now contains 345 components and 3.15856 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.984 mas, bmaj=6.354 mas, bpa=5.448 degrees
! Estimated noise=387.433 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00847724 Jy
! Component: 100  -  total flux cleaned = 0.0140009 Jy
! Component: 150  -  total flux cleaned = 0.0182856 Jy
! Component: 200  -  total flux cleaned = 0.0225043 Jy
! Total flux subtracted in 200 components = 0.0225043 Jy
! Clean residual min=-0.007432 max=0.007334 Jy/beam
! Clean residual mean=0.000462 rms=0.001571 Jy/beam
! Combined flux in latest and established models = 3.18107 Jy
selfcal
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 374 components and 3.18107 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.239516Jy  sigma=0.001371
! Fit after  self-cal, rms=0.239533Jy  sigma=0.001367
wmodel J2148+0657_S_2000_05_22_pus_map.mod
! Writing 374 model components to file: J2148+0657_S_2000_05_22_pus_map.mod
wobs J2148+0657_S_2000_05_22_pus_uvs.fits
! Writing UV FITS file: J2148+0657_S_2000_05_22_pus_uvs.fits
wwins J2148+0657_S_2000_05_22_pus_map.win
! wwins: Wrote 9 windows to J2148+0657_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=4096  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.000190397 Jy
! Component: 100  -  total flux cleaned = 0.00177565 Jy
! Component: 150  -  total flux cleaned = 0.00383232 Jy
! Component: 200  -  total flux cleaned = 0.00557625 Jy
! Component: 250  -  total flux cleaned = 0.00725772 Jy
! Component: 300  -  total flux cleaned = 0.00889216 Jy
! Component: 350  -  total flux cleaned = 0.0104855 Jy
! Component: 400  -  total flux cleaned = 0.0118589 Jy
! Component: 450  -  total flux cleaned = 0.0128457 Jy
! Component: 500  -  total flux cleaned = 0.0141671 Jy
! Component: 550  -  total flux cleaned = 0.015377 Jy
! Component: 600  -  total flux cleaned = 0.0163969 Jy
! Component: 650  -  total flux cleaned = 0.0173178 Jy
! Component: 700  -  total flux cleaned = 0.0183067 Jy
! Component: 750  -  total flux cleaned = 0.0191191 Jy
! Component: 800  -  total flux cleaned = 0.0200009 Jy
! Component: 850  -  total flux cleaned = 0.0207124 Jy
! Component: 900  -  total flux cleaned = 0.0214931 Jy
! Component: 950  -  total flux cleaned = 0.0221866 Jy
! Component: 1000  -  total flux cleaned = 0.0231768 Jy
! Component: 1050  -  total flux cleaned = 0.0237784 Jy
! Component: 1100  -  total flux cleaned = 0.0245227 Jy
! Component: 1150  -  total flux cleaned = 0.0254054 Jy
! Component: 1200  -  total flux cleaned = 0.025841 Jy
! Component: 1250  -  total flux cleaned = 0.0265607 Jy
! Component: 1300  -  total flux cleaned = 0.0274151 Jy
! Component: 1350  -  total flux cleaned = 0.0281201 Jy
! Component: 1400  -  total flux cleaned = 0.0287486 Jy
! Component: 1450  -  total flux cleaned = 0.029717 Jy
! Component: 1500  -  total flux cleaned = 0.03047 Jy
! Component: 1550  -  total flux cleaned = 0.0310136 Jy
! Component: 1600  -  total flux cleaned = 0.0318217 Jy
! Component: 1650  -  total flux cleaned = 0.0324891 Jy
! Component: 1700  -  total flux cleaned = 0.0330845 Jy
! Component: 1750  -  total flux cleaned = 0.0337407 Jy
! Component: 1800  -  total flux cleaned = 0.0343913 Jy
! Component: 1850  -  total flux cleaned = 0.0351012 Jy
! Component: 1900  -  total flux cleaned = 0.0357413 Jy
! Component: 1950  -  total flux cleaned = 0.0362491 Jy
! Component: 2000  -  total flux cleaned = 0.0368795 Jy
! Component: 2050  -  total flux cleaned = 0.0374419 Jy
! Component: 2100  -  total flux cleaned = 0.0379381 Jy
! Component: 2150  -  total flux cleaned = 0.0386157 Jy
! Component: 2200  -  total flux cleaned = 0.0392271 Jy
! Component: 2250  -  total flux cleaned = 0.0397126 Jy
! Component: 2300  -  total flux cleaned = 0.0401951 Jy
! Component: 2350  -  total flux cleaned = 0.0409137 Jy
! Component: 2400  -  total flux cleaned = 0.0414481 Jy
! Component: 2450  -  total flux cleaned = 0.0419202 Jy
! Component: 2500  -  total flux cleaned = 0.0423893 Jy
! Component: 2550  -  total flux cleaned = 0.0429134 Jy
! Component: 2600  -  total flux cleaned = 0.0436075 Jy
! Component: 2650  -  total flux cleaned = 0.0441249 Jy
! Component: 2700  -  total flux cleaned = 0.0443536 Jy
! Component: 2750  -  total flux cleaned = 0.045035 Jy
! Component: 2800  -  total flux cleaned = 0.0454866 Jy
! Component: 2850  -  total flux cleaned = 0.0458228 Jy
! Component: 2900  -  total flux cleaned = 0.0463248 Jy
! Component: 2950  -  total flux cleaned = 0.0467681 Jy
! Component: 3000  -  total flux cleaned = 0.0472637 Jy
! Component: 3050  -  total flux cleaned = 0.0477016 Jy
! Component: 3100  -  total flux cleaned = 0.0480818 Jy
! Component: 3150  -  total flux cleaned = 0.0483524 Jy
! Component: 3200  -  total flux cleaned = 0.0488912 Jy
! Component: 3250  -  total flux cleaned = 0.0492124 Jy
! Component: 3300  -  total flux cleaned = 0.0495318 Jy
! Component: 3350  -  total flux cleaned = 0.0499551 Jy
! Component: 3400  -  total flux cleaned = 0.0502186 Jy
! Component: 3450  -  total flux cleaned = 0.0504808 Jy
! Component: 3500  -  total flux cleaned = 0.0510025 Jy
! Component: 3550  -  total flux cleaned = 0.0512615 Jy
! Component: 3600  -  total flux cleaned = 0.0516222 Jy
! Component: 3650  -  total flux cleaned = 0.0518788 Jy
! Component: 3700  -  total flux cleaned = 0.0523383 Jy
! Component: 3750  -  total flux cleaned = 0.0525925 Jy
! Component: 3800  -  total flux cleaned = 0.0529463 Jy
! Component: 3850  -  total flux cleaned = 0.0531476 Jy
! Component: 3900  -  total flux cleaned = 0.0532978 Jy
! Component: 3950  -  total flux cleaned = 0.0537465 Jy
! Component: 4000  -  total flux cleaned = 0.0540441 Jy
! Component: 4050  -  total flux cleaned = 0.0542911 Jy
! Total flux subtracted in 4096 components = 0.0546841 Jy
! Clean residual min=-0.002657 max=0.003320 Jy/beam
! Clean residual mean=0.000233 rms=0.000935 Jy/beam
! Combined flux in latest and established models = 3.23575 Jy
keep
! Adding 344 model components to the UV plane model.
! The established model now contains 715 components and 3.23575 Jy
![Exited script file: muppet]
wmap "J2148+0657_S_2000_05_22_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.984 x 6.354 at 5.448 degrees (North through East)
! Clean map  min=-0.0068962  max=2.1642 Jy/beam
! Writing clean map to FITS file: J2148+0657_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 2.16421 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000918134 
device "J2148+0657_S_2000_05_22_pus\_map.eps/VPS"
! Attempting to open device: 'J2148+0657_S_2000_05_22_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.127271 0.127271 0.254541 0.509082 1.01816 2.03633 4.07266 8.14531 16.2906 32.5812 65.1625
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0027 
print "peak=",int(1000*peak_flux)/1000
! peak= 2.164 
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.984 x 6.354 at 5.448 degrees (North through East)
! Clean map  min=-0.0068962  max=2.1642 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2148+0657_S_2000_05_22_pus\_map.gif/vgif"
! Attempting to open device: 'J2148+0657_S_2000_05_22_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2148+0657_S_2000_05_22_pus_uvs.log closed on Tue Nov 20 14:21:23 2007