! Started logfile: J0505+0459_S_2001_07_05_pus_uvs.log on Fri Aug 10 00:18:16 2007
obs J0505+0459_S_2001_07_05_pus_uva.fits
! Reading UV FITS file: J0505+0459_S_2001_07_05_pus_uva.fits
! AN table 1: 129 integrations on 171 of 171 possible baselines.
! AN table 2: 69 integrations on 171 of 171 possible baselines.
! AN table 3: 24 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.12257 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0505+0459
! 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.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 1774 lines of history.
! 
! Reading 18612 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 1735 telescope corrections were flagged in sub-array 1.
!  A total of 837 telescope corrections were flagged in sub-array 2.
!  A total of 396 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 1735 telescope corrections were flagged in sub-array 1.
!  A total of 837 telescope corrections were flagged in sub-array 2.
!  A total of 396 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 1735 telescope corrections were flagged in sub-array 1.
!  A total of 837 telescope corrections were flagged in sub-array 2.
!  A total of 396 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 1735 telescope corrections were flagged in sub-array 1.
!  A total of 837 telescope corrections were flagged in sub-array 2.
!  A total of 396 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.048299Jy  sigma=0.008251
! Fit after  self-cal, rms=0.548391Jy  sigma=0.004506
! 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=1.99 mas, bmaj=5.838 mas, bpa=-0.8423 degrees
! Estimated noise=1370.75 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.385558 Jy
! Component: 100  -  total flux cleaned = 0.541101 Jy
! Total flux subtracted in 100 components = 0.541101 Jy
! Clean residual min=-0.016621 max=0.070246 Jy/beam
! Clean residual mean=0.000429 rms=0.006584 Jy/beam
! Combined flux in latest and established models = 0.541101 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 0.541101 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.239401Jy  sigma=0.001682
! Fit after  self-cal, rms=0.238610Jy  sigma=0.001678
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.077591 Jy
! Component: 100  -  total flux cleaned = 0.116308 Jy
! Total flux subtracted in 100 components = 0.116308 Jy
! Clean residual min=-0.012797 max=0.025263 Jy/beam
! Clean residual mean=0.000213 rms=0.004023 Jy/beam
! Combined flux in latest and established models = 0.657409 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 12 components and 0.657409 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.205892Jy  sigma=0.001405
! Fit after  self-cal, rms=0.205731Jy  sigma=0.001405
! Inverting map 
! Added new window around map position (-3, -2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0258131 Jy
! Component: 100  -  total flux cleaned = 0.0417873 Jy
! Total flux subtracted in 100 components = 0.0417873 Jy
! Clean residual min=-0.012765 max=0.018198 Jy/beam
! Clean residual mean=0.000136 rms=0.003597 Jy/beam
! Combined flux in latest and established models = 0.699196 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 32 components and 0.699196 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.200991Jy  sigma=0.001362
! Fit after  self-cal, rms=0.200784Jy  sigma=0.001360
! 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.3 mas, bmaj=5.772 mas, bpa=-2.659 degrees
! Estimated noise=672.15 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.5, -7.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0231274 Jy
! Component: 100  -  total flux cleaned = 0.0384504 Jy
! Component: 150  -  total flux cleaned = 0.0494396 Jy
! Component: 200  -  total flux cleaned = 0.0578821 Jy
! Total flux subtracted in 200 components = 0.0578821 Jy
! Clean residual min=-0.010460 max=0.010867 Jy/beam
! Clean residual mean=-0.000010 rms=0.003062 Jy/beam
! Combined flux in latest and established models = 0.757078 Jy
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 69 components and 0.757078 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.197599Jy  sigma=0.001331
! Fit after  self-cal, rms=0.197489Jy  sigma=0.001330
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.02     FD        0.93     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.06     KK        1.00*    KP        0.90     
!   LA        0.99     MC        1.00*    MK        1.02     NL        0.91     
!   NY        1.00*    OV        0.97     PT        0.85     SC        1.08     
!   TS        1.09     WF        1.08     WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.85     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.94     KK        1.09     KP        1.07     
!   LA        0.96     MC        1.00*    MK        1.04     NL        1.01     
!   NY        1.00*    OV        0.99     PT        0.94     SC        0.88     
!   TS        1.00*    WF        1.02     WZ        1.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   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*    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*    
! 
! 
! Correcting IF 2.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.92     GC        0.96     GG        1.00*    
!   HH        1.00*    HN        1.07     KK        1.00*    KP        0.66     
!   LA        0.90     MC        1.00*    MK        1.00     NL        0.89     
!   NY        1.00*    OV        0.99     PT        0.89     SC        1.16     
!   TS        1.07     WF        1.07     WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        0.93     GC        0.97     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.09     KP        1.20     
!   LA        0.92     MC        1.00*    MK        1.07     NL        0.98     
!   NY        1.00*    OV        1.01     PT        0.95     SC        0.95     
!   TS        1.00*    WF        1.04     WZ        1.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   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*    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*    
! 
! 
! Correcting IF 3.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        0.87     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.17     KK        1.00*    KP        0.93     
!   LA        0.92     MC        1.00*    MK        1.03     NL        0.97     
!   NY        1.00*    OV        1.05     PT        1.02     SC        1.15     
!   TS        1.10     WF        1.14     WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.11     FD        1.01     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        1.11     KP        1.19     
!   LA        0.99     MC        1.00*    MK        1.12     NL        1.13     
!   NY        1.00*    OV        1.26     PT        1.00     SC        0.94     
!   TS        1.00*    WF        1.06     WZ        1.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   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*    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*    
! 
! 
! Correcting IF 4.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.94     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00*    KP        0.94     
!   LA        0.94     MC        1.00*    MK        1.02     NL        0.93     
!   NY        1.00*    OV        0.96     PT        1.27     SC        1.10     
!   TS        1.09     WF        1.06     WZ        1.00*    
! 
!  A total of 57 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.95     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        0.92     KK        1.12     KP        1.08     
!   LA        0.96     MC        1.00*    MK        1.09     NL        1.02     
!   NY        1.00*    OV        1.00     PT        1.02     SC        0.95     
!   TS        1.00*    WF        1.07     WZ        1.00*    
! 
!  A total of 60 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   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*    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*    
! 
! 
! Fit before self-cal, rms=0.197489Jy  sigma=0.001330
! Fit after  self-cal, rms=0.190828Jy  sigma=0.001220
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.365 mas, bmaj=5.822 mas, bpa=-2.177 degrees
! Estimated noise=686.179 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.00152324 Jy
! Component: 100  -  total flux cleaned = -0.000796334 Jy
! Component: 150  -  total flux cleaned = -0.000801559 Jy
! Component: 200  -  total flux cleaned = -0.000803628 Jy
! Total flux subtracted in 200 components = -0.000803628 Jy
! Clean residual min=-0.004461 max=0.003539 Jy/beam
! Clean residual mean=0.000034 rms=0.001035 Jy/beam
! Combined flux in latest and established models = 0.756275 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 84 components and 0.756275 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.190648Jy  sigma=0.001218
! Fit after  self-cal, rms=0.190804Jy  sigma=0.001218
! 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.190804Jy  sigma=0.001218
! Fit after  self-cal, rms=0.191090Jy  sigma=0.001218
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.367 mas, bmaj=5.827 mas, bpa=-2.122 degrees
! Estimated noise=687.781 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000134036 Jy
! Component: 100  -  total flux cleaned = 0.000223809 Jy
! Component: 150  -  total flux cleaned = 0.000142007 Jy
! Component: 200  -  total flux cleaned = 1.00239e-05 Jy
! Total flux subtracted in 200 components = 1.00239e-05 Jy
! Clean residual min=-0.004000 max=0.003445 Jy/beam
! Clean residual mean=0.000033 rms=0.000979 Jy/beam
! Combined flux in latest and established models = 0.756285 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 96 components and 0.756285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191017Jy  sigma=0.001217
! Fit after  self-cal, rms=0.191012Jy  sigma=0.001217
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.000599759 Jy
! Component: 100  -  total flux cleaned = 0.000543963 Jy
! Component: 150  -  total flux cleaned = 0.000384475 Jy
! Component: 200  -  total flux cleaned = 0.00023991 Jy
! Total flux subtracted in 200 components = 0.00023991 Jy
! Clean residual min=-0.003938 max=0.003313 Jy/beam
! Clean residual mean=0.000033 rms=0.000963 Jy/beam
! Combined flux in latest and established models = 0.756525 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 105 components and 0.756525 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.190978Jy  sigma=0.001217
! Fit after  self-cal, rms=0.190977Jy  sigma=0.001217
! 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.190977Jy  sigma=0.001217
! Fit after  self-cal, rms=0.191517Jy  sigma=0.001217
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.368 mas, bmaj=5.828 mas, bpa=-2.098 degrees
! Estimated noise=689.311 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00167904 Jy
! Component: 100  -  total flux cleaned = 0.00213442 Jy
! Component: 150  -  total flux cleaned = 0.00239086 Jy
! Component: 200  -  total flux cleaned = 0.00246662 Jy
! Total flux subtracted in 200 components = 0.00246662 Jy
! Clean residual min=-0.004180 max=0.003134 Jy/beam
! Clean residual mean=0.000039 rms=0.000981 Jy/beam
! Combined flux in latest and established models = 0.758991 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 118 components and 0.758991 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191488Jy  sigma=0.001216
! Fit after  self-cal, rms=0.191488Jy  sigma=0.001216
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.000469891 Jy
! Component: 100  -  total flux cleaned = 0.000437159 Jy
! Component: 150  -  total flux cleaned = 0.000438227 Jy
! Component: 200  -  total flux cleaned = 0.000407832 Jy
! Total flux subtracted in 200 components = 0.000407832 Jy
! Clean residual min=-0.004151 max=0.003121 Jy/beam
! Clean residual mean=0.000036 rms=0.000976 Jy/beam
! Combined flux in latest and established models = 0.759399 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 123 components and 0.759399 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191476Jy  sigma=0.001216
! Fit after  self-cal, rms=0.191476Jy  sigma=0.001216
! 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.191476Jy  sigma=0.001216
! Fit after  self-cal, rms=0.191846Jy  sigma=0.001216
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=6.662 mas, bmaj=9.537 mas, bpa=12.68 degrees
! Estimated noise=1029.36 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000580039 Jy
! Component: 100  -  total flux cleaned = 0.00116635 Jy
! Component: 150  -  total flux cleaned = 0.0015594 Jy
! Component: 200  -  total flux cleaned = 0.00166665 Jy
! Total flux subtracted in 200 components = 0.00166665 Jy
! Clean residual min=-0.005548 max=0.004788 Jy/beam
! Clean residual mean=0.000115 rms=0.001746 Jy/beam
! Combined flux in latest and established models = 0.761066 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 139 components and 0.761066 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191852Jy  sigma=0.001216
! Fit after  self-cal, rms=0.191848Jy  sigma=0.001216
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.000199718 Jy
! Component: 100  -  total flux cleaned = 0.000231605 Jy
! Component: 150  -  total flux cleaned = 0.000260353 Jy
! Component: 200  -  total flux cleaned = 0.000314452 Jy
! Total flux subtracted in 200 components = 0.000314452 Jy
! Clean residual min=-0.005515 max=0.004628 Jy/beam
! Clean residual mean=0.000108 rms=0.001722 Jy/beam
! Combined flux in latest and established models = 0.76138 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 144 components and 0.76138 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191858Jy  sigma=0.001216
! Fit after  self-cal, rms=0.191855Jy  sigma=0.001216
! 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.368 mas, bmaj=5.829 mas, bpa=-2.077 degrees
! Estimated noise=691.004 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.368 x 5.829 at -2.077 degrees (North through East)
! Clean map  min=-0.0037342  max=0.51576 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.191855Jy  sigma=0.001216
! Fit after  self-cal, rms=0.188563Jy  sigma=0.001117
! Inverting map and beam 
! Estimated beam: bmin=2.367 mas, bmaj=5.827 mas, bpa=-2.134 degrees
! Estimated noise=689.236 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000639983 Jy
! Component: 100  -  total flux cleaned = -0.00112612 Jy
! Component: 150  -  total flux cleaned = -0.00156215 Jy
! Component: 200  -  total flux cleaned = -0.00177188 Jy
! Total flux subtracted in 200 components = -0.00177188 Jy
! Clean residual min=-0.002530 max=0.002615 Jy/beam
! Clean residual mean=0.000059 rms=0.000712 Jy/beam
! Combined flux in latest and established models = 0.759608 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 160 components and 0.759608 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.188522Jy  sigma=0.001117
! Fit after  self-cal, rms=0.188526Jy  sigma=0.001117
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000196196 Jy
! Component: 100  -  total flux cleaned = -0.000262577 Jy
! Component: 150  -  total flux cleaned = -0.000325418 Jy
! Component: 200  -  total flux cleaned = -0.000410408 Jy
! Total flux subtracted in 200 components = -0.000410409 Jy
! Clean residual min=-0.002571 max=0.002519 Jy/beam
! Clean residual mean=0.000062 rms=0.000706 Jy/beam
! Combined flux in latest and established models = 0.759198 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 165 components and 0.759198 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.188513Jy  sigma=0.001117
! Fit after  self-cal, rms=0.188513Jy  sigma=0.001117
! 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.188513Jy  sigma=0.001117
! Fit after  self-cal, rms=0.189495Jy  sigma=0.001117
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.017 mas, bmaj=5.848 mas, bpa=-0.4254 degrees
! Estimated noise=1423.3 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.393861 Jy
! Component: 100  -  total flux cleaned = 0.549748 Jy
! Component: 150  -  total flux cleaned = 0.625097 Jy
! Component: 200  -  total flux cleaned = 0.663721 Jy
! Total flux subtracted in 200 components = 0.663721 Jy
! Clean residual min=-0.008459 max=0.019489 Jy/beam
! Clean residual mean=0.000155 rms=0.002734 Jy/beam
! Combined flux in latest and established models = 0.663721 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 12 model components to the UV plane model.
! The established model now contains 12 components and 0.663721 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.367 mas, bmaj=5.831 mas, bpa=-2.124 degrees
! Estimated noise=689.327 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.029953 Jy
! Component: 100  -  total flux cleaned = 0.0482594 Jy
! Component: 150  -  total flux cleaned = 0.0603907 Jy
! Component: 200  -  total flux cleaned = 0.0687827 Jy
! Total flux subtracted in 200 components = 0.0687827 Jy
! Clean residual min=-0.003585 max=0.004667 Jy/beam
! Clean residual mean=0.000234 rms=0.001034 Jy/beam
! Combined flux in latest and established models = 0.732504 Jy
! Adding 42 model components to the UV plane model.
! The established model now contains 48 components and 0.732504 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00603692 Jy
! Component: 100  -  total flux cleaned = 0.0106063 Jy
! Component: 150  -  total flux cleaned = 0.0141586 Jy
! Component: 200  -  total flux cleaned = 0.0169736 Jy
! Total flux subtracted in 200 components = 0.0169736 Jy
! Clean residual min=-0.002749 max=0.002796 Jy/beam
! Clean residual mean=0.000113 rms=0.000750 Jy/beam
! Combined flux in latest and established models = 0.749477 Jy
! Adding 43 model components to the UV plane model.
! The established model now contains 84 components and 0.749478 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=6.662 mas, bmaj=9.55 mas, bpa=12.52 degrees
! Estimated noise=1026.26 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00451485 Jy
! Component: 100  -  total flux cleaned = 0.00695351 Jy
! Component: 150  -  total flux cleaned = 0.00812705 Jy
! Component: 200  -  total flux cleaned = 0.00848296 Jy
! Total flux subtracted in 200 components = 0.00848296 Jy
! Clean residual min=-0.003702 max=0.003638 Jy/beam
! Clean residual mean=0.000175 rms=0.001054 Jy/beam
! Combined flux in latest and established models = 0.757961 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.000144668 Jy
! Component: 100  -  total flux cleaned = 0.000267933 Jy
! Component: 150  -  total flux cleaned = 0.00034831 Jy
! Component: 200  -  total flux cleaned = 0.000442459 Jy
! Total flux subtracted in 200 components = 0.000442459 Jy
! Clean residual min=-0.003747 max=0.003531 Jy/beam
! Clean residual mean=0.000164 rms=0.001045 Jy/beam
! Combined flux in latest and established models = 0.758403 Jy
! Adding 51 model components to the UV plane model.
! The established model now contains 126 components and 0.758403 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.367 mas, bmaj=5.831 mas, bpa=-2.124 degrees
! Estimated noise=689.327 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000229875 Jy
! Component: 100  -  total flux cleaned = 7.73246e-05 Jy
! Component: 150  -  total flux cleaned = -0.000103856 Jy
! Component: 200  -  total flux cleaned = -0.000305014 Jy
! Total flux subtracted in 200 components = -0.000305014 Jy
! Clean residual min=-0.002572 max=0.002588 Jy/beam
! Clean residual mean=0.000051 rms=0.000694 Jy/beam
! Combined flux in latest and established models = 0.758098 Jy
selfcal
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 147 components and 0.758098 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.189491Jy  sigma=0.001117
! Fit after  self-cal, rms=0.189485Jy  sigma=0.001117
wmodel J0505+0459_S_2001_07_05_pus_map.mod
! Writing 147 model components to file: J0505+0459_S_2001_07_05_pus_map.mod
wobs J0505+0459_S_2001_07_05_pus_uvs.fits
! Writing UV FITS file: J0505+0459_S_2001_07_05_pus_uvs.fits
wwins J0505+0459_S_2001_07_05_pus_map.win
! wwins: Wrote 3 windows to J0505+0459_S_2001_07_05_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.000108945 Jy
! Component: 100  -  total flux cleaned = -0.000333029 Jy
! Component: 150  -  total flux cleaned = -0.000585661 Jy
! Component: 200  -  total flux cleaned = -0.000626422 Jy
! Component: 250  -  total flux cleaned = -0.000586432 Jy
! Component: 300  -  total flux cleaned = -0.000508994 Jy
! Component: 350  -  total flux cleaned = -0.000434064 Jy
! Component: 400  -  total flux cleaned = -0.000397641 Jy
! Component: 450  -  total flux cleaned = -0.000325275 Jy
! Component: 500  -  total flux cleaned = -0.000183217 Jy
! Component: 550  -  total flux cleaned = -8.70872e-06 Jy
! Component: 600  -  total flux cleaned = 0.000128501 Jy
! Component: 650  -  total flux cleaned = 0.000331677 Jy
! Component: 700  -  total flux cleaned = 0.000498227 Jy
! Component: 750  -  total flux cleaned = 0.00066236 Jy
! Component: 800  -  total flux cleaned = 0.000888673 Jy
! Component: 850  -  total flux cleaned = 0.00111163 Jy
! Component: 900  -  total flux cleaned = 0.00133127 Jy
! Component: 950  -  total flux cleaned = 0.00154807 Jy
! Component: 1000  -  total flux cleaned = 0.00173168 Jy
! Component: 1050  -  total flux cleaned = 0.00188275 Jy
! Component: 1100  -  total flux cleaned = 0.00209195 Jy
! Component: 1150  -  total flux cleaned = 0.00229846 Jy
! Component: 1200  -  total flux cleaned = 0.00241524 Jy
! Component: 1250  -  total flux cleaned = 0.00261734 Jy
! Component: 1300  -  total flux cleaned = 0.00270324 Jy
! Component: 1350  -  total flux cleaned = 0.00281689 Jy
! Component: 1400  -  total flux cleaned = 0.00298535 Jy
! Component: 1450  -  total flux cleaned = 0.00312395 Jy
! Component: 1500  -  total flux cleaned = 0.00323401 Jy
! Component: 1550  -  total flux cleaned = 0.00339785 Jy
! Component: 1600  -  total flux cleaned = 0.00347896 Jy
! Component: 1650  -  total flux cleaned = 0.00363969 Jy
! Component: 1700  -  total flux cleaned = 0.00374599 Jy
! Component: 1750  -  total flux cleaned = 0.00382523 Jy
! Component: 1800  -  total flux cleaned = 0.00400791 Jy
! Component: 1850  -  total flux cleaned = 0.00403385 Jy
! Component: 1900  -  total flux cleaned = 0.00411132 Jy
! Component: 1950  -  total flux cleaned = 0.00434069 Jy
! Component: 2000  -  total flux cleaned = 0.00434073 Jy
! Total flux subtracted in 2048 components = 0.00456671 Jy
! Clean residual min=-0.001484 max=0.001500 Jy/beam
! Clean residual mean=0.000030 rms=0.000492 Jy/beam
! Combined flux in latest and established models = 0.762665 Jy
keep
! Adding 152 model components to the UV plane model.
! The established model now contains 299 components and 0.762664 Jy
wmap "J0505+0459_S_2001_07_05_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.367 x 5.831 at -2.124 degrees (North through East)
! Clean map  min=-0.002215  max=0.51508 Jy/beam
! Writing clean map to FITS file: J0505+0459_S_2001_07_05_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.515081 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000491722 
device "J0505+0459_S_2001_07_05_pus\_map.eps/VPS"
! Attempting to open device: 'J0505+0459_S_2001_07_05_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.286395 0.286395 0.572791 1.14558 2.29116 4.58233 9.16465 18.3293 36.6586 73.3172
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.515 
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.367 x 5.831 at -2.124 degrees (North through East)
! Clean map  min=-0.002215  max=0.51508 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0505+0459_S_2001_07_05_pus\_map.gif/vgif"
! Attempting to open device: 'J0505+0459_S_2001_07_05_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0505+0459_S_2001_07_05_pus_uvs.log closed on Fri Aug 10 00:19:47 2007