! Started logfile: J0854+2006_S_2003_09_17_pus_uvs.log on Mon May 21 21:16:18 2007
obs J0854+2006_S_2003_09_17_pus_uva.fits
! Reading UV FITS file: J0854+2006_S_2003_09_17_pus_uva.fits
! AN table 1: 43 integrations on 120 of 120 possible baselines.
! AN table 2: 47 integrations on 120 of 120 possible baselines.
! AN table 3: 128 integrations on 120 of 120 possible baselines.
! AN table 4: 160 integrations on 120 of 120 possible baselines.
! AN table 5: 20 integrations on 120 of 120 possible baselines.
! AN table 6: 6 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.0622525 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0854+2006
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! 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.23697e+09        8e+06          1        8e+06
!  02        2  2.26697e+09        8e+06          1        8e+06
!  03        3  2.35697e+09        8e+06          1        8e+06
!  04        4  2.37697e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1732 lines of history.
! 
! Reading 12072 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 
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 502 telescope corrections were flagged in sub-array 1.
!  A total of 647 telescope corrections were flagged in sub-array 2.
!  A total of 1613 telescope corrections were flagged in sub-array 3.
!  A total of 2080 telescope corrections were flagged in sub-array 4.
!  A total of 250 telescope corrections were flagged in sub-array 5.
!  A total of 96 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 2.
!  A total of 502 telescope corrections were flagged in sub-array 1.
!  A total of 647 telescope corrections were flagged in sub-array 2.
!  A total of 1613 telescope corrections were flagged in sub-array 3.
!  A total of 2080 telescope corrections were flagged in sub-array 4.
!  A total of 250 telescope corrections were flagged in sub-array 5.
!  A total of 96 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 3.
!  A total of 502 telescope corrections were flagged in sub-array 1.
!  A total of 647 telescope corrections were flagged in sub-array 2.
!  A total of 1613 telescope corrections were flagged in sub-array 3.
!  A total of 2080 telescope corrections were flagged in sub-array 4.
!  A total of 250 telescope corrections were flagged in sub-array 5.
!  A total of 96 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 4.
!  A total of 502 telescope corrections were flagged in sub-array 1.
!  A total of 647 telescope corrections were flagged in sub-array 2.
!  A total of 1613 telescope corrections were flagged in sub-array 3.
!  A total of 2080 telescope corrections were flagged in sub-array 4.
!  A total of 250 telescope corrections were flagged in sub-array 5.
!  A total of 96 telescope corrections were flagged in sub-array 6.
! 
! Fit before self-cal, rms=1.311566Jy  sigma=0.007319
! Fit after  self-cal, rms=0.602744Jy  sigma=0.003415
! 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.081 mas, bmaj=3.969 mas, bpa=3.401 degrees
! Estimated noise=1554.28 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.957092 Jy
! Component: 100  -  total flux cleaned = 1.28464 Jy
! Total flux subtracted in 100 components = 1.28464 Jy
! Clean residual min=-0.045444 max=0.140540 Jy/beam
! Clean residual mean=-0.000032 rms=0.015674 Jy/beam
! Combined flux in latest and established models = 1.28464 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 1.28464 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.448377Jy  sigma=0.002356
! Fit after  self-cal, rms=0.447390Jy  sigma=0.002354
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.148681 Jy
! Component: 100  -  total flux cleaned = 0.226042 Jy
! Total flux subtracted in 100 components = 0.226042 Jy
! Clean residual min=-0.043963 max=0.063217 Jy/beam
! Clean residual mean=-0.000229 rms=0.010659 Jy/beam
! Combined flux in latest and established models = 1.51068 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 23 components and 1.51069 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385692Jy  sigma=0.001878
! Fit after  self-cal, rms=0.385102Jy  sigma=0.001876
! Inverting map 
! Added new window around map position (-3, -0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0644042 Jy
! Component: 100  -  total flux cleaned = 0.106221 Jy
! Total flux subtracted in 100 components = 0.106221 Jy
! Clean residual min=-0.046301 max=0.034871 Jy/beam
! Clean residual mean=-0.000342 rms=0.009293 Jy/beam
! Combined flux in latest and established models = 1.61691 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 46 components and 1.61691 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.373818Jy  sigma=0.001782
! Fit after  self-cal, rms=0.373095Jy  sigma=0.001778
! 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.506 mas, bmaj=4.804 mas, bpa=4.963 degrees
! Estimated noise=1195.61 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.0324152 Jy
! Component: 100  -  total flux cleaned = 0.0506826 Jy
! Component: 150  -  total flux cleaned = 0.0617671 Jy
! Component: 200  -  total flux cleaned = 0.0656977 Jy
! Total flux subtracted in 200 components = 0.0656977 Jy
! Clean residual min=-0.055229 max=0.027996 Jy/beam
! Clean residual mean=-0.001018 rms=0.011559 Jy/beam
! Combined flux in latest and established models = 1.6826 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 61 components and 1.6826 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.370723Jy  sigma=0.001757
! Fit after  self-cal, rms=0.370627Jy  sigma=0.001756
! 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:
!   FD        0.99     GC        1.00*    HN        1.09     KP        0.96     
!   LA        0.98     MK        1.00*    NL        0.97     NY        1.02     
!   ON        1.00*    OV        0.94     PT        0.95     SC        1.02     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        0.92     
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  A total of 171 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.02     GC        1.01     HN        1.05     KP        0.88     
!   LA        1.02     MK        1.00     NL        1.08     NY        1.04     
!   ON        0.99     OV        0.60     PT        1.04     SC        1.00*    
!   TS        1.07     KK        1.00*    WZ        1.07     WF        1.00*    
! 
!  A total of 87 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        1.04     GC        1.76     HN        0.84     KP        1.00*    
!   LA        1.02     MK        1.00*    NL        1.00*    NY        1.01     
!   ON        1.01     OV        1.00*    PT        1.06     SC        0.95     
!   TS        1.00*    KK        1.00*    WZ        0.98     WF        1.09     
! 
!  A total of 18 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    NY        1.11     
!   ON        1.00     OV        1.00*    PT        1.00*    SC        1.00*    
!   TS        0.93     KK        1.00*    WZ        1.07     WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.99     GC        1.00*    HN        1.04     KP        0.99     
!   LA        0.97     MK        1.00*    NL        1.04     NY        1.01     
!   ON        1.00*    OV        0.91     PT        0.94     SC        1.08     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.02     
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  A total of 171 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.02     GC        0.96     HN        1.12     KP        1.04     
!   LA        1.03     MK        1.06     NL        1.13     NY        1.06     
!   ON        1.02     OV        0.78     PT        1.03     SC        1.00*    
!   TS        1.03     KK        1.00*    WZ        1.09     WF        1.00*    
! 
!  A total of 87 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        1.01     GC        1.81     HN        0.91     KP        1.00*    
!   LA        1.03     MK        1.00*    NL        1.00*    NY        1.04     
!   ON        0.99     OV        1.00*    PT        1.04     SC        0.97     
!   TS        1.00*    KK        1.00*    WZ        0.96     WF        1.00     
! 
!  A total of 18 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    NY        1.10     
!   ON        0.95     OV        1.00*    PT        1.00*    SC        1.00*    
!   TS        0.90     KK        1.00*    WZ        1.10     WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.97     GC        1.00*    HN        1.08     KP        0.97     
!   LA        0.93     MK        1.00*    NL        0.97     NY        0.99     
!   ON        1.00*    OV        0.94     PT        0.98     SC        1.08     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        1.04     
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  A total of 171 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        0.99     GC        1.02     HN        1.11     KP        1.05     
!   LA        1.00     MK        1.03     NL        1.06     NY        0.99     
!   ON        1.06     OV        0.76     PT        1.07     SC        1.00*    
!   TS        1.01     KK        1.00*    WZ        1.05     WF        1.00*    
! 
!  A total of 87 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        1.02     GC        1.74     HN        0.92     KP        1.00*    
!   LA        0.98     MK        1.00*    NL        1.00*    NY        0.99     
!   ON        1.05     OV        1.00*    PT        1.06     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        0.98     WF        1.00     
! 
!  A total of 18 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    NY        1.00     
!   ON        1.04     OV        1.00*    PT        1.00*    SC        1.00*    
!   TS        0.95     KK        1.00*    WZ        1.10     WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.95     GC        1.00*    HN        1.09     KP        0.98     
!   LA        0.97     MK        1.00*    NL        0.98     NY        0.96     
!   ON        1.00*    OV        0.97     PT        0.92     SC        0.98     
!   TS        1.00*    KK        1.00*    WZ        1.00*    WF        0.99     
! 
!  A total of 105 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
!  A total of 171 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.00     GC        1.04     HN        1.07     KP        1.05     
!   LA        1.05     MK        0.98     NL        1.07     NY        1.00     
!   ON        0.99     OV        0.71     PT        1.02     SC        1.00*    
!   TS        1.02     KK        1.00*    WZ        1.09     WF        1.00*    
! 
!  A total of 87 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        1.01     GC        1.66     HN        0.83     KP        1.00*    
!   LA        1.02     MK        1.00*    NL        1.00*    NY        1.01     
!   ON        1.02     OV        1.00*    PT        1.01     SC        0.93     
!   TS        1.00*    KK        1.00*    WZ        1.02     WF        1.01     
! 
!  A total of 18 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   FD        1.00*    GC        1.00*    HN        1.00*    KP        1.00*    
!   LA        1.00*    MK        1.00*    NL        1.00*    NY        1.05     
!   ON        1.03     OV        1.00*    PT        1.00*    SC        1.00*    
!   TS        0.93     KK        1.00*    WZ        1.08     WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.00*    GC        0.00*    HN        0.00*    KP        0.00*    
!   LA        0.00*    MK        0.00*    NL        0.00*    NY        0.00*    
!   ON        0.00*    OV        0.00*    PT        0.00*    SC        0.00*    
!   TS        0.00*    KK        0.00*    WZ        0.00*    WF        0.00*    
! 
! 
! Fit before self-cal, rms=0.370627Jy  sigma=0.001756
! Fit after  self-cal, rms=0.302547Jy  sigma=0.001341
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.513 mas, bmaj=4.712 mas, bpa=5.614 degrees
! Estimated noise=1224.3 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.00608557 Jy
! Component: 100  -  total flux cleaned = -0.00693372 Jy
! Component: 150  -  total flux cleaned = -0.00717927 Jy
! Component: 200  -  total flux cleaned = -0.00737128 Jy
! Total flux subtracted in 200 components = -0.00737128 Jy
! Clean residual min=-0.008407 max=0.008920 Jy/beam
! Clean residual mean=-0.000027 rms=0.002144 Jy/beam
! Combined flux in latest and established models = 1.67523 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 68 components and 1.67523 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.301896Jy  sigma=0.001338
! Fit after  self-cal, rms=0.302532Jy  sigma=0.001337
! 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.302532Jy  sigma=0.001337
! Fit after  self-cal, rms=0.302281Jy  sigma=0.001335
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.521 mas, bmaj=4.711 mas, bpa=5.596 degrees
! Estimated noise=1226.78 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00221435 Jy
! Component: 100  -  total flux cleaned = -0.00322683 Jy
! Component: 150  -  total flux cleaned = -0.00339654 Jy
! Component: 200  -  total flux cleaned = -0.00355344 Jy
! Total flux subtracted in 200 components = -0.00355344 Jy
! Clean residual min=-0.008137 max=0.009377 Jy/beam
! Clean residual mean=-0.000055 rms=0.002000 Jy/beam
! Combined flux in latest and established models = 1.67168 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 72 components and 1.67168 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302030Jy  sigma=0.001333
! Fit after  self-cal, rms=0.302044Jy  sigma=0.001333
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 (-20, -16).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00625862 Jy
! Component: 100  -  total flux cleaned = 0.00701692 Jy
! Component: 150  -  total flux cleaned = 0.00686321 Jy
! Component: 200  -  total flux cleaned = 0.00672028 Jy
! Total flux subtracted in 200 components = 0.00672028 Jy
! Clean residual min=-0.008390 max=0.007307 Jy/beam
! Clean residual mean=-0.000159 rms=0.001879 Jy/beam
! Combined flux in latest and established models = 1.6784 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 81 components and 1.6784 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.301795Jy  sigma=0.001331
! Fit after  self-cal, rms=0.301798Jy  sigma=0.001331
! 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.301798Jy  sigma=0.001331
! Fit after  self-cal, rms=0.302340Jy  sigma=0.001330
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.528 mas, bmaj=4.71 mas, bpa=5.6 degrees
! Estimated noise=1229.6 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000431774 Jy
! Component: 100  -  total flux cleaned = -0.00043754 Jy
! Component: 150  -  total flux cleaned = -0.00044078 Jy
! Component: 200  -  total flux cleaned = -0.000441109 Jy
! Total flux subtracted in 200 components = -0.000441109 Jy
! Clean residual min=-0.007342 max=0.006583 Jy/beam
! Clean residual mean=-0.000127 rms=0.001785 Jy/beam
! Combined flux in latest and established models = 1.67796 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 84 components and 1.67796 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302152Jy  sigma=0.001329
! Fit after  self-cal, rms=0.302164Jy  sigma=0.001329
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.000167642 Jy
! Component: 100  -  total flux cleaned = 0.000166594 Jy
! Component: 150  -  total flux cleaned = 0.000286706 Jy
! Component: 200  -  total flux cleaned = 0.000399198 Jy
! Total flux subtracted in 200 components = 0.000399198 Jy
! Clean residual min=-0.007321 max=0.006404 Jy/beam
! Clean residual mean=-0.000133 rms=0.001756 Jy/beam
! Combined flux in latest and established models = 1.67836 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 86 components and 1.67836 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302074Jy  sigma=0.001328
! Fit after  self-cal, rms=0.302075Jy  sigma=0.001328
! 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.302075Jy  sigma=0.001328
! Fit after  self-cal, rms=0.302622Jy  sigma=0.001328
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=9.237 mas, bmaj=10.06 mas, bpa=-34.15 degrees
! Estimated noise=1658.68 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00136507 Jy
! Component: 100  -  total flux cleaned = 0.00153671 Jy
! Component: 150  -  total flux cleaned = 0.00153732 Jy
! Component: 200  -  total flux cleaned = 0.00153854 Jy
! Total flux subtracted in 200 components = 0.00153854 Jy
! Clean residual min=-0.008792 max=0.006653 Jy/beam
! Clean residual mean=-0.000397 rms=0.002326 Jy/beam
! Combined flux in latest and established models = 1.6799 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 99 components and 1.6799 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302634Jy  sigma=0.001328
! Fit after  self-cal, rms=0.302614Jy  sigma=0.001328
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.000284798 Jy
! Component: 100  -  total flux cleaned = 0.000280715 Jy
! Component: 150  -  total flux cleaned = 0.000234684 Jy
! Component: 200  -  total flux cleaned = 0.000235421 Jy
! Total flux subtracted in 200 components = 0.000235421 Jy
! Clean residual min=-0.008748 max=0.006483 Jy/beam
! Clean residual mean=-0.000413 rms=0.002317 Jy/beam
! Combined flux in latest and established models = 1.68013 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 104 components and 1.68013 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.302617Jy  sigma=0.001328
! Fit after  self-cal, rms=0.302612Jy  sigma=0.001328
! 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.533 mas, bmaj=4.709 mas, bpa=5.576 degrees
! Estimated noise=1232.16 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.533 x 4.709 at 5.576 degrees (North through East)
! Clean map  min=-0.0068927  max=1.2806 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.302612Jy  sigma=0.001328
! Fit after  self-cal, rms=0.274977Jy  sigma=0.001107
! Inverting map and beam 
! Estimated beam: bmin=2.533 mas, bmaj=4.712 mas, bpa=5.566 degrees
! Estimated noise=1229.7 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00327695 Jy
! Component: 100  -  total flux cleaned = -0.00391728 Jy
! Component: 150  -  total flux cleaned = -0.00436787 Jy
! Component: 200  -  total flux cleaned = -0.00457492 Jy
! Total flux subtracted in 200 components = -0.00457492 Jy
! Clean residual min=-0.006219 max=0.005371 Jy/beam
! Clean residual mean=-0.000111 rms=0.001413 Jy/beam
! Combined flux in latest and established models = 1.67556 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 116 components and 1.67556 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.274841Jy  sigma=0.001106
! Fit after  self-cal, rms=0.274839Jy  sigma=0.001106
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000206746 Jy
! Component: 100  -  total flux cleaned = -0.000398377 Jy
! Component: 150  -  total flux cleaned = -0.000487248 Jy
! Component: 200  -  total flux cleaned = -0.000660292 Jy
! Total flux subtracted in 200 components = -0.000660292 Jy
! Clean residual min=-0.006199 max=0.005112 Jy/beam
! Clean residual mean=-0.000098 rms=0.001394 Jy/beam
! Combined flux in latest and established models = 1.6749 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 122 components and 1.6749 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.274779Jy  sigma=0.001106
! Fit after  self-cal, rms=0.274772Jy  sigma=0.001106
! 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.274772Jy  sigma=0.001106
! Fit after  self-cal, rms=0.274758Jy  sigma=0.001106
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.123 mas, bmaj=3.953 mas, bpa=3.437 degrees
! Estimated noise=1625.21 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.966128 Jy
! Component: 100  -  total flux cleaned = 1.28347 Jy
! Component: 150  -  total flux cleaned = 1.42456 Jy
! Component: 200  -  total flux cleaned = 1.49383 Jy
! Total flux subtracted in 200 components = 1.49383 Jy
! Clean residual min=-0.013586 max=0.036241 Jy/beam
! Clean residual mean=0.000155 rms=0.004856 Jy/beam
! Combined flux in latest and established models = 1.49383 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 21 model components to the UV plane model.
! The established model now contains 21 components and 1.49383 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.536 mas, bmaj=4.715 mas, bpa=5.552 degrees
! Estimated noise=1229.96 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.0679207 Jy
! Component: 100  -  total flux cleaned = 0.105597 Jy
! Component: 150  -  total flux cleaned = 0.127786 Jy
! Component: 200  -  total flux cleaned = 0.141526 Jy
! Total flux subtracted in 200 components = 0.141526 Jy
! Clean residual min=-0.005228 max=0.009942 Jy/beam
! Clean residual mean=0.000506 rms=0.001877 Jy/beam
! Combined flux in latest and established models = 1.63536 Jy
! Adding 53 model components to the UV plane model.
! The established model now contains 65 components and 1.63536 Jy
! Inverting map 
! Added new window around map position (-7, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0108664 Jy
! Component: 100  -  total flux cleaned = 0.0185045 Jy
! Component: 150  -  total flux cleaned = 0.0243399 Jy
! Component: 200  -  total flux cleaned = 0.027337 Jy
! Total flux subtracted in 200 components = 0.027337 Jy
! Clean residual min=-0.005684 max=0.005315 Jy/beam
! Clean residual mean=0.000045 rms=0.001387 Jy/beam
! Combined flux in latest and established models = 1.66269 Jy
! Adding 27 model components to the UV plane model.
! The established model now contains 85 components and 1.66269 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=9.249 mas, bmaj=10.08 mas, bpa=-33.86 degrees
! Estimated noise=1651.81 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00598404 Jy
! Component: 100  -  total flux cleaned = 0.00919322 Jy
! Component: 150  -  total flux cleaned = 0.0112257 Jy
! Component: 200  -  total flux cleaned = 0.0118509 Jy
! Total flux subtracted in 200 components = 0.0118509 Jy
! Clean residual min=-0.006944 max=0.005295 Jy/beam
! Clean residual mean=-0.000401 rms=0.001603 Jy/beam
! Combined flux in latest and established models = 1.67454 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.000394791 Jy
! Component: 100  -  total flux cleaned = 0.000507802 Jy
! Component: 150  -  total flux cleaned = 0.000577912 Jy
! Component: 200  -  total flux cleaned = 0.00061144 Jy
! Total flux subtracted in 200 components = 0.00061144 Jy
! Clean residual min=-0.006885 max=0.005275 Jy/beam
! Clean residual mean=-0.000430 rms=0.001590 Jy/beam
! Combined flux in latest and established models = 1.67516 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 116 components and 1.67516 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.536 mas, bmaj=4.715 mas, bpa=5.552 degrees
! Estimated noise=1229.96 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00120312 Jy
! Component: 100  -  total flux cleaned = -0.00179165 Jy
! Component: 150  -  total flux cleaned = -0.00189093 Jy
! Component: 200  -  total flux cleaned = -0.00198012 Jy
! Total flux subtracted in 200 components = -0.00198012 Jy
! Clean residual min=-0.005808 max=0.004217 Jy/beam
! Clean residual mean=-0.000133 rms=0.001279 Jy/beam
! Combined flux in latest and established models = 1.67318 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 125 components and 1.67318 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.274514Jy  sigma=0.001104
! Fit after  self-cal, rms=0.274484Jy  sigma=0.001104
wmodel J0854+2006_S_2003_09_17_pus_map.mod
! Writing 125 model components to file: J0854+2006_S_2003_09_17_pus_map.mod
wobs J0854+2006_S_2003_09_17_pus_uvs.fits
! Writing UV FITS file: J0854+2006_S_2003_09_17_pus_uvs.fits
wwins J0854+2006_S_2003_09_17_pus_map.win
! wwins: Wrote 4 windows to J0854+2006_S_2003_09_17_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.00246115 Jy
! Component: 100  -  total flux cleaned = -0.00443825 Jy
! Component: 150  -  total flux cleaned = -0.0056779 Jy
! Component: 200  -  total flux cleaned = -0.00634867 Jy
! Component: 250  -  total flux cleaned = -0.00670988 Jy
! Component: 300  -  total flux cleaned = -0.00692022 Jy
! Component: 350  -  total flux cleaned = -0.00726318 Jy
! Component: 400  -  total flux cleaned = -0.00753174 Jy
! Component: 450  -  total flux cleaned = -0.00779601 Jy
! Component: 500  -  total flux cleaned = -0.00818609 Jy
! Component: 550  -  total flux cleaned = -0.00844187 Jy
! Component: 600  -  total flux cleaned = -0.00863153 Jy
! Component: 650  -  total flux cleaned = -0.00881894 Jy
! Component: 700  -  total flux cleaned = -0.00918834 Jy
! Component: 750  -  total flux cleaned = -0.00943148 Jy
! Component: 800  -  total flux cleaned = -0.00973162 Jy
! Component: 850  -  total flux cleaned = -0.0100874 Jy
! Component: 900  -  total flux cleaned = -0.0103221 Jy
! Component: 950  -  total flux cleaned = -0.0106697 Jy
! Component: 1000  -  total flux cleaned = -0.0109561 Jy
! Component: 1050  -  total flux cleaned = -0.0111257 Jy
! Component: 1100  -  total flux cleaned = -0.0112944 Jy
! Component: 1150  -  total flux cleaned = -0.0115171 Jy
! Component: 1200  -  total flux cleaned = -0.0117922 Jy
! Component: 1250  -  total flux cleaned = -0.0119557 Jy
! Component: 1300  -  total flux cleaned = -0.0122258 Jy
! Component: 1350  -  total flux cleaned = -0.0121725 Jy
! Component: 1400  -  total flux cleaned = -0.0125973 Jy
! Component: 1450  -  total flux cleaned = -0.0125969 Jy
! Component: 1500  -  total flux cleaned = -0.0128058 Jy
! Component: 1550  -  total flux cleaned = -0.0129614 Jy
! Component: 1600  -  total flux cleaned = -0.0130637 Jy
! Component: 1650  -  total flux cleaned = -0.0132168 Jy
! Component: 1700  -  total flux cleaned = -0.0133685 Jy
! Component: 1750  -  total flux cleaned = -0.0134691 Jy
! Component: 1800  -  total flux cleaned = -0.0137673 Jy
! Component: 1850  -  total flux cleaned = -0.0138164 Jy
! Component: 1900  -  total flux cleaned = -0.0139628 Jy
! Component: 1950  -  total flux cleaned = -0.0140601 Jy
! Component: 2000  -  total flux cleaned = -0.0143007 Jy
! Total flux subtracted in 2048 components = -0.0143484 Jy
! Clean residual min=-0.002397 max=0.002699 Jy/beam
! Clean residual mean=-0.000027 rms=0.000918 Jy/beam
! Combined flux in latest and established models = 1.65883 Jy
keep
! Adding 135 model components to the UV plane model.
! The established model now contains 260 components and 1.65883 Jy
wmap "J0854+2006_S_2003_09_17_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.536 x 4.715 at 5.552 degrees (North through East)
! Clean map  min=-0.0046481  max=1.2844 Jy/beam
! Writing clean map to FITS file: J0854+2006_S_2003_09_17_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.28441 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000916088 
device "J0854+2006_S_2003_09_17_pus\_map.eps/VPS"
! Attempting to open device: 'J0854+2006_S_2003_09_17_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.213972 0.213972 0.427943 0.855886 1.71177 3.42354 6.84709 13.6942 27.3884 54.7767
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0027 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.284 
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.536 x 4.715 at 5.552 degrees (North through East)
! Clean map  min=-0.0046481  max=1.2844 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0854+2006_S_2003_09_17_pus\_map.gif/vgif"
! Attempting to open device: 'J0854+2006_S_2003_09_17_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0854+2006_S_2003_09_17_pus_uvs.log closed on Mon May 21 21:17:58 2007