! Started logfile: J0121+0422_S_2000_12_04_pus_uvs.log on Wed Oct 17 16:52:15 2007
obs J0121+0422_S_2000_12_04_pus_uva.fits
! Reading UV FITS file: J0121+0422_S_2000_12_04_pus_uva.fits
! AN table 1: 85 integrations on 190 of 190 possible baselines.
! AN table 2: 340 integrations on 190 of 190 possible baselines.
! AN table 3: 48 integrations on 190 of 190 possible baselines.
! AN table 4: 22 integrations on 190 of 190 possible baselines.
! AN table 5: 32 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0916009 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0121+0422
! 
! 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.22497e+09        8e+06          1        8e+06
!  02        2  2.24497e+09        8e+06          1        8e+06
!  03        3  2.33497e+09        8e+06          1        8e+06
!  04        4  2.36497e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2169 lines of history.
! 
! Reading 36688 visibilities.
select I
! Polarization I is unavailable.
! Selecting polarization: RR,  channels: 1..4
! Reading IF 1 channels: 1..1
! Reading IF 2 channels: 2..2
! Reading IF 3 channels: 3..3
! Reading IF 4 channels: 4..4
print "field_size =",field_size
! field_size = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J0121+0422_S_2000_12_04_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 512x512 pixels with 0.500x0.500 milli-arcsec cellsize.
startmod
! Applying default point source starting model.
! Performing phase self-cal
! Adding 1 model components to the UV plane model.
! The established model now contains 1 components and 1 Jy
! 
! Correcting IF 1.
!  A total of 1282 telescope corrections were flagged in sub-array 1.
!  A total of 5264 telescope corrections were flagged in sub-array 2.
!  A total of 853 telescope corrections were flagged in sub-array 3.
!  A total of 252 telescope corrections were flagged in sub-array 4.
!  A total of 577 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 1282 telescope corrections were flagged in sub-array 1.
!  A total of 5264 telescope corrections were flagged in sub-array 2.
!  A total of 853 telescope corrections were flagged in sub-array 3.
!  A total of 252 telescope corrections were flagged in sub-array 4.
!  A total of 577 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 1282 telescope corrections were flagged in sub-array 1.
!  A total of 5264 telescope corrections were flagged in sub-array 2.
!  A total of 853 telescope corrections were flagged in sub-array 3.
!  A total of 252 telescope corrections were flagged in sub-array 4.
!  A total of 577 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 1282 telescope corrections were flagged in sub-array 1.
!  A total of 5264 telescope corrections were flagged in sub-array 2.
!  A total of 853 telescope corrections were flagged in sub-array 3.
!  A total of 252 telescope corrections were flagged in sub-array 4.
!  A total of 577 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=0.874754Jy  sigma=0.007188
! Fit after  self-cal, rms=0.360658Jy  sigma=0.002758
! 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.04 mas, bmaj=4.639 mas, bpa=-5.012 degrees
! Estimated noise=864.994 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.833093 Jy
! Component: 100  -  total flux cleaned = 1.04617 Jy
! Total flux subtracted in 100 components = 1.04617 Jy
! Clean residual min=-0.031675 max=0.091740 Jy/beam
! Clean residual mean=0.000140 rms=0.008640 Jy/beam
! Combined flux in latest and established models = 1.04617 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 6 components and 1.04617 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.344979Jy  sigma=0.002614
! Fit after  self-cal, rms=0.344864Jy  sigma=0.002614
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0991498 Jy
! Component: 100  -  total flux cleaned = 0.151425 Jy
! Total flux subtracted in 100 components = 0.151425 Jy
! Clean residual min=-0.027821 max=0.030201 Jy/beam
! Clean residual mean=0.000058 rms=0.006258 Jy/beam
! Combined flux in latest and established models = 1.1976 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 17 components and 1.1976 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.320589Jy  sigma=0.002363
! Fit after  self-cal, rms=0.320414Jy  sigma=0.002362
! 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.693 mas, bmaj=6.311 mas, bpa=-4.036 degrees
! Estimated noise=468.858 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.019497 Jy
! Component: 100  -  total flux cleaned = 0.0264069 Jy
! Component: 150  -  total flux cleaned = 0.027152 Jy
! Component: 200  -  total flux cleaned = 0.0277207 Jy
! Total flux subtracted in 200 components = 0.0277207 Jy
! Clean residual min=-0.019911 max=0.018613 Jy/beam
! Clean residual mean=0.000155 rms=0.004670 Jy/beam
! Combined flux in latest and established models = 1.22532 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 24 components and 1.22532 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319414Jy  sigma=0.002353
! Fit after  self-cal, rms=0.319389Jy  sigma=0.002353
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.94     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.06     KP        0.86     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        0.98     NY        1.00*    OV        0.90     PT        0.96     
!   SC        0.95     TS        1.00*    WF        0.93     WZ        1.00*    
! 
!  A total of 321 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        0.95     KP        0.99     
!   LA        1.05     MA        1.66     MC        1.31     MK        0.90     
!   NL        1.00     NY        1.00*    OV        1.00     PT        1.02     
!   SC        1.03     TS        1.00*    WF        0.90     WZ        0.98     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.97     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.18     MC        1.03     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.04     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.05     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.04     KP        1.12     
!   LA        1.07     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.03     NY        1.00*    OV        1.01     PT        1.04     
!   SC        1.00*    TS        0.99     WF        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.02     HN        1.16     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.98     MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.28     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.96     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.04     KP        0.91     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        0.94     NY        1.00*    OV        0.89     PT        0.97     
!   SC        0.93     TS        1.00*    WF        0.97     WZ        1.00*    
! 
!  A total of 321 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.02     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        0.97     KP        1.01     
!   LA        1.01     MA        1.04     MC        1.09     MK        0.92     
!   NL        0.97     NY        1.00*    OV        0.97     PT        1.04     
!   SC        0.99     TS        1.00*    WF        1.04     WZ        0.96     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.08     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.17     MC        0.94     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.00     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.96     FD        1.04     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.04     KP        1.04     
!   LA        1.04     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        1.00     NY        1.00*    OV        0.99     PT        1.05     
!   SC        1.00*    TS        1.00     WF        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.10     HN        1.13     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.61     MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.11     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.07     FD        0.89     GC        1.14     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.98     KP        1.16     
!   LA        0.79     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        1.04     NY        1.00*    OV        0.67     PT        1.11     
!   SC        1.04     TS        1.00*    WF        0.91     WZ        1.00*    
! 
!  A total of 321 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.90     FD        1.05     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        1.03     KK        0.91     KP        1.04     
!   LA        1.04     MA        2.51     MC        2.16     MK        0.83     
!   NL        1.05     NY        1.00*    OV        0.99     PT        1.09     
!   SC        0.96     TS        1.00*    WF        1.02     WZ        0.85     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.99     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.15     MC        1.68     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        0.92     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.99     FD        1.02     GC        1.10     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.05     KP        1.00     
!   LA        0.87     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        1.15     NY        1.00*    OV        1.05     PT        0.79     
!   SC        1.00*    TS        0.95     WF        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.98     HN        0.95     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        2.97     MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.12     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.97     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.06     KP        0.95     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.07     
!   NL        0.98     NY        1.00*    OV        0.94     PT        1.01     
!   SC        0.99     TS        1.00*    WF        0.96     WZ        1.00*    
! 
!  A total of 321 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.02     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.04     KK        0.98     KP        1.02     
!   LA        1.03     MA        5.82     MC        1.87     MK        0.95     
!   NL        1.01     NY        1.00*    OV        1.01     PT        1.07     
!   SC        1.04     TS        1.00*    WF        1.04     WZ        0.99     
! 
!  A total of 63 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.96     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.69     MC        1.11     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.08     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        1.04     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.04     KP        1.04     
!   LA        1.04     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.04     NY        1.00*    OV        1.03     PT        1.05     
!   SC        1.00*    TS        1.00     WF        1.00*    WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.98     HN        1.21     KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.26     MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        0.95     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.319389Jy  sigma=0.002353
! Fit after  self-cal, rms=0.361354Jy  sigma=0.002147
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.686 mas, bmaj=6.693 mas, bpa=-4.068 degrees
! Estimated noise=472.772 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.00125775 Jy
! Component: 100  -  total flux cleaned = -0.00124689 Jy
! Component: 150  -  total flux cleaned = -0.0012449 Jy
! Component: 200  -  total flux cleaned = -0.00124443 Jy
! Total flux subtracted in 200 components = -0.00124443 Jy
! Clean residual min=-0.010981 max=0.009927 Jy/beam
! Clean residual mean=0.000157 rms=0.002602 Jy/beam
! Combined flux in latest and established models = 1.22407 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 36 components and 1.22407 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.361295Jy  sigma=0.002147
! Fit after  self-cal, rms=0.362729Jy  sigma=0.002146
! 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.362729Jy  sigma=0.002146
! Fit after  self-cal, rms=0.356946Jy  sigma=0.002039
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.692 mas, bmaj=6.701 mas, bpa=-4.111 degrees
! Estimated noise=473.086 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000681429 Jy
! Component: 100  -  total flux cleaned = -0.00060274 Jy
! Component: 150  -  total flux cleaned = -0.000532076 Jy
! Component: 200  -  total flux cleaned = -0.000468293 Jy
! Total flux subtracted in 200 components = -0.000468293 Jy
! Clean residual min=-0.003648 max=0.004814 Jy/beam
! Clean residual mean=0.000232 rms=0.001189 Jy/beam
! Combined flux in latest and established models = 1.22361 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 42 components and 1.22361 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.356898Jy  sigma=0.002039
! Fit after  self-cal, rms=0.356969Jy  sigma=0.002039
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 (3, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00485538 Jy
! Component: 100  -  total flux cleaned = 0.00533517 Jy
! Component: 150  -  total flux cleaned = 0.00533162 Jy
! Component: 200  -  total flux cleaned = 0.00533116 Jy
! Total flux subtracted in 200 components = 0.00533116 Jy
! Clean residual min=-0.003393 max=0.004116 Jy/beam
! Clean residual mean=0.000165 rms=0.001134 Jy/beam
! Combined flux in latest and established models = 1.22894 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 55 components and 1.22894 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.356890Jy  sigma=0.002038
! Fit after  self-cal, rms=0.356905Jy  sigma=0.002038
! 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.356905Jy  sigma=0.002038
! Fit after  self-cal, rms=0.356477Jy  sigma=0.002037
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.693 mas, bmaj=6.703 mas, bpa=-4.141 degrees
! Estimated noise=473.512 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00191613 Jy
! Component: 100  -  total flux cleaned = 0.00174975 Jy
! Component: 150  -  total flux cleaned = 0.00167769 Jy
! Component: 200  -  total flux cleaned = 0.00167982 Jy
! Total flux subtracted in 200 components = 0.00167982 Jy
! Clean residual min=-0.003448 max=0.003992 Jy/beam
! Clean residual mean=0.000116 rms=0.001088 Jy/beam
! Combined flux in latest and established models = 1.23062 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 58 components and 1.23062 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.356439Jy  sigma=0.002037
! Fit after  self-cal, rms=0.356466Jy  sigma=0.002037
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.000326317 Jy
! Component: 100  -  total flux cleaned = 0.000323012 Jy
! Component: 150  -  total flux cleaned = 0.000224245 Jy
! Component: 200  -  total flux cleaned = 0.000179277 Jy
! Total flux subtracted in 200 components = 0.000179277 Jy
! Clean residual min=-0.003450 max=0.003971 Jy/beam
! Clean residual mean=0.000114 rms=0.001079 Jy/beam
! Combined flux in latest and established models = 1.2308 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 67 components and 1.2308 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.356447Jy  sigma=0.002037
! Fit after  self-cal, rms=0.356456Jy  sigma=0.002037
! 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.356456Jy  sigma=0.002037
! Fit after  self-cal, rms=0.357467Jy  sigma=0.002036
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.382 mas, bmaj=10.82 mas, bpa=-2.337 degrees
! Estimated noise=614.222 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00013008 Jy
! Component: 100  -  total flux cleaned = -0.000389497 Jy
! Component: 150  -  total flux cleaned = -0.000556852 Jy
! Component: 200  -  total flux cleaned = -0.000659152 Jy
! Total flux subtracted in 200 components = -0.000659152 Jy
! Clean residual min=-0.004486 max=0.005057 Jy/beam
! Clean residual mean=0.000244 rms=0.001627 Jy/beam
! Combined flux in latest and established models = 1.23014 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 81 components and 1.23014 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.357453Jy  sigma=0.002036
! Fit after  self-cal, rms=0.357467Jy  sigma=0.002036
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 = 7.48633e-06 Jy
! Component: 100  -  total flux cleaned = -8.18615e-05 Jy
! Component: 150  -  total flux cleaned = -0.000159898 Jy
! Component: 200  -  total flux cleaned = -0.00020605 Jy
! Total flux subtracted in 200 components = -0.00020605 Jy
! Clean residual min=-0.004551 max=0.005034 Jy/beam
! Clean residual mean=0.000250 rms=0.001613 Jy/beam
! Combined flux in latest and established models = 1.22993 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 85 components and 1.22993 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.357462Jy  sigma=0.002036
! Fit after  self-cal, rms=0.357458Jy  sigma=0.002036
! 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.694 mas, bmaj=6.705 mas, bpa=-4.157 degrees
! Estimated noise=473.752 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.694 x 6.705 at -4.157 degrees (North through East)
! Clean map  min=-0.003248  max=1.1127 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.357458Jy  sigma=0.002036
! Fit after  self-cal, rms=0.442235Jy  sigma=0.001807
! Inverting map and beam 
! Estimated beam: bmin=2.695 mas, bmaj=6.702 mas, bpa=-4.144 degrees
! Estimated noise=473.568 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00259114 Jy
! Component: 100  -  total flux cleaned = -0.00324389 Jy
! Component: 150  -  total flux cleaned = -0.00336162 Jy
! Component: 200  -  total flux cleaned = -0.00351047 Jy
! Total flux subtracted in 200 components = -0.00351047 Jy
! Clean residual min=-0.002837 max=0.002973 Jy/beam
! Clean residual mean=0.000084 rms=0.000836 Jy/beam
! Combined flux in latest and established models = 1.22642 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 95 components and 1.22642 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.442201Jy  sigma=0.001807
! Fit after  self-cal, rms=0.442222Jy  sigma=0.001807
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000370235 Jy
! Component: 100  -  total flux cleaned = -0.000411235 Jy
! Component: 150  -  total flux cleaned = -0.000451863 Jy
! Component: 200  -  total flux cleaned = -0.000487525 Jy
! Total flux subtracted in 200 components = -0.000487525 Jy
! Clean residual min=-0.002814 max=0.002905 Jy/beam
! Clean residual mean=0.000089 rms=0.000827 Jy/beam
! Combined flux in latest and established models = 1.22593 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 102 components and 1.22593 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.442211Jy  sigma=0.001807
! Fit after  self-cal, rms=0.442221Jy  sigma=0.001807
! 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.442221Jy  sigma=0.001807
! Fit after  self-cal, rms=0.493779Jy  sigma=0.001807
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.122 mas, bmaj=4.916 mas, bpa=-3.203 degrees
! Estimated noise=878.615 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.83949 Jy
! Component: 100  -  total flux cleaned = 1.03695 Jy
! Component: 150  -  total flux cleaned = 1.12142 Jy
! Component: 200  -  total flux cleaned = 1.16291 Jy
! Total flux subtracted in 200 components = 1.16291 Jy
! Clean residual min=-0.006908 max=0.018759 Jy/beam
! Clean residual mean=0.000051 rms=0.002059 Jy/beam
! Combined flux in latest and established models = 1.16291 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 1.16291 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.698 mas, bmaj=6.706 mas, bpa=-4.148 degrees
! Estimated noise=473.499 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.0303566 Jy
! Component: 100  -  total flux cleaned = 0.044754 Jy
! Component: 150  -  total flux cleaned = 0.0529539 Jy
! Component: 200  -  total flux cleaned = 0.0579794 Jy
! Total flux subtracted in 200 components = 0.0579794 Jy
! Clean residual min=-0.003274 max=0.003326 Jy/beam
! Clean residual mean=0.000138 rms=0.000900 Jy/beam
! Combined flux in latest and established models = 1.22089 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 41 components and 1.22089 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.393 mas, bmaj=10.83 mas, bpa=-2.228 degrees
! Estimated noise=612.242 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00307767 Jy
! Component: 100  -  total flux cleaned = 0.00309488 Jy
! Component: 150  -  total flux cleaned = 0.00289436 Jy
! Component: 200  -  total flux cleaned = 0.00278203 Jy
! Total flux subtracted in 200 components = 0.00278203 Jy
! Clean residual min=-0.003926 max=0.004724 Jy/beam
! Clean residual mean=0.000258 rms=0.001268 Jy/beam
! Combined flux in latest and established models = 1.22367 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.000142628 Jy
! Component: 100  -  total flux cleaned = -0.000224561 Jy
! Component: 150  -  total flux cleaned = -0.000329021 Jy
! Component: 200  -  total flux cleaned = -0.000389112 Jy
! Total flux subtracted in 200 components = -0.000389112 Jy
! Clean residual min=-0.003850 max=0.004695 Jy/beam
! Clean residual mean=0.000267 rms=0.001251 Jy/beam
! Combined flux in latest and established models = 1.22328 Jy
! Adding 41 model components to the UV plane model.
! The established model now contains 76 components and 1.22328 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.698 mas, bmaj=6.706 mas, bpa=-4.148 degrees
! Estimated noise=473.499 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000326918 Jy
! Component: 100  -  total flux cleaned = -0.000536119 Jy
! Component: 150  -  total flux cleaned = -0.00053622 Jy
! Component: 200  -  total flux cleaned = -0.000425371 Jy
! Total flux subtracted in 200 components = -0.000425371 Jy
! Clean residual min=-0.002919 max=0.003108 Jy/beam
! Clean residual mean=0.000113 rms=0.000824 Jy/beam
! Combined flux in latest and established models = 1.22285 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 87 components and 1.22285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.493792Jy  sigma=0.001807
! Fit after  self-cal, rms=0.493828Jy  sigma=0.001807
wmodel J0121+0422_S_2000_12_04_pus_map.mod
! Writing 87 model components to file: J0121+0422_S_2000_12_04_pus_map.mod
wobs J0121+0422_S_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J0121+0422_S_2000_12_04_pus_uvs.fits
wwins J0121+0422_S_2000_12_04_pus_map.win
! wwins: Wrote 2 windows to J0121+0422_S_2000_12_04_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.000932833 Jy
! Component: 100  -  total flux cleaned = 0.00128219 Jy
! Component: 150  -  total flux cleaned = 0.00161485 Jy
! Component: 200  -  total flux cleaned = 0.00198378 Jy
! Component: 250  -  total flux cleaned = 0.00234123 Jy
! Component: 300  -  total flux cleaned = 0.0027334 Jy
! Component: 350  -  total flux cleaned = 0.00311745 Jy
! Component: 400  -  total flux cleaned = 0.0034937 Jy
! Component: 450  -  total flux cleaned = 0.00378052 Jy
! Component: 500  -  total flux cleaned = 0.00402271 Jy
! Component: 550  -  total flux cleaned = 0.00430059 Jy
! Component: 600  -  total flux cleaned = 0.00453497 Jy
! Component: 650  -  total flux cleaned = 0.00480403 Jy
! Component: 700  -  total flux cleaned = 0.00491814 Jy
! Component: 750  -  total flux cleaned = 0.00518067 Jy
! Component: 800  -  total flux cleaned = 0.00532892 Jy
! Component: 850  -  total flux cleaned = 0.00543877 Jy
! Component: 900  -  total flux cleaned = 0.00561961 Jy
! Component: 950  -  total flux cleaned = 0.00576226 Jy
! Component: 1000  -  total flux cleaned = 0.00590369 Jy
! Component: 1050  -  total flux cleaned = 0.00604327 Jy
! Component: 1100  -  total flux cleaned = 0.0061818 Jy
! Component: 1150  -  total flux cleaned = 0.00625056 Jy
! Component: 1200  -  total flux cleaned = 0.00638656 Jy
! Component: 1250  -  total flux cleaned = 0.00648743 Jy
! Component: 1300  -  total flux cleaned = 0.00658738 Jy
! Component: 1350  -  total flux cleaned = 0.00658761 Jy
! Component: 1400  -  total flux cleaned = 0.00675172 Jy
! Component: 1450  -  total flux cleaned = 0.00688107 Jy
! Component: 1500  -  total flux cleaned = 0.00694532 Jy
! Component: 1550  -  total flux cleaned = 0.00700896 Jy
! Component: 1600  -  total flux cleaned = 0.00704049 Jy
! Component: 1650  -  total flux cleaned = 0.0071036 Jy
! Component: 1700  -  total flux cleaned = 0.00713494 Jy
! Component: 1750  -  total flux cleaned = 0.00722771 Jy
! Component: 1800  -  total flux cleaned = 0.00722759 Jy
! Component: 1850  -  total flux cleaned = 0.00728852 Jy
! Component: 1900  -  total flux cleaned = 0.00737905 Jy
! Component: 1950  -  total flux cleaned = 0.00740887 Jy
! Component: 2000  -  total flux cleaned = 0.0074087 Jy
! Total flux subtracted in 2048 components = 0.00743818 Jy
! Clean residual min=-0.001757 max=0.001834 Jy/beam
! Clean residual mean=0.000029 rms=0.000596 Jy/beam
! Combined flux in latest and established models = 1.23029 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 234 components and 1.23029 Jy
![Exited script file: muppet]
wmap "J0121+0422_S_2000_12_04_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.698 x 6.706 at -4.148 degrees (North through East)
! Clean map  min=-0.0023901  max=1.1145 Jy/beam
! Writing clean map to FITS file: J0121+0422_S_2000_12_04_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 1.11452 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000596282 
device "J0121+0422_S_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J0121+0422_S_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.160503 0.160503 0.321007 0.642014 1.28403 2.56805 5.13611 10.2722 20.5444 41.0889 82.1777
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0017 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.114 
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.698 x 6.706 at -4.148 degrees (North through East)
! Clean map  min=-0.0023901  max=1.1145 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0121+0422_S_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J0121+0422_S_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0121+0422_S_2000_12_04_pus_uvs.log closed on Wed Oct 17 16:52:34 2007