! Started logfile: J0442-0017_S_2003_09_17_pus_uvs.log on Tue May 22 12:09:44 2007
obs J0442-0017_S_2003_09_17_pus_uva.fits
! Reading UV FITS file: J0442-0017_S_2003_09_17_pus_uva.fits
! AN table 1: 185 integrations on 120 of 120 possible baselines.
! AN table 2: 319 integrations on 120 of 120 possible baselines.
! AN table 3: 73 integrations on 120 of 120 possible baselines.
! AN table 4: 66 integrations on 120 of 120 possible baselines.
! Apparent sampling: 0.124754 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0442-0017
! 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 38504 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 2172 telescope corrections were flagged in sub-array 1.
!  A total of 3687 telescope corrections were flagged in sub-array 2.
!  A total of 870 telescope corrections were flagged in sub-array 3.
!  A total of 990 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 2172 telescope corrections were flagged in sub-array 1.
!  A total of 3687 telescope corrections were flagged in sub-array 2.
!  A total of 870 telescope corrections were flagged in sub-array 3.
!  A total of 990 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 2172 telescope corrections were flagged in sub-array 1.
!  A total of 3687 telescope corrections were flagged in sub-array 2.
!  A total of 870 telescope corrections were flagged in sub-array 3.
!  A total of 990 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 2172 telescope corrections were flagged in sub-array 1.
!  A total of 3690 telescope corrections were flagged in sub-array 2.
!  A total of 870 telescope corrections were flagged in sub-array 3.
!  A total of 990 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.667562Jy  sigma=0.010649
! Fit after  self-cal, rms=1.162471Jy  sigma=0.007630
! 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.83 mas, bmaj=5.602 mas, bpa=-1.621 degrees
! Estimated noise=1124.72 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.4693 Jy
! Component: 100  -  total flux cleaned = 1.84175 Jy
! Total flux subtracted in 100 components = 1.84175 Jy
! Clean residual min=-0.045600 max=0.164889 Jy/beam
! Clean residual mean=0.000611 rms=0.015070 Jy/beam
! Combined flux in latest and established models = 1.84175 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 1.84175 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.558754Jy  sigma=0.003390
! Fit after  self-cal, rms=0.558638Jy  sigma=0.003390
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.18246 Jy
! Component: 100  -  total flux cleaned = 0.278027 Jy
! Total flux subtracted in 100 components = 0.278027 Jy
! Clean residual min=-0.039130 max=0.057274 Jy/beam
! Clean residual mean=0.000228 rms=0.010733 Jy/beam
! Combined flux in latest and established models = 2.11978 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 15 components and 2.11978 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.467226Jy  sigma=0.002660
! Fit after  self-cal, rms=0.467062Jy  sigma=0.002660
! 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.271 mas, bmaj=6.914 mas, bpa=-2.191 degrees
! Estimated noise=576.311 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.101087 Jy
! Component: 100  -  total flux cleaned = 0.147161 Jy
! Component: 150  -  total flux cleaned = 0.172347 Jy
! Component: 200  -  total flux cleaned = 0.186496 Jy
! Total flux subtracted in 200 components = 0.186496 Jy
! Clean residual min=-0.032944 max=0.038347 Jy/beam
! Clean residual mean=0.001592 rms=0.008341 Jy/beam
! Combined flux in latest and established models = 2.30627 Jy
! Performing phase self-cal
! Adding 31 model components to the UV plane model.
! The established model now contains 41 components and 2.30627 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.451051Jy  sigma=0.002486
! Fit after  self-cal, rms=0.450870Jy  sigma=0.002486
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 102 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.99     GC        0.95     HN        1.00*    KP        0.97     
!   LA        0.97     MK        0.99     NL        0.98     NY        1.00*    
!   ON        1.00*    OV        0.98     PT        1.01     SC        1.00*    
!   TS        0.97     KK        0.97     WZ        1.00*    WF        1.18     
! 
!  A total of 348 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        1.04     GC        0.98     HN        0.72     KP        0.95     
!   LA        0.96     MK        0.88     NL        1.00     NY        1.12     
!   ON        1.02     OV        1.02     PT        0.97     SC        0.99     
!   TS        1.05     KK        1.47     WZ        1.03     WF        1.06     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.14     GC        1.00*    HN        0.77     KP        1.07     
!   LA        1.08     MK        1.00*    NL        1.06     NY        1.09     
!   ON        1.01     OV        1.00*    PT        1.10     SC        0.95     
!   TS        1.00*    KK        1.00*    WZ        1.01     WF        1.01     
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   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 102 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        1.03     GC        0.89     HN        1.00*    KP        1.02     
!   LA        0.98     MK        1.09     NL        1.01     NY        1.00*    
!   ON        1.00*    OV        0.94     PT        0.97     SC        1.00*    
!   TS        0.96     KK        0.99     WZ        1.00*    WF        1.08     
! 
!  A total of 348 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        1.06     GC        0.93     HN        0.93     KP        1.02     
!   LA        0.96     MK        1.02     NL        1.03     NY        1.23     
!   ON        1.15     OV        0.95     PT        0.95     SC        1.04     
!   TS        1.05     KK        0.98     WZ        0.98     WF        1.04     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.14     GC        1.00*    HN        0.98     KP        1.20     
!   LA        1.09     MK        1.00*    NL        1.11     NY        1.14     
!   ON        0.97     OV        1.00*    PT        1.06     SC        0.99     
!   TS        1.00*    KK        1.00*    WZ        0.96     WF        1.00     
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   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 102 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        1.00     GC        0.98     HN        1.00*    KP        1.02     
!   LA        0.97     MK        1.05     NL        0.96     NY        1.00*    
!   ON        1.00*    OV        0.97     PT        1.02     SC        1.00*    
!   TS        1.00     KK        1.00     WZ        1.00*    WF        1.10     
! 
!  A total of 348 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        1.02     GC        1.01     HN        0.93     KP        1.01     
!   LA        0.94     MK        0.99     NL        0.98     NY        1.10     
!   ON        1.03     OV        0.96     PT        1.00     SC        1.08     
!   TS        1.10     KK        0.99     WZ        0.96     WF        1.05     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.10     GC        1.00*    HN        0.98     KP        1.21     
!   LA        1.04     MK        1.00*    NL        1.05     NY        1.09     
!   ON        1.01     OV        1.00*    PT        1.11     SC        1.01     
!   TS        1.00*    KK        1.00*    WZ        0.97     WF        1.03     
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   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 102 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   FD        0.98     GC        0.99     HN        1.00*    KP        1.03     
!   LA        1.00     MK        1.00     NL        0.97     NY        1.00*    
!   ON        1.00*    OV        0.99     PT        0.97     SC        1.00*    
!   TS        0.97     KK        1.08     WZ        1.00*    WF        1.10     
! 
!  A total of 348 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   FD        1.00     GC        1.02     HN        0.89     KP        1.02     
!   LA        0.98     MK        0.94     NL        1.01     NY        1.15     
!   ON        1.06     OV        0.98     PT        0.94     SC        1.04     
!   TS        1.07     KK        1.05     WZ        1.02     WF        1.13     
! 
!  A total of 9 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   FD        1.11     GC        1.00*    HN        0.47     KP        1.20     
!   LA        1.08     MK        1.00*    NL        1.07     NY        1.06     
!   ON        1.03     OV        1.00*    PT        1.05     SC        1.00     
!   TS        1.00*    KK        1.00*    WZ        0.99     WF        1.00     
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   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.450870Jy  sigma=0.002486
! Fit after  self-cal, rms=0.326095Jy  sigma=0.001819
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.33 mas, bmaj=7.069 mas, bpa=-3.098 degrees
! Estimated noise=581.182 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.0170651 Jy
! Component: 100  -  total flux cleaned = -0.0195763 Jy
! Component: 150  -  total flux cleaned = -0.0203743 Jy
! Component: 200  -  total flux cleaned = -0.0209873 Jy
! Total flux subtracted in 200 components = -0.0209873 Jy
! Clean residual min=-0.012449 max=0.009997 Jy/beam
! Clean residual mean=0.000246 rms=0.002893 Jy/beam
! Combined flux in latest and established models = 2.28529 Jy
! Performing phase self-cal
! Adding 9 model components to the UV plane model.
! The established model now contains 48 components and 2.28529 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.324857Jy  sigma=0.001813
! Fit after  self-cal, rms=0.325396Jy  sigma=0.001812
! 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.325396Jy  sigma=0.001812
! Fit after  self-cal, rms=0.318569Jy  sigma=0.001752
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.338 mas, bmaj=7.071 mas, bpa=-3.142 degrees
! Estimated noise=581.037 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00800838 Jy
! Component: 100  -  total flux cleaned = -0.00891234 Jy
! Component: 150  -  total flux cleaned = -0.00945633 Jy
! Component: 200  -  total flux cleaned = -0.00960398 Jy
! Total flux subtracted in 200 components = -0.00960398 Jy
! Clean residual min=-0.007162 max=0.007305 Jy/beam
! Clean residual mean=0.000161 rms=0.001665 Jy/beam
! Combined flux in latest and established models = 2.27568 Jy
selfcal
! Performing phase self-cal
! Adding 12 model components to the UV plane model.
! The established model now contains 55 components and 2.27568 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.318245Jy  sigma=0.001749
! Fit after  self-cal, rms=0.318296Jy  sigma=0.001749
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.5, 6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00135075 Jy
! Component: 100  -  total flux cleaned = 0.00315214 Jy
! Component: 150  -  total flux cleaned = 0.00435313 Jy
! Component: 200  -  total flux cleaned = 0.00464537 Jy
! Total flux subtracted in 200 components = 0.00464537 Jy
! Clean residual min=-0.006155 max=0.005758 Jy/beam
! Clean residual mean=0.000102 rms=0.001485 Jy/beam
! Combined flux in latest and established models = 2.28033 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 80 components and 2.28033 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.318051Jy  sigma=0.001747
! Fit after  self-cal, rms=0.318029Jy  sigma=0.001746
! 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.318029Jy  sigma=0.001746
! Fit after  self-cal, rms=0.317356Jy  sigma=0.001745
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.343 mas, bmaj=7.072 mas, bpa=-3.178 degrees
! Estimated noise=581.056 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00302256 Jy
! Component: 100  -  total flux cleaned = -0.00227672 Jy
! Component: 150  -  total flux cleaned = -0.00214539 Jy
! Component: 200  -  total flux cleaned = -0.00191058 Jy
! Total flux subtracted in 200 components = -0.00191058 Jy
! Clean residual min=-0.004867 max=0.005662 Jy/beam
! Clean residual mean=0.000047 rms=0.001380 Jy/beam
! Combined flux in latest and established models = 2.27842 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 96 components and 2.27842 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317199Jy  sigma=0.001744
! Fit after  self-cal, rms=0.317196Jy  sigma=0.001743
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.000436458 Jy
! Component: 100  -  total flux cleaned = 0.000642099 Jy
! Component: 150  -  total flux cleaned = 0.000737656 Jy
! Component: 200  -  total flux cleaned = 0.00090978 Jy
! Total flux subtracted in 200 components = 0.00090978 Jy
! Clean residual min=-0.004857 max=0.005703 Jy/beam
! Clean residual mean=0.000037 rms=0.001350 Jy/beam
! Combined flux in latest and established models = 2.27933 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 107 components and 2.27933 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317152Jy  sigma=0.001743
! Fit after  self-cal, rms=0.317152Jy  sigma=0.001743
! Inverting map 
! Added new window around map position (-15, 14.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00491246 Jy
! Component: 100  -  total flux cleaned = 0.00542942 Jy
! Component: 150  -  total flux cleaned = 0.005649 Jy
! Component: 200  -  total flux cleaned = 0.00603061 Jy
! Total flux subtracted in 200 components = 0.00603061 Jy
! Clean residual min=-0.004832 max=0.005267 Jy/beam
! Clean residual mean=-0.000046 rms=0.001245 Jy/beam
! Combined flux in latest and established models = 2.28536 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 128 components and 2.28536 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.317041Jy  sigma=0.001742
! Fit after  self-cal, rms=0.317036Jy  sigma=0.001742
! 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.317036Jy  sigma=0.001742
! Fit after  self-cal, rms=0.316649Jy  sigma=0.001742
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.103 mas, bmaj=12.78 mas, bpa=-8.806 degrees
! Estimated noise=814.031 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000620564 Jy
! Component: 100  -  total flux cleaned = -6.70451e-05 Jy
! Component: 150  -  total flux cleaned = 0.000434001 Jy
! Component: 200  -  total flux cleaned = 0.000670081 Jy
! Total flux subtracted in 200 components = 0.000670081 Jy
! Clean residual min=-0.004692 max=0.005775 Jy/beam
! Clean residual mean=-0.000259 rms=0.001569 Jy/beam
! Combined flux in latest and established models = 2.28603 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 147 components and 2.28603 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.316602Jy  sigma=0.001742
! Fit after  self-cal, rms=0.316602Jy  sigma=0.001742
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.000687947 Jy
! Component: 100  -  total flux cleaned = 0.000848601 Jy
! Component: 150  -  total flux cleaned = 0.000938488 Jy
! Component: 200  -  total flux cleaned = 0.000979044 Jy
! Total flux subtracted in 200 components = 0.000979044 Jy
! Clean residual min=-0.004821 max=0.005688 Jy/beam
! Clean residual mean=-0.000291 rms=0.001540 Jy/beam
! Combined flux in latest and established models = 2.28701 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 158 components and 2.28701 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.316597Jy  sigma=0.001742
! Fit after  self-cal, rms=0.316597Jy  sigma=0.001742
! 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.346 mas, bmaj=7.075 mas, bpa=-3.204 degrees
! Estimated noise=580.852 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.346 x 7.075 at -3.204 degrees (North through East)
! Clean map  min=-0.009002  max=2.0146 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.316597Jy  sigma=0.001742
! Fit after  self-cal, rms=0.258324Jy  sigma=0.001173
! Inverting map and beam 
! Estimated beam: bmin=2.344 mas, bmaj=7.081 mas, bpa=-3.207 degrees
! Estimated noise=580.578 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00428767 Jy
! Component: 100  -  total flux cleaned = -0.00579438 Jy
! Component: 150  -  total flux cleaned = -0.00597186 Jy
! Component: 200  -  total flux cleaned = -0.00605038 Jy
! Total flux subtracted in 200 components = -0.00605038 Jy
! Clean residual min=-0.003390 max=0.003661 Jy/beam
! Clean residual mean=-0.000051 rms=0.000953 Jy/beam
! Combined flux in latest and established models = 2.28096 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 176 components and 2.28096 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258230Jy  sigma=0.001172
! Fit after  self-cal, rms=0.258232Jy  sigma=0.001172
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000243118 Jy
! Component: 100  -  total flux cleaned = -0.000313393 Jy
! Component: 150  -  total flux cleaned = -0.000246194 Jy
! Component: 200  -  total flux cleaned = -0.000375006 Jy
! Total flux subtracted in 200 components = -0.000375006 Jy
! Clean residual min=-0.003277 max=0.003614 Jy/beam
! Clean residual mean=-0.000046 rms=0.000927 Jy/beam
! Combined flux in latest and established models = 2.28058 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 188 components and 2.28058 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258195Jy  sigma=0.001172
! Fit after  self-cal, rms=0.258195Jy  sigma=0.001172
! 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.258195Jy  sigma=0.001172
! Fit after  self-cal, rms=0.258286Jy  sigma=0.001172
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=1.838 mas, bmaj=5.84 mas, bpa=-2.648 degrees
! Estimated noise=1041.22 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 1.49831 Jy
! Component: 100  -  total flux cleaned = 1.86112 Jy
! Component: 150  -  total flux cleaned = 2.02855 Jy
! Component: 200  -  total flux cleaned = 2.11498 Jy
! Total flux subtracted in 200 components = 2.11498 Jy
! Clean residual min=-0.013872 max=0.040758 Jy/beam
! Clean residual mean=0.000258 rms=0.003872 Jy/beam
! Combined flux in latest and established models = 2.11498 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 9 model components to the UV plane model.
! The established model now contains 9 components and 2.11498 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.346 mas, bmaj=7.083 mas, bpa=-3.218 degrees
! Estimated noise=580.496 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.0732734 Jy
! Component: 100  -  total flux cleaned = 0.108684 Jy
! Component: 150  -  total flux cleaned = 0.127888 Jy
! Component: 200  -  total flux cleaned = 0.139609 Jy
! Total flux subtracted in 200 components = 0.139609 Jy
! Clean residual min=-0.005448 max=0.006727 Jy/beam
! Clean residual mean=0.000261 rms=0.001462 Jy/beam
! Combined flux in latest and established models = 2.25459 Jy
! Adding 49 model components to the UV plane model.
! The established model now contains 52 components and 2.25459 Jy
! Inverting map 
! Added new window around map position (2, -8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00712036 Jy
! Component: 100  -  total flux cleaned = 0.0100215 Jy
! Component: 150  -  total flux cleaned = 0.0122654 Jy
! Component: 200  -  total flux cleaned = 0.0140552 Jy
! Total flux subtracted in 200 components = 0.0140552 Jy
! Clean residual min=-0.004631 max=0.004179 Jy/beam
! Clean residual mean=0.000086 rms=0.001111 Jy/beam
! Combined flux in latest and established models = 2.26864 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 75 components and 2.26864 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=8.114 mas, bmaj=12.79 mas, bpa=-8.797 degrees
! Estimated noise=812.445 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00417179 Jy
! Component: 100  -  total flux cleaned = 0.00620176 Jy
! Component: 150  -  total flux cleaned = 0.00692831 Jy
! Component: 200  -  total flux cleaned = 0.00734145 Jy
! Total flux subtracted in 200 components = 0.00734145 Jy
! Clean residual min=-0.003430 max=0.005136 Jy/beam
! Clean residual mean=-0.000027 rms=0.001292 Jy/beam
! Combined flux in latest and established models = 2.27598 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.000122497 Jy
! Component: 100  -  total flux cleaned = 0.000177378 Jy
! Component: 150  -  total flux cleaned = 0.000229474 Jy
! Component: 200  -  total flux cleaned = 0.000277101 Jy
! Total flux subtracted in 200 components = 0.000277101 Jy
! Clean residual min=-0.003530 max=0.005163 Jy/beam
! Clean residual mean=-0.000037 rms=0.001244 Jy/beam
! Combined flux in latest and established models = 2.27626 Jy
! Adding 36 model components to the UV plane model.
! The established model now contains 107 components and 2.27626 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.346 mas, bmaj=7.083 mas, bpa=-3.218 degrees
! Estimated noise=580.496 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00119248 Jy
! Component: 100  -  total flux cleaned = -0.00170092 Jy
! Component: 150  -  total flux cleaned = -0.00192878 Jy
! Component: 200  -  total flux cleaned = -0.00203327 Jy
! Total flux subtracted in 200 components = -0.00203327 Jy
! Clean residual min=-0.003674 max=0.003812 Jy/beam
! Clean residual mean=0.000013 rms=0.000950 Jy/beam
! Combined flux in latest and established models = 2.27422 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 125 components and 2.27422 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.258387Jy  sigma=0.001172
! Fit after  self-cal, rms=0.258367Jy  sigma=0.001172
wmodel J0442-0017_S_2003_09_17_pus_map.mod
! Writing 125 model components to file: J0442-0017_S_2003_09_17_pus_map.mod
wobs J0442-0017_S_2003_09_17_pus_uvs.fits
! Writing UV FITS file: J0442-0017_S_2003_09_17_pus_uvs.fits
wwins J0442-0017_S_2003_09_17_pus_map.win
! wwins: Wrote 4 windows to J0442-0017_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.00104869 Jy
! Component: 100  -  total flux cleaned = 0.00136013 Jy
! Component: 150  -  total flux cleaned = 0.00171306 Jy
! Component: 200  -  total flux cleaned = 0.00188095 Jy
! Component: 250  -  total flux cleaned = 0.00198895 Jy
! Component: 300  -  total flux cleaned = 0.00209364 Jy
! Component: 350  -  total flux cleaned = 0.00229686 Jy
! Component: 400  -  total flux cleaned = 0.00254349 Jy
! Component: 450  -  total flux cleaned = 0.00288017 Jy
! Component: 500  -  total flux cleaned = 0.00311476 Jy
! Component: 550  -  total flux cleaned = 0.00329883 Jy
! Component: 600  -  total flux cleaned = 0.00352364 Jy
! Component: 650  -  total flux cleaned = 0.00361175 Jy
! Component: 700  -  total flux cleaned = 0.00382802 Jy
! Component: 750  -  total flux cleaned = 0.00395503 Jy
! Component: 800  -  total flux cleaned = 0.00407967 Jy
! Component: 850  -  total flux cleaned = 0.00407935 Jy
! Component: 900  -  total flux cleaned = 0.00407927 Jy
! Component: 950  -  total flux cleaned = 0.00403943 Jy
! Component: 1000  -  total flux cleaned = 0.00396168 Jy
! Component: 1050  -  total flux cleaned = 0.00400102 Jy
! Component: 1100  -  total flux cleaned = 0.00396244 Jy
! Component: 1150  -  total flux cleaned = 0.00384911 Jy
! Component: 1200  -  total flux cleaned = 0.00377501 Jy
! Component: 1250  -  total flux cleaned = 0.0036652 Jy
! Component: 1300  -  total flux cleaned = 0.00355718 Jy
! Component: 1350  -  total flux cleaned = 0.00362884 Jy
! Component: 1400  -  total flux cleaned = 0.00352256 Jy
! Component: 1450  -  total flux cleaned = 0.00345249 Jy
! Component: 1500  -  total flux cleaned = 0.00341767 Jy
! Component: 1550  -  total flux cleaned = 0.00331482 Jy
! Component: 1600  -  total flux cleaned = 0.00328117 Jy
! Component: 1650  -  total flux cleaned = 0.00331503 Jy
! Component: 1700  -  total flux cleaned = 0.00328165 Jy
! Component: 1750  -  total flux cleaned = 0.00328147 Jy
! Component: 1800  -  total flux cleaned = 0.00324867 Jy
! Component: 1850  -  total flux cleaned = 0.00311867 Jy
! Component: 1900  -  total flux cleaned = 0.00308708 Jy
! Component: 1950  -  total flux cleaned = 0.00302327 Jy
! Component: 2000  -  total flux cleaned = 0.00299139 Jy
! Total flux subtracted in 2048 components = 0.00289701 Jy
! Clean residual min=-0.001644 max=0.001692 Jy/beam
! Clean residual mean=-0.000042 rms=0.000614 Jy/beam
! Combined flux in latest and established models = 2.27712 Jy
keep
! Adding 137 model components to the UV plane model.
! The established model now contains 261 components and 2.27712 Jy
wmap "J0442-0017_S_2003_09_17_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.346 x 7.083 at -3.218 degrees (North through East)
! Clean map  min=-0.0059462  max=2.0154 Jy/beam
! Writing clean map to FITS file: J0442-0017_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 2.01543 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00061337 
device "J0442-0017_S_2003_09_17_pus\_map.eps/VPS"
! Attempting to open device: 'J0442-0017_S_2003_09_17_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.0913009 0.0913009 0.182602 0.365204 0.730407 1.46081 2.92163 5.84326 11.6865 23.373 46.7461 93.4921
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0018 
print "peak=",int(1000*peak_flux)/1000
! peak= 2.015 
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.346 x 7.083 at -3.218 degrees (North through East)
! Clean map  min=-0.0059462  max=2.0154 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0442-0017_S_2003_09_17_pus\_map.gif/vgif"
! Attempting to open device: 'J0442-0017_S_2003_09_17_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0442-0017_S_2003_09_17_pus_uvs.log closed on Tue May 22 12:12:12 2007