! Started logfile: J1640+3946_S_2003_09_17_pus_uvs.log on Mon May 21 22:21:36 2007
obs J1640+3946_S_2003_09_17_pus_uva.fits
! Reading UV FITS file: J1640+3946_S_2003_09_17_pus_uva.fits
! AN table 1: 59 integrations on 120 of 120 possible baselines.
! AN table 2: 17 integrations on 120 of 120 possible baselines.
! AN table 3: 35 integrations on 120 of 120 possible baselines.
! AN table 4: 79 integrations on 120 of 120 possible baselines.
! AN table 5: 13 integrations on 120 of 120 possible baselines.
! AN table 6: 367 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.0909795 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1640+3946
! 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 24892 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 659 telescope corrections were flagged in sub-array 1.
!  A total of 272 telescope corrections were flagged in sub-array 2.
!  A total of 441 telescope corrections were flagged in sub-array 3.
!  A total of 660 telescope corrections were flagged in sub-array 4.
!  A total of 208 telescope corrections were flagged in sub-array 5.
!  A total of 4585 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 2.
!  A total of 659 telescope corrections were flagged in sub-array 1.
!  A total of 272 telescope corrections were flagged in sub-array 2.
!  A total of 441 telescope corrections were flagged in sub-array 3.
!  A total of 660 telescope corrections were flagged in sub-array 4.
!  A total of 208 telescope corrections were flagged in sub-array 5.
!  A total of 4585 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 3.
!  A total of 659 telescope corrections were flagged in sub-array 1.
!  A total of 272 telescope corrections were flagged in sub-array 2.
!  A total of 441 telescope corrections were flagged in sub-array 3.
!  A total of 660 telescope corrections were flagged in sub-array 4.
!  A total of 208 telescope corrections were flagged in sub-array 5.
!  A total of 4582 telescope corrections were flagged in sub-array 6.
! 
! Correcting IF 4.
!  A total of 659 telescope corrections were flagged in sub-array 1.
!  A total of 272 telescope corrections were flagged in sub-array 2.
!  A total of 441 telescope corrections were flagged in sub-array 3.
!  A total of 660 telescope corrections were flagged in sub-array 4.
!  A total of 208 telescope corrections were flagged in sub-array 5.
!  A total of 4582 telescope corrections were flagged in sub-array 6.
! 
! Fit before self-cal, rms=1.016692Jy  sigma=0.006528
! Fit after  self-cal, rms=0.353548Jy  sigma=0.001632
! 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.117 mas, bmaj=3.749 mas, bpa=2.969 degrees
! Estimated noise=1223.19 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.758784 Jy
! Component: 100  -  total flux cleaned = 0.930015 Jy
! Total flux subtracted in 100 components = 0.930015 Jy
! Clean residual min=-0.021067 max=0.062214 Jy/beam
! Clean residual mean=-0.000011 rms=0.006587 Jy/beam
! Combined flux in latest and established models = 0.930015 Jy
! Performing phase self-cal
! Adding 5 model components to the UV plane model.
! The established model now contains 5 components and 0.930014 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.358427Jy  sigma=0.001746
! Fit after  self-cal, rms=0.358165Jy  sigma=0.001746
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0701972 Jy
! Component: 100  -  total flux cleaned = 0.115254 Jy
! Total flux subtracted in 100 components = 0.115254 Jy
! Clean residual min=-0.014644 max=0.024335 Jy/beam
! Clean residual mean=-0.000014 rms=0.004623 Jy/beam
! Combined flux in latest and established models = 1.04527 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 26 components and 1.04527 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340426Jy  sigma=0.001497
! Fit after  self-cal, rms=0.340051Jy  sigma=0.001497
! 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.505 mas, bmaj=4.795 mas, bpa=9.468 degrees
! Estimated noise=703.476 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.048131 Jy
! Component: 100  -  total flux cleaned = 0.0752638 Jy
! Component: 150  -  total flux cleaned = 0.0911357 Jy
! Component: 200  -  total flux cleaned = 0.100545 Jy
! Total flux subtracted in 200 components = 0.100545 Jy
! Clean residual min=-0.015826 max=0.014219 Jy/beam
! Clean residual mean=-0.000479 rms=0.004117 Jy/beam
! Combined flux in latest and established models = 1.14581 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 54 components and 1.14581 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.335317Jy  sigma=0.001407
! Fit after  self-cal, rms=0.335039Jy  sigma=0.001407
! 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:
!   FD        0.96     GC        0.99     HN        0.91     KP        1.21     
!   LA        0.97     MK        1.10     NL        0.98     NY        0.96     
!   ON        1.00*    OV        0.94     PT        0.92     SC        1.04     
!   TS        1.00*    KK        0.95     WZ        1.00*    WF        1.05     
! 
!  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 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.00*    GC        0.99     HN        1.00*    KP        1.01     
!   LA        1.02     MK        1.09     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        0.94     PT        1.03     SC        1.00*    
!   TS        0.93     KK        1.13     WZ        1.00*    WF        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.99     GC        1.00*    HN        1.01     KP        0.95     
!   LA        0.93     MK        1.04     NL        0.96     NY        1.00*    
!   ON        1.00*    OV        1.06     PT        0.97     SC        0.95     
!   TS        1.00*    KK        1.03     WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   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 213 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   FD        1.00     GC        1.14     HN        1.00     KP        0.99     
!   LA        0.99     MK        0.98     NL        1.01     NY        1.06     
!   ON        1.02     OV        0.79     PT        0.95     SC        1.00*    
!   TS        0.98     KK        0.94     WZ        1.00     WF        0.97     
! 
! 
! Correcting IF 2.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.96     GC        0.96     HN        0.93     KP        1.05     
!   LA        0.96     MK        1.02     NL        1.03     NY        0.97     
!   ON        1.00*    OV        0.91     PT        0.89     SC        1.11     
!   TS        1.00*    KK        0.98     WZ        1.00*    WF        1.01     
! 
!  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 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.00*    GC        1.06     HN        1.00*    KP        1.06     
!   LA        0.99     MK        1.17     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.15     PT        0.96     SC        1.00*    
!   TS        0.95     KK        1.08     WZ        1.00*    WF        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.99     GC        1.00*    HN        1.04     KP        1.03     
!   LA        0.94     MK        1.11     NL        1.00     NY        1.00*    
!   ON        1.00*    OV        0.85     PT        0.95     SC        1.01     
!   TS        1.00*    KK        1.05     WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   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 213 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.99     GC        1.06     HN        1.05     KP        1.04     
!   LA        1.01     MK        1.07     NL        1.04     NY        1.09     
!   ON        0.98     OV        1.00     PT        0.97     SC        1.00*    
!   TS        0.99     KK        0.98     WZ        0.98     WF        1.04     
! 
! 
! Correcting IF 3.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.95     GC        1.00     HN        0.95     KP        1.00     
!   LA        0.94     MK        0.97     NL        0.96     NY        0.99     
!   ON        1.00*    OV        0.94     PT        0.95     SC        1.11     
!   TS        1.00*    KK        1.02     WZ        1.00*    WF        1.03     
! 
!  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 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.00*    GC        1.04     HN        1.00*    KP        1.05     
!   LA        0.98     MK        1.12     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.43     PT        1.02     SC        1.00*    
!   TS        0.98     KK        1.11     WZ        1.00*    WF        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.96     GC        1.00*    HN        1.02     KP        1.01     
!   LA        0.92     MK        1.06     NL        0.96     NY        1.00*    
!   ON        1.00*    OV        1.06     PT        0.98     SC        1.01     
!   TS        1.00*    KK        1.04     WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   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 216 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.97     GC        1.15     HN        1.10     KP        1.03     
!   LA        0.96     MK        1.03     NL        1.01     NY        1.03     
!   ON        1.00     OV        1.66     PT        1.01     SC        1.00*    
!   TS        1.03     KK        0.99     WZ        0.97     WF        1.03     
! 
! 
! Correcting IF 4.
!  A total of 24 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.95     GC        1.02     HN        1.32     KP        1.05     
!   LA        0.99     MK        0.94     NL        0.99     NY        0.98     
!   ON        1.00*    OV        0.89     PT        0.90     SC        1.07     
!   TS        1.00*    KK        1.08     WZ        1.00*    WF        0.98     
! 
!  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 15 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.00*    GC        1.00     HN        1.00*    KP        1.04     
!   LA        1.01     MK        1.10     NL        1.00*    NY        1.00*    
!   ON        1.00*    OV        1.50     PT        1.00     SC        1.00*    
!   TS        0.98     KK        1.14     WZ        1.00*    WF        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   FD        0.97     GC        1.00*    HN        1.08     KP        1.03     
!   LA        0.97     MK        1.00     NL        0.97     NY        1.00*    
!   ON        1.00*    OV        1.05     PT        0.96     SC        0.96     
!   TS        1.00*    KK        1.10     WZ        1.00*    WF        1.00*    
! 
!  Telescope amplitude corrections in sub-array 5:
!   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 216 telescope corrections were flagged in sub-array 6.
!  Telescope amplitude corrections in sub-array 6:
!   FD        0.99     GC        1.14     HN        1.07     KP        1.03     
!   LA        0.98     MK        0.96     NL        1.03     NY        1.06     
!   ON        0.98     OV        1.70     PT        0.94     SC        1.00*    
!   TS        1.01     KK        1.05     WZ        0.99     WF        1.09     
! 
! 
! Fit before self-cal, rms=0.335039Jy  sigma=0.001407
! Fit after  self-cal, rms=0.329146Jy  sigma=0.001279
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.555 mas, bmaj=4.862 mas, bpa=9.639 degrees
! Estimated noise=713.14 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.00512231 Jy
! Component: 100  -  total flux cleaned = -0.00618679 Jy
! Component: 150  -  total flux cleaned = -0.00722539 Jy
! Component: 200  -  total flux cleaned = -0.00794522 Jy
! Total flux subtracted in 200 components = -0.00794522 Jy
! Clean residual min=-0.005799 max=0.006367 Jy/beam
! Clean residual mean=-0.000013 rms=0.001486 Jy/beam
! Combined flux in latest and established models = 1.13787 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 54 components and 1.13787 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.328799Jy  sigma=0.001277
! Fit after  self-cal, rms=0.329117Jy  sigma=0.001276
! 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.329117Jy  sigma=0.001276
! Fit after  self-cal, rms=0.330970Jy  sigma=0.001273
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.561 mas, bmaj=4.876 mas, bpa=9.64 degrees
! Estimated noise=713.998 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00294739 Jy
! Component: 100  -  total flux cleaned = -0.00401442 Jy
! Component: 150  -  total flux cleaned = -0.00503706 Jy
! Component: 200  -  total flux cleaned = -0.00575357 Jy
! Total flux subtracted in 200 components = -0.00575357 Jy
! Clean residual min=-0.005464 max=0.006221 Jy/beam
! Clean residual mean=-0.000103 rms=0.001337 Jy/beam
! Combined flux in latest and established models = 1.13211 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 54 components and 1.13212 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330746Jy  sigma=0.001272
! Fit after  self-cal, rms=0.330644Jy  sigma=0.001272
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 (-6, -4.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00504278 Jy
! Component: 100  -  total flux cleaned = 0.00560337 Jy
! Component: 150  -  total flux cleaned = 0.00559623 Jy
! Component: 200  -  total flux cleaned = 0.00559276 Jy
! Total flux subtracted in 200 components = 0.00559276 Jy
! Clean residual min=-0.005407 max=0.004692 Jy/beam
! Clean residual mean=-0.000113 rms=0.001260 Jy/beam
! Combined flux in latest and established models = 1.13771 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 69 components and 1.13771 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.330499Jy  sigma=0.001271
! Fit after  self-cal, rms=0.330480Jy  sigma=0.001271
! 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.330480Jy  sigma=0.001271
! Fit after  self-cal, rms=0.325313Jy  sigma=0.001261
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.562 mas, bmaj=4.88 mas, bpa=9.616 degrees
! Estimated noise=713.916 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00134518 Jy
! Component: 100  -  total flux cleaned = -0.00124135 Jy
! Component: 150  -  total flux cleaned = -0.00105963 Jy
! Component: 200  -  total flux cleaned = -0.000892477 Jy
! Total flux subtracted in 200 components = -0.000892477 Jy
! Clean residual min=-0.004536 max=0.003990 Jy/beam
! Clean residual mean=-0.000019 rms=0.001118 Jy/beam
! Combined flux in latest and established models = 1.13682 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 79 components and 1.13682 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325249Jy  sigma=0.001261
! Fit after  self-cal, rms=0.325337Jy  sigma=0.001261
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.000313928 Jy
! Component: 100  -  total flux cleaned = 0.000526728 Jy
! Component: 150  -  total flux cleaned = 0.000718693 Jy
! Component: 200  -  total flux cleaned = 0.000778411 Jy
! Total flux subtracted in 200 components = 0.000778411 Jy
! Clean residual min=-0.004366 max=0.003829 Jy/beam
! Clean residual mean=-0.000023 rms=0.001110 Jy/beam
! Combined flux in latest and established models = 1.13759 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 86 components and 1.13759 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325307Jy  sigma=0.001260
! Fit after  self-cal, rms=0.325312Jy  sigma=0.001260
! 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.325312Jy  sigma=0.001260
! Fit after  self-cal, rms=0.325765Jy  sigma=0.001260
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.774 mas, bmaj=10.82 mas, bpa=7.661 degrees
! Estimated noise=1002.6 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000224683 Jy
! Component: 100  -  total flux cleaned = 8.74386e-05 Jy
! Component: 150  -  total flux cleaned = 0.000262316 Jy
! Component: 200  -  total flux cleaned = 0.000330319 Jy
! Total flux subtracted in 200 components = 0.000330319 Jy
! Clean residual min=-0.004481 max=0.004877 Jy/beam
! Clean residual mean=-0.000054 rms=0.001694 Jy/beam
! Combined flux in latest and established models = 1.13792 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 93 components and 1.13792 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325754Jy  sigma=0.001260
! Fit after  self-cal, rms=0.325741Jy  sigma=0.001260
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.000186946 Jy
! Component: 100  -  total flux cleaned = 0.000317558 Jy
! Component: 150  -  total flux cleaned = 0.000394202 Jy
! Component: 200  -  total flux cleaned = 0.000416408 Jy
! Total flux subtracted in 200 components = 0.000416408 Jy
! Clean residual min=-0.004504 max=0.004900 Jy/beam
! Clean residual mean=-0.000057 rms=0.001694 Jy/beam
! Combined flux in latest and established models = 1.13834 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 100 components and 1.13834 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.325735Jy  sigma=0.001260
! Fit after  self-cal, rms=0.325734Jy  sigma=0.001260
! 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.565 mas, bmaj=4.885 mas, bpa=9.619 degrees
! Estimated noise=714.255 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.565 x 4.885 at 9.619 degrees (North through East)
! Clean map  min=-0.0039353  max=1.0057 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.325734Jy  sigma=0.001260
! Fit after  self-cal, rms=0.495498Jy  sigma=0.001076
! Inverting map and beam 
! Estimated beam: bmin=2.566 mas, bmaj=4.887 mas, bpa=9.629 degrees
! Estimated noise=712.728 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00208777 Jy
! Component: 100  -  total flux cleaned = -0.0023818 Jy
! Component: 150  -  total flux cleaned = -0.00238364 Jy
! Component: 200  -  total flux cleaned = -0.0023826 Jy
! Total flux subtracted in 200 components = -0.0023826 Jy
! Clean residual min=-0.003114 max=0.003556 Jy/beam
! Clean residual mean=-0.000027 rms=0.000886 Jy/beam
! Combined flux in latest and established models = 1.13596 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 108 components and 1.13596 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.495481Jy  sigma=0.001075
! Fit after  self-cal, rms=0.495506Jy  sigma=0.001075
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 6.93351e-05 Jy
! Component: 100  -  total flux cleaned = 0.000202731 Jy
! Component: 150  -  total flux cleaned = 0.000203592 Jy
! Component: 200  -  total flux cleaned = 0.000202664 Jy
! Total flux subtracted in 200 components = 0.000202664 Jy
! Clean residual min=-0.003021 max=0.003561 Jy/beam
! Clean residual mean=-0.000027 rms=0.000882 Jy/beam
! Combined flux in latest and established models = 1.13616 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 110 components and 1.13616 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.495501Jy  sigma=0.001075
! Fit after  self-cal, rms=0.495509Jy  sigma=0.001075
! 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.495509Jy  sigma=0.001075
! Fit after  self-cal, rms=0.498410Jy  sigma=0.001075
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.136 mas, bmaj=3.77 mas, bpa=2.823 degrees
! Estimated noise=1270.67 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.766021 Jy
! Component: 100  -  total flux cleaned = 0.936322 Jy
! Component: 150  -  total flux cleaned = 0.99992 Jy
! Component: 200  -  total flux cleaned = 1.03818 Jy
! Total flux subtracted in 200 components = 1.03818 Jy
! Clean residual min=-0.007541 max=0.020161 Jy/beam
! Clean residual mean=0.000007 rms=0.002325 Jy/beam
! Combined flux in latest and established models = 1.03818 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 18 model components to the UV plane model.
! The established model now contains 18 components and 1.03818 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.57 mas, bmaj=4.889 mas, bpa=9.62 degrees
! Estimated noise=712.6 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.0356872 Jy
! Component: 100  -  total flux cleaned = 0.0549383 Jy
! Component: 150  -  total flux cleaned = 0.0667473 Jy
! Component: 200  -  total flux cleaned = 0.0747214 Jy
! Total flux subtracted in 200 components = 0.0747214 Jy
! Clean residual min=-0.003534 max=0.004757 Jy/beam
! Clean residual mean=0.000018 rms=0.001192 Jy/beam
! Combined flux in latest and established models = 1.1129 Jy
! Adding 52 model components to the UV plane model.
! The established model now contains 59 components and 1.1129 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.783 mas, bmaj=10.82 mas, bpa=7.619 degrees
! Estimated noise=997.166 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.010582 Jy
! Component: 100  -  total flux cleaned = 0.015372 Jy
! Component: 150  -  total flux cleaned = 0.0178838 Jy
! Component: 200  -  total flux cleaned = 0.0192392 Jy
! Total flux subtracted in 200 components = 0.0192392 Jy
! Clean residual min=-0.003757 max=0.003676 Jy/beam
! Clean residual mean=-0.000030 rms=0.001395 Jy/beam
! Combined flux in latest and established models = 1.13214 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.000734668 Jy
! Component: 100  -  total flux cleaned = 0.000890976 Jy
! Component: 150  -  total flux cleaned = 0.00096021 Jy
! Component: 200  -  total flux cleaned = 0.00100931 Jy
! Total flux subtracted in 200 components = 0.00100931 Jy
! Clean residual min=-0.003734 max=0.003732 Jy/beam
! Clean residual mean=-0.000035 rms=0.001373 Jy/beam
! Combined flux in latest and established models = 1.13315 Jy
! Adding 69 model components to the UV plane model.
! The established model now contains 114 components and 1.13315 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.57 mas, bmaj=4.889 mas, bpa=9.62 degrees
! Estimated noise=712.6 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000130736 Jy
! Component: 100  -  total flux cleaned = -0.00024636 Jy
! Component: 150  -  total flux cleaned = -0.000343058 Jy
! Component: 200  -  total flux cleaned = -0.000427676 Jy
! Total flux subtracted in 200 components = -0.000427676 Jy
! Clean residual min=-0.002933 max=0.003708 Jy/beam
! Clean residual mean=-0.000012 rms=0.000861 Jy/beam
! Combined flux in latest and established models = 1.13272 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 122 components and 1.13272 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.498407Jy  sigma=0.001075
! Fit after  self-cal, rms=0.498454Jy  sigma=0.001075
wmodel J1640+3946_S_2003_09_17_pus_map.mod
! Writing 122 model components to file: J1640+3946_S_2003_09_17_pus_map.mod
wobs J1640+3946_S_2003_09_17_pus_uvs.fits
! Writing UV FITS file: J1640+3946_S_2003_09_17_pus_uvs.fits
wwins J1640+3946_S_2003_09_17_pus_map.win
! wwins: Wrote 2 windows to J1640+3946_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.000855689 Jy
! Component: 100  -  total flux cleaned = 0.000694494 Jy
! Component: 150  -  total flux cleaned = 0.000540747 Jy
! Component: 200  -  total flux cleaned = 0.000689076 Jy
! Component: 250  -  total flux cleaned = 0.000592682 Jy
! Component: 300  -  total flux cleaned = 0.000593948 Jy
! Component: 350  -  total flux cleaned = 0.00054837 Jy
! Component: 400  -  total flux cleaned = 0.000459018 Jy
! Component: 450  -  total flux cleaned = 0.000415023 Jy
! Component: 500  -  total flux cleaned = 0.000371671 Jy
! Component: 550  -  total flux cleaned = 0.000245013 Jy
! Component: 600  -  total flux cleaned = 0.000203555 Jy
! Component: 650  -  total flux cleaned = 0.000121875 Jy
! Component: 700  -  total flux cleaned = 0.00012191 Jy
! Component: 750  -  total flux cleaned = -0.000116154 Jy
! Component: 800  -  total flux cleaned = -7.73596e-05 Jy
! Component: 850  -  total flux cleaned = -0.000308742 Jy
! Component: 900  -  total flux cleaned = -0.000346064 Jy
! Component: 950  -  total flux cleaned = -0.000383725 Jy
! Component: 1000  -  total flux cleaned = -0.000532314 Jy
! Component: 1050  -  total flux cleaned = -0.000495625 Jy
! Component: 1100  -  total flux cleaned = -0.000641688 Jy
! Component: 1150  -  total flux cleaned = -0.000677751 Jy
! Component: 1200  -  total flux cleaned = -0.000820191 Jy
! Component: 1250  -  total flux cleaned = -0.000785607 Jy
! Component: 1300  -  total flux cleaned = -0.000890303 Jy
! Component: 1350  -  total flux cleaned = -0.000924945 Jy
! Component: 1400  -  total flux cleaned = -0.00102735 Jy
! Component: 1450  -  total flux cleaned = -0.00102719 Jy
! Component: 1500  -  total flux cleaned = -0.00122803 Jy
! Component: 1550  -  total flux cleaned = -0.00119482 Jy
! Component: 1600  -  total flux cleaned = -0.00139224 Jy
! Component: 1650  -  total flux cleaned = -0.0013921 Jy
! Component: 1700  -  total flux cleaned = -0.00152194 Jy
! Component: 1750  -  total flux cleaned = -0.00158635 Jy
! Component: 1800  -  total flux cleaned = -0.00184111 Jy
! Component: 1850  -  total flux cleaned = -0.00187281 Jy
! Component: 1900  -  total flux cleaned = -0.00206115 Jy
! Component: 1950  -  total flux cleaned = -0.00215455 Jy
! Component: 2000  -  total flux cleaned = -0.00224724 Jy
! Total flux subtracted in 2048 components = -0.00233965 Jy
! Clean residual min=-0.001813 max=0.001758 Jy/beam
! Clean residual mean=-0.000002 rms=0.000596 Jy/beam
! Combined flux in latest and established models = 1.13038 Jy
keep
! Adding 159 model components to the UV plane model.
! The established model now contains 281 components and 1.13038 Jy
wmap "J1640+3946_S_2003_09_17_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.57 x 4.889 at 9.62 degrees (North through East)
! Clean map  min=-0.002528  max=1.0063 Jy/beam
! Writing clean map to FITS file: J1640+3946_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.00627 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000596833 
device "J1640+3946_S_2003_09_17_pus\_map.eps/VPS"
! Attempting to open device: 'J1640+3946_S_2003_09_17_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.177934 0.177934 0.355867 0.711734 1.42347 2.84694 5.69387 11.3877 22.7755 45.551 91.102
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.006 
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.57 x 4.889 at 9.62 degrees (North through East)
! Clean map  min=-0.002528  max=1.0063 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1640+3946_S_2003_09_17_pus\_map.gif/vgif"
! Attempting to open device: 'J1640+3946_S_2003_09_17_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1640+3946_S_2003_09_17_pus_uvs.log closed on Mon May 21 22:23:47 2007