! Started logfile: J2152+1734_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:18:35 2007
obs J2152+1734_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J2152+1734_S_2001_04_09_pus_uva.fits
! AN table 1: 162 integrations on 190 of 190 possible baselines.
! AN table 2: 96 integrations on 190 of 190 possible baselines.
! AN table 3: 88 integrations on 190 of 190 possible baselines.
! AN table 4: 148 integrations on 190 of 190 possible baselines.
! AN table 5: 135 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0830056 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J2152+1734
! 
! 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.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1949 lines of history.
! 
! Reading 39680 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 J2152+1734_S_2001_04_09_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 3240 telescope corrections were flagged in sub-array 1.
!  A total of 1125 telescope corrections were flagged in sub-array 2.
!  A total of 1370 telescope corrections were flagged in sub-array 3.
!  A total of 2275 telescope corrections were flagged in sub-array 4.
!  A total of 2156 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 3240 telescope corrections were flagged in sub-array 1.
!  A total of 1125 telescope corrections were flagged in sub-array 2.
!  A total of 1370 telescope corrections were flagged in sub-array 3.
!  A total of 2275 telescope corrections were flagged in sub-array 4.
!  A total of 2156 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 3240 telescope corrections were flagged in sub-array 1.
!  A total of 1128 telescope corrections were flagged in sub-array 2.
!  A total of 1370 telescope corrections were flagged in sub-array 3.
!  A total of 2275 telescope corrections were flagged in sub-array 4.
!  A total of 2156 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 3240 telescope corrections were flagged in sub-array 1.
!  A total of 1128 telescope corrections were flagged in sub-array 2.
!  A total of 1370 telescope corrections were flagged in sub-array 3.
!  A total of 2275 telescope corrections were flagged in sub-array 4.
!  A total of 2156 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=0.976906Jy  sigma=0.007194
! Fit after  self-cal, rms=0.693316Jy  sigma=0.004950
! 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.236 mas, bmaj=4.043 mas, bpa=-1.638 degrees
! Estimated noise=805.552 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.304302 Jy
! Component: 100  -  total flux cleaned = 0.38696 Jy
! Total flux subtracted in 100 components = 0.38696 Jy
! Clean residual min=-0.012592 max=0.037064 Jy/beam
! Clean residual mean=0.000122 rms=0.003558 Jy/beam
! Combined flux in latest and established models = 0.38696 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.38696 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.375815Jy  sigma=0.001548
! Fit after  self-cal, rms=0.375623Jy  sigma=0.001545
! Inverting map 
! Added new window around map position (-2.5, 0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0438861 Jy
! Component: 100  -  total flux cleaned = 0.0695976 Jy
! Total flux subtracted in 100 components = 0.0695976 Jy
! Clean residual min=-0.008923 max=0.014975 Jy/beam
! Clean residual mean=0.000081 rms=0.002507 Jy/beam
! Combined flux in latest and established models = 0.456557 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 19 components and 0.456557 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.368546Jy  sigma=0.001424
! Fit after  self-cal, rms=0.368395Jy  sigma=0.001421
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0183702 Jy
! Component: 100  -  total flux cleaned = 0.0294063 Jy
! Total flux subtracted in 100 components = 0.0294063 Jy
! Clean residual min=-0.008324 max=0.012937 Jy/beam
! Clean residual mean=0.000063 rms=0.002253 Jy/beam
! Combined flux in latest and established models = 0.485964 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 27 components and 0.485964 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.366992Jy  sigma=0.001395
! Fit after  self-cal, rms=0.366963Jy  sigma=0.001395
! 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.663 mas, bmaj=4.491 mas, bpa=-1.068 degrees
! Estimated noise=468.833 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 (-7, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.01801 Jy
! Component: 100  -  total flux cleaned = 0.029658 Jy
! Component: 150  -  total flux cleaned = 0.0382169 Jy
! Component: 200  -  total flux cleaned = 0.044723 Jy
! Total flux subtracted in 200 components = 0.044723 Jy
! Clean residual min=-0.006267 max=0.008832 Jy/beam
! Clean residual mean=0.000327 rms=0.001921 Jy/beam
! Combined flux in latest and established models = 0.530687 Jy
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 60 components and 0.530686 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.365733Jy  sigma=0.001376
! Fit after  self-cal, rms=0.365636Jy  sigma=0.001374
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        0.95     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        1.02     KP        0.99     
!   LA        0.90     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        0.98     NY        1.00     OV        0.97     PT        0.89     
!   SC        0.98     TS        1.00*    WF        0.99     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.02     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.10     KP        1.02     
!   LA        0.99     MA        1.00*    MC        1.00*    MK        1.06     
!   NL        1.00*    NY        1.00*    OV        1.02     PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        1.01     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        1.00*    KP        0.94     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        1.00     NY        1.08     OV        1.02     PT        0.93     
!   SC        1.00*    TS        1.00     WF        1.03     WZ        1.00*    
! 
!  A total of 54 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.09     FD        1.00*    GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.94     KP        0.79     
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.00*    NY        1.06     OV        1.06     PT        1.10     
!   SC        1.00*    TS        1.06     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.92     FD        0.95     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.99     KP        0.91     
!   LA        0.92     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        0.97     NY        1.07     OV        0.92     PT        0.93     
!   SC        0.98     TS        1.00*    WF        0.97     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.98     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.12     KP        1.04     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        1.13     
!   NL        1.00*    NY        1.00*    OV        0.98     PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        1.02     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.05     KK        1.00*    KP        0.97     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.01     NY        1.09     OV        0.99     PT        0.98     
!   SC        1.00*    TS        1.01     WF        1.03     WZ        1.00*    
! 
!  A total of 54 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.09     FD        1.00*    GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.94     KP        0.70     
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.00*    NY        1.01     OV        1.00     PT        1.15     
!   SC        1.00*    TS        1.05     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.95     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.01     KP        0.94     
!   LA        0.89     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        0.98     NY        0.93     OV        0.94     PT        1.15     
!   SC        0.94     TS        1.00*    WF        1.01     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.00     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.17     KP        1.06     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        1.03     
!   NL        1.00*    NY        1.00*    OV        1.01     PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.10     FD        1.02     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.07     KK        1.00*    KP        1.00     
!   LA        0.97     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        1.01     NY        1.12     OV        1.00     PT        1.01     
!   SC        1.00*    TS        1.06     WF        1.06     WZ        1.00*    
! 
!  A total of 54 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.10     FD        1.00*    GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.97     KP        1.03     
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        0.97     
!   NL        1.00*    NY        1.03     OV        1.05     PT        1.17     
!   SC        1.00*    TS        1.07     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.91     FD        0.97     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.97     KP        0.95     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.94     
!   NL        0.98     NY        1.02     OV        0.91     PT        1.78     
!   SC        0.98     TS        1.00*    WF        1.00     WZ        1.00*    
! 
!  A total of 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.01     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.09     KP        1.13     
!   LA        0.99     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        1.00*    NY        1.00*    OV        1.01     PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 84 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00     FD        1.03     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.08     KK        1.00*    KP        1.01     
!   LA        1.00     MA        1.00*    MC        1.00*    MK        0.94     
!   NL        0.99     NY        1.10     OV        1.00     PT        1.11     
!   SC        1.00*    TS        0.98     WF        1.00     WZ        1.00*    
! 
!  A total of 54 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.01     FD        1.00*    GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.95     KP        0.94     
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        0.96     
!   NL        1.00*    NY        1.09     OV        1.02     PT        1.19     
!   SC        1.00*    TS        1.01     WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.365636Jy  sigma=0.001374
! Fit after  self-cal, rms=0.370719Jy  sigma=0.001322
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.681 mas, bmaj=4.547 mas, bpa=-1.47 degrees
! Estimated noise=468.663 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.00787387 Jy
! Component: 100  -  total flux cleaned = 0.0117612 Jy
! Component: 150  -  total flux cleaned = 0.0130651 Jy
! Component: 200  -  total flux cleaned = 0.0136933 Jy
! Total flux subtracted in 200 components = 0.0136933 Jy
! Clean residual min=-0.002726 max=0.004248 Jy/beam
! Clean residual mean=0.000294 rms=0.000893 Jy/beam
! Combined flux in latest and established models = 0.54438 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 82 components and 0.54438 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.370512Jy  sigma=0.001319
! Fit after  self-cal, rms=0.370669Jy  sigma=0.001318
! 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.370669Jy  sigma=0.001318
! Fit after  self-cal, rms=0.371724Jy  sigma=0.001317
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.679 mas, bmaj=4.546 mas, bpa=-1.512 degrees
! Estimated noise=469.715 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00420937 Jy
! Component: 100  -  total flux cleaned = 0.00644868 Jy
! Component: 150  -  total flux cleaned = 0.00701546 Jy
! Component: 200  -  total flux cleaned = 0.00748264 Jy
! Total flux subtracted in 200 components = 0.00748264 Jy
! Clean residual min=-0.002730 max=0.004138 Jy/beam
! Clean residual mean=0.000267 rms=0.000824 Jy/beam
! Combined flux in latest and established models = 0.551862 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 92 components and 0.551862 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371642Jy  sigma=0.001317
! Fit after  self-cal, rms=0.371624Jy  sigma=0.001316
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 (-60.5, 30.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00416916 Jy
! Component: 100  -  total flux cleaned = 0.00665398 Jy
! Component: 150  -  total flux cleaned = 0.00814054 Jy
! Component: 200  -  total flux cleaned = 0.00929976 Jy
! Total flux subtracted in 200 components = 0.00929976 Jy
! Clean residual min=-0.002622 max=0.003263 Jy/beam
! Clean residual mean=0.000234 rms=0.000738 Jy/beam
! Combined flux in latest and established models = 0.561162 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 111 components and 0.561162 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371529Jy  sigma=0.001315
! Fit after  self-cal, rms=0.371516Jy  sigma=0.001315
! Inverting map 
! Added new window around map position (-20, -12).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00329953 Jy
! Component: 100  -  total flux cleaned = 0.0051971 Jy
! Component: 150  -  total flux cleaned = 0.00637478 Jy
! Component: 200  -  total flux cleaned = 0.00710518 Jy
! Total flux subtracted in 200 components = 0.00710518 Jy
! Clean residual min=-0.002509 max=0.002802 Jy/beam
! Clean residual mean=0.000211 rms=0.000711 Jy/beam
! Combined flux in latest and established models = 0.568267 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 130 components and 0.568267 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.371433Jy  sigma=0.001315
! Fit after  self-cal, rms=0.371425Jy  sigma=0.001315
! 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.371425Jy  sigma=0.001315
! Fit after  self-cal, rms=0.372510Jy  sigma=0.001315
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.679 mas, bmaj=4.549 mas, bpa=-1.586 degrees
! Estimated noise=470.704 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00222398 Jy
! Component: 100  -  total flux cleaned = 0.00388539 Jy
! Component: 150  -  total flux cleaned = 0.0047975 Jy
! Component: 200  -  total flux cleaned = 0.0052074 Jy
! Total flux subtracted in 200 components = 0.0052074 Jy
! Clean residual min=-0.002463 max=0.002769 Jy/beam
! Clean residual mean=0.000195 rms=0.000690 Jy/beam
! Combined flux in latest and established models = 0.573475 Jy
selfcal
! Performing phase self-cal
! Adding 37 model components to the UV plane model.
! The established model now contains 141 components and 0.573475 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372457Jy  sigma=0.001314
! Fit after  self-cal, rms=0.372454Jy  sigma=0.001314
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000687996 Jy
! Component: 100  -  total flux cleaned = 0.000928266 Jy
! Component: 150  -  total flux cleaned = 0.00115768 Jy
! Component: 200  -  total flux cleaned = 0.00133262 Jy
! Total flux subtracted in 200 components = 0.00133262 Jy
! Clean residual min=-0.002469 max=0.002705 Jy/beam
! Clean residual mean=0.000192 rms=0.000682 Jy/beam
! Combined flux in latest and established models = 0.574807 Jy
! Performing phase self-cal
! Adding 45 model components to the UV plane model.
! The established model now contains 155 components and 0.574807 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.372428Jy  sigma=0.001314
! Fit after  self-cal, rms=0.372425Jy  sigma=0.001314
! 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.372425Jy  sigma=0.001314
! Fit after  self-cal, rms=0.373173Jy  sigma=0.001314
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.823 mas, bmaj=8.461 mas, bpa=-9.206 degrees
! Estimated noise=650.745 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0027159 Jy
! Component: 100  -  total flux cleaned = 0.00428158 Jy
! Component: 150  -  total flux cleaned = 0.00470809 Jy
! Component: 200  -  total flux cleaned = 0.00496916 Jy
! Total flux subtracted in 200 components = 0.00496916 Jy
! Clean residual min=-0.002655 max=0.004377 Jy/beam
! Clean residual mean=0.000526 rms=0.001062 Jy/beam
! Combined flux in latest and established models = 0.579777 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 169 components and 0.579777 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.373157Jy  sigma=0.001314
! Fit after  self-cal, rms=0.373159Jy  sigma=0.001314
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000767496 Jy
! Component: 100  -  total flux cleaned = 0.000918926 Jy
! Component: 150  -  total flux cleaned = 0.000986006 Jy
! Component: 200  -  total flux cleaned = 0.00107499 Jy
! Total flux subtracted in 200 components = 0.00107499 Jy
! Clean residual min=-0.002578 max=0.004293 Jy/beam
! Clean residual mean=0.000520 rms=0.001051 Jy/beam
! Combined flux in latest and established models = 0.580852 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 173 components and 0.580852 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.373158Jy  sigma=0.001314
! Fit after  self-cal, rms=0.373163Jy  sigma=0.001314
! 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.679 mas, bmaj=4.549 mas, bpa=-1.626 degrees
! Estimated noise=471.401 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.679 x 4.549 at -1.626 degrees (North through East)
! Clean map  min=-0.00228  max=0.39752 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.239 mas, bmaj=4.073 mas, bpa=-2.028 degrees
! Estimated noise=820.217 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.303644 Jy
! Component: 100  -  total flux cleaned = 0.392248 Jy
! Component: 150  -  total flux cleaned = 0.436562 Jy
! Component: 200  -  total flux cleaned = 0.464207 Jy
! Total flux subtracted in 200 components = 0.464207 Jy
! Clean residual min=-0.007119 max=0.015319 Jy/beam
! Clean residual mean=0.000108 rms=0.001894 Jy/beam
! Combined flux in latest and established models = 0.464207 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 16 model components to the UV plane model.
! The established model now contains 16 components and 0.464207 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.679 mas, bmaj=4.549 mas, bpa=-1.626 degrees
! Estimated noise=471.401 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.029581 Jy
! Component: 100  -  total flux cleaned = 0.047995 Jy
! Component: 150  -  total flux cleaned = 0.0599474 Jy
! Component: 200  -  total flux cleaned = 0.068407 Jy
! Total flux subtracted in 200 components = 0.068407 Jy
! Clean residual min=-0.003094 max=0.005243 Jy/beam
! Clean residual mean=0.000342 rms=0.001135 Jy/beam
! Combined flux in latest and established models = 0.532614 Jy
! Adding 49 model components to the UV plane model.
! The established model now contains 57 components and 0.532614 Jy
! Inverting map 
! Added new window around map position (-12, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00667499 Jy
! Component: 100  -  total flux cleaned = 0.0122213 Jy
! Component: 150  -  total flux cleaned = 0.016928 Jy
! Component: 200  -  total flux cleaned = 0.0209747 Jy
! Total flux subtracted in 200 components = 0.0209747 Jy
! Clean residual min=-0.002607 max=0.003339 Jy/beam
! Clean residual mean=0.000267 rms=0.000830 Jy/beam
! Combined flux in latest and established models = 0.553589 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 91 components and 0.553589 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.823 mas, bmaj=8.461 mas, bpa=-9.206 degrees
! Estimated noise=650.745 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00742979 Jy
! Component: 100  -  total flux cleaned = 0.0125385 Jy
! Component: 150  -  total flux cleaned = 0.0163752 Jy
! Component: 200  -  total flux cleaned = 0.0192987 Jy
! Total flux subtracted in 200 components = 0.0192987 Jy
! Clean residual min=-0.002617 max=0.004367 Jy/beam
! Clean residual mean=0.000594 rms=0.001097 Jy/beam
! Combined flux in latest and established models = 0.572888 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.00225055 Jy
! Component: 100  -  total flux cleaned = 0.0039906 Jy
! Component: 150  -  total flux cleaned = 0.00533849 Jy
! Component: 200  -  total flux cleaned = 0.00638444 Jy
! Total flux subtracted in 200 components = 0.00638444 Jy
! Clean residual min=-0.002582 max=0.004300 Jy/beam
! Clean residual mean=0.000524 rms=0.001037 Jy/beam
! Combined flux in latest and established models = 0.579272 Jy
! Adding 99 model components to the UV plane model.
! The established model now contains 179 components and 0.579272 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.679 mas, bmaj=4.549 mas, bpa=-1.626 degrees
! Estimated noise=471.401 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000330534 Jy
! Component: 100  -  total flux cleaned = -0.000263387 Jy
! Component: 150  -  total flux cleaned = -0.000200597 Jy
! Component: 200  -  total flux cleaned = -8.37383e-05 Jy
! Total flux subtracted in 200 components = -8.37383e-05 Jy
! Clean residual min=-0.002527 max=0.002800 Jy/beam
! Clean residual mean=0.000179 rms=0.000679 Jy/beam
! Combined flux in latest and established models = 0.579188 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 202 components and 0.579188 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.373182Jy  sigma=0.001314
! Fit after  self-cal, rms=0.373157Jy  sigma=0.001314
wmodel J2152+1734_S_2001_04_09_pus_map.mod
! Writing 202 model components to file: J2152+1734_S_2001_04_09_pus_map.mod
wobs J2152+1734_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J2152+1734_S_2001_04_09_pus_uvs.fits
wwins J2152+1734_S_2001_04_09_pus_map.win
! wwins: Wrote 6 windows to J2152+1734_S_2001_04_09_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.0012727 Jy
! Component: 100  -  total flux cleaned = 0.00211374 Jy
! Component: 150  -  total flux cleaned = 0.00268974 Jy
! Component: 200  -  total flux cleaned = 0.00315948 Jy
! Component: 250  -  total flux cleaned = 0.0036566 Jy
! Component: 300  -  total flux cleaned = 0.00409955 Jy
! Component: 350  -  total flux cleaned = 0.00449389 Jy
! Component: 400  -  total flux cleaned = 0.00495711 Jy
! Component: 450  -  total flux cleaned = 0.00529743 Jy
! Component: 500  -  total flux cleaned = 0.00563183 Jy
! Component: 550  -  total flux cleaned = 0.00606916 Jy
! Component: 600  -  total flux cleaned = 0.0063912 Jy
! Component: 650  -  total flux cleaned = 0.0066385 Jy
! Component: 700  -  total flux cleaned = 0.00702129 Jy
! Component: 750  -  total flux cleaned = 0.00736458 Jy
! Component: 800  -  total flux cleaned = 0.00766975 Jy
! Component: 850  -  total flux cleaned = 0.00807263 Jy
! Component: 900  -  total flux cleaned = 0.00840419 Jy
! Component: 950  -  total flux cleaned = 0.00873252 Jy
! Component: 1000  -  total flux cleaned = 0.00908969 Jy
! Component: 1050  -  total flux cleaned = 0.00944322 Jy
! Component: 1100  -  total flux cleaned = 0.00969764 Jy
! Component: 1150  -  total flux cleaned = 0.010013 Jy
! Component: 1200  -  total flux cleaned = 0.0103565 Jy
! Component: 1250  -  total flux cleaned = 0.0107587 Jy
! Component: 1300  -  total flux cleaned = 0.0110346 Jy
! Component: 1350  -  total flux cleaned = 0.0113995 Jy
! Component: 1400  -  total flux cleaned = 0.0117316 Jy
! Component: 1450  -  total flux cleaned = 0.0121504 Jy
! Component: 1500  -  total flux cleaned = 0.0123581 Jy
! Component: 1550  -  total flux cleaned = 0.0126531 Jy
! Component: 1600  -  total flux cleaned = 0.0129459 Jy
! Component: 1650  -  total flux cleaned = 0.0132072 Jy
! Component: 1700  -  total flux cleaned = 0.0134955 Jy
! Component: 1750  -  total flux cleaned = 0.0138105 Jy
! Component: 1800  -  total flux cleaned = 0.0140096 Jy
! Component: 1850  -  total flux cleaned = 0.01432 Jy
! Component: 1900  -  total flux cleaned = 0.0145444 Jy
! Component: 1950  -  total flux cleaned = 0.0147672 Jy
! Component: 2000  -  total flux cleaned = 0.0150438 Jy
! Total flux subtracted in 2048 components = 0.0152638 Jy
! Clean residual min=-0.001830 max=0.001656 Jy/beam
! Clean residual mean=0.000126 rms=0.000528 Jy/beam
! Combined flux in latest and established models = 0.594452 Jy
keep
! Adding 153 model components to the UV plane model.
! The established model now contains 355 components and 0.594452 Jy
![Exited script file: muppet]
wmap "J2152+1734_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.679 x 4.549 at -1.626 degrees (North through East)
! Clean map  min=-0.0020565  max=0.39755 Jy/beam
! Writing clean map to FITS file: J2152+1734_S_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.397548 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000528169 
device "J2152+1734_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J2152+1734_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.39857 0.39857 0.797139 1.59428 3.18856 6.37711 12.7542 25.5085 51.0169
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.397 
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.679 x 4.549 at -1.626 degrees (North through East)
! Clean map  min=-0.0020565  max=0.39755 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J2152+1734_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J2152+1734_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J2152+1734_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:18:58 2007