! Started logfile: J0825+0309_S_2001_04_09_pus_uvs.log on Fri Oct  5 15:57:05 2007
obs J0825+0309_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J0825+0309_S_2001_04_09_pus_uva.fits
! AN table 1: 98 integrations on 190 of 190 possible baselines.
! AN table 2: 37 integrations on 190 of 190 possible baselines.
! AN table 3: 59 integrations on 190 of 190 possible baselines.
! AN table 4: 163 integrations on 190 of 190 possible baselines.
! AN table 5: 70 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.13646 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0825+0309
! 
! 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 1949 lines of history.
! 
! Reading 44284 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 J0825+0309_S_2001_04_09_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 1363 telescope corrections were flagged in sub-array 1.
!  A total of 555 telescope corrections were flagged in sub-array 2.
!  A total of 1100 telescope corrections were flagged in sub-array 3.
!  A total of 1945 telescope corrections were flagged in sub-array 4.
!  A total of 1232 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 2.
!  A total of 1363 telescope corrections were flagged in sub-array 1.
!  A total of 555 telescope corrections were flagged in sub-array 2.
!  A total of 1100 telescope corrections were flagged in sub-array 3.
!  A total of 1945 telescope corrections were flagged in sub-array 4.
!  A total of 1232 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 3.
!  A total of 1363 telescope corrections were flagged in sub-array 1.
!  A total of 555 telescope corrections were flagged in sub-array 2.
!  A total of 1100 telescope corrections were flagged in sub-array 3.
!  A total of 1945 telescope corrections were flagged in sub-array 4.
!  A total of 1232 telescope corrections were flagged in sub-array 5.
! 
! Correcting IF 4.
!  A total of 1363 telescope corrections were flagged in sub-array 1.
!  A total of 555 telescope corrections were flagged in sub-array 2.
!  A total of 1100 telescope corrections were flagged in sub-array 3.
!  A total of 1945 telescope corrections were flagged in sub-array 4.
!  A total of 1232 telescope corrections were flagged in sub-array 5.
! 
! Fit before self-cal, rms=0.811021Jy  sigma=0.005745
! Fit after  self-cal, rms=0.534631Jy  sigma=0.003401
! 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.819 mas, bmaj=3.954 mas, bpa=5.965 degrees
! Estimated noise=852.442 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.452349 Jy
! Component: 100  -  total flux cleaned = 0.594272 Jy
! Total flux subtracted in 100 components = 0.594272 Jy
! Clean residual min=-0.017332 max=0.066859 Jy/beam
! Clean residual mean=-0.000020 rms=0.005288 Jy/beam
! Combined flux in latest and established models = 0.594272 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 0.594272 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.319787Jy  sigma=0.002021
! Fit after  self-cal, rms=0.319353Jy  sigma=0.002019
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0783663 Jy
! Component: 100  -  total flux cleaned = 0.124972 Jy
! Total flux subtracted in 100 components = 0.124972 Jy
! Clean residual min=-0.010006 max=0.024258 Jy/beam
! Clean residual mean=0.000008 rms=0.002969 Jy/beam
! Combined flux in latest and established models = 0.719244 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 24 components and 0.719244 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.294974Jy  sigma=0.001757
! Fit after  self-cal, rms=0.294556Jy  sigma=0.001756
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0304731 Jy
! Component: 100  -  total flux cleaned = 0.0511439 Jy
! Total flux subtracted in 100 components = 0.0511439 Jy
! Clean residual min=-0.008789 max=0.017003 Jy/beam
! Clean residual mean=0.000018 rms=0.002388 Jy/beam
! Combined flux in latest and established models = 0.770388 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 35 components and 0.770388 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.290385Jy  sigma=0.001705
! Fit after  self-cal, rms=0.290283Jy  sigma=0.001705
! Inverting map 
! Added new window around map position (5, 6).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0176782 Jy
! Component: 100  -  total flux cleaned = 0.0300721 Jy
! Total flux subtracted in 100 components = 0.0300721 Jy
! Clean residual min=-0.008140 max=0.010718 Jy/beam
! Clean residual mean=0.000019 rms=0.002158 Jy/beam
! Combined flux in latest and established models = 0.80046 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 43 components and 0.80046 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.289000Jy  sigma=0.001688
! Fit after  self-cal, rms=0.288921Jy  sigma=0.001688
! 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=1.986 mas, bmaj=4.216 mas, bpa=4.977 degrees
! Estimated noise=478.588 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.0152723 Jy
! Component: 100  -  total flux cleaned = 0.0247086 Jy
! Component: 150  -  total flux cleaned = 0.0310816 Jy
! Component: 200  -  total flux cleaned = 0.0347463 Jy
! Total flux subtracted in 200 components = 0.0347463 Jy
! Clean residual min=-0.009303 max=0.008011 Jy/beam
! Clean residual mean=0.000001 rms=0.002277 Jy/beam
! Combined flux in latest and established models = 0.835207 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 53 components and 0.835207 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.288183Jy  sigma=0.001678
! Fit after  self-cal, rms=0.288086Jy  sigma=0.001678
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.96     GC        1.10     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.03     KP        0.86     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        0.93     NY        1.00*    OV        0.98     PT        0.93     
!   SC        1.00     TS        1.00*    WF        1.04     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        1.14     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        1.30     KK        1.01     KP        1.14     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        0.95     NY        1.00*    OV        1.04     PT        1.08     
!   SC        1.00*    TS        0.95     WF        1.13     WZ        1.00*    
! 
!  A total of 60 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.18     MC        0.81     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.20     TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.04     FD        0.98     GC        1.00*    GG        1.00*    
!   HH        1.07     HN        0.95     KK        1.00*    KP        1.02     
!   LA        0.98     MA        1.09     MC        0.88     MK        1.00*    
!   NL        0.98     NY        1.03     OV        1.04     PT        0.94     
!   SC        0.93     TS        1.00*    WF        0.99     WZ        1.05     
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.00     FD        1.00*    GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.04     KP        1.04     
!   LA        0.99     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        1.00*    NY        1.00*    OV        1.02     PT        0.99     
!   SC        1.00*    TS        0.91     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.94     GC        1.08     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.10     KP        1.29     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        0.93     NY        1.00*    OV        0.96     PT        0.98     
!   SC        1.01     TS        1.00*    WF        0.95     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.99     FD        0.97     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.28     KK        0.97     KP        0.68     
!   LA        0.97     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        0.98     NY        1.00*    OV        0.93     PT        0.95     
!   SC        1.00*    TS        1.00     WF        1.11     WZ        1.00*    
! 
!  A total of 60 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.94     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.02     MC        0.92     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        2.83     TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.05     FD        0.97     GC        1.00*    GG        1.00*    
!   HH        1.06     HN        0.95     KK        1.00*    KP        0.94     
!   LA        1.01     MA        1.11     MC        0.97     MK        1.00*    
!   NL        0.99     NY        1.06     OV        1.01     PT        0.99     
!   SC        0.95     TS        1.00*    WF        1.00     WZ        1.04     
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.01     FD        1.00*    GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.04     KP        1.04     
!   LA        1.05     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        1.00*    NY        1.00*    OV        0.98     PT        1.03     
!   SC        1.00*    TS        0.95     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        0.96     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.08     KK        1.11     KP        0.98     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        0.95     NY        1.00*    OV        0.97     PT        0.98     
!   SC        1.02     TS        1.00*    WF        0.96     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        0.99     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.31     KK        0.98     KP        1.01     
!   LA        0.93     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        0.98     NY        1.00*    OV        0.95     PT        0.98     
!   SC        1.00*    TS        1.03     WF        1.18     WZ        1.00*    
! 
!  A total of 60 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.20     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.88     MC        0.91     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        0.99     TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.08     FD        0.98     GC        1.00*    GG        1.00*    
!   HH        1.00     HN        1.00     KK        1.00*    KP        1.03     
!   LA        0.97     MA        0.96     MC        1.02     MK        1.00*    
!   NL        1.00     NY        1.03     OV        1.03     PT        1.00     
!   SC        0.93     TS        1.00*    WF        0.94     WZ        1.06     
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        1.02     FD        1.00*    GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        1.09     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.00*    NY        1.00*    OV        1.00     PT        1.06     
!   SC        1.00*    TS        0.99     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 9 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        0.97     GC        1.10     GG        1.00*    
!   HH        1.00*    HN        1.07     KK        1.09     KP        0.98     
!   LA        1.00     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        0.95     NY        1.00*    OV        0.97     PT        1.02     
!   SC        1.00     TS        1.00*    WF        1.05     WZ        1.00*    
! 
!  A total of 12 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.01     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        1.31     KK        0.94     KP        1.01     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        1.00     NY        1.00*    OV        0.95     PT        0.97     
!   SC        1.00*    TS        0.98     WF        1.09     WZ        1.00*    
! 
!  A total of 60 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.04     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.81     MC        0.50     MK        1.00*    
!   NL        1.00*    NY        1.00*    OV        1.00*    PT        1.00*    
!   SC        1.03     TS        1.00*    WF        1.00*    WZ        1.00*    
! 
!  A total of 66 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.03     FD        0.99     GC        1.00*    GG        1.00*    
!   HH        1.06     HN        1.01     KK        1.00*    KP        1.02     
!   LA        1.00     MA        0.94     MC        1.16     MK        1.00*    
!   NL        1.00     NY        1.14     OV        1.03     PT        1.02     
!   SC        0.95     TS        1.00*    WF        0.97     WZ        1.16     
! 
!  A total of 6 telescope corrections were flagged in sub-array 5.
!  Telescope amplitude corrections in sub-array 5:
!   BR        0.99     FD        1.00*    GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        1.05     
!   LA        1.06     MA        1.00*    MC        1.00*    MK        1.01     
!   NL        1.00*    NY        1.00*    OV        1.01     PT        1.10     
!   SC        1.00*    TS        0.92     WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.288086Jy  sigma=0.001678
! Fit after  self-cal, rms=0.297543Jy  sigma=0.001618
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.002 mas, bmaj=4.299 mas, bpa=4.833 degrees
! Estimated noise=485.049 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 (2.5, 6.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00566993 Jy
! Component: 100  -  total flux cleaned = 0.00648518 Jy
! Component: 150  -  total flux cleaned = 0.00719609 Jy
! Component: 200  -  total flux cleaned = 0.00729459 Jy
! Total flux subtracted in 200 components = 0.00729459 Jy
! Clean residual min=-0.004050 max=0.005668 Jy/beam
! Clean residual mean=-0.000034 rms=0.001262 Jy/beam
! Combined flux in latest and established models = 0.842501 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 69 components and 0.842501 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.297299Jy  sigma=0.001616
! Fit after  self-cal, rms=0.297427Jy  sigma=0.001616
! 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.297427Jy  sigma=0.001616
! Fit after  self-cal, rms=0.299845Jy  sigma=0.001614
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.004 mas, bmaj=4.298 mas, bpa=4.876 degrees
! Estimated noise=485.472 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00274471 Jy
! Component: 100  -  total flux cleaned = 0.00358919 Jy
! Component: 150  -  total flux cleaned = 0.00358789 Jy
! Component: 200  -  total flux cleaned = 0.00367225 Jy
! Total flux subtracted in 200 components = 0.00367225 Jy
! Clean residual min=-0.003728 max=0.005336 Jy/beam
! Clean residual mean=-0.000045 rms=0.001207 Jy/beam
! Combined flux in latest and established models = 0.846173 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 74 components and 0.846173 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299755Jy  sigma=0.001614
! Fit after  self-cal, rms=0.299797Jy  sigma=0.001614
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 (58.5, 4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00486035 Jy
! Component: 100  -  total flux cleaned = 0.00659241 Jy
! Component: 150  -  total flux cleaned = 0.00764919 Jy
! Component: 200  -  total flux cleaned = 0.00780573 Jy
! Total flux subtracted in 200 components = 0.00780573 Jy
! Clean residual min=-0.003779 max=0.004916 Jy/beam
! Clean residual mean=-0.000043 rms=0.001144 Jy/beam
! Combined flux in latest and established models = 0.853979 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 93 components and 0.853979 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299652Jy  sigma=0.001613
! Fit after  self-cal, rms=0.299640Jy  sigma=0.001613
! Inverting map 
! Added new window around map position (39.5, 58).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00417495 Jy
! Component: 100  -  total flux cleaned = 0.00578421 Jy
! Component: 150  -  total flux cleaned = 0.00658985 Jy
! Component: 200  -  total flux cleaned = 0.00681402 Jy
! Total flux subtracted in 200 components = 0.00681402 Jy
! Clean residual min=-0.004089 max=0.004284 Jy/beam
! Clean residual mean=-0.000049 rms=0.001094 Jy/beam
! Combined flux in latest and established models = 0.860793 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 105 components and 0.860793 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299528Jy  sigma=0.001613
! Fit after  self-cal, rms=0.299516Jy  sigma=0.001613
! 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.299516Jy  sigma=0.001613
! Fit after  self-cal, rms=0.299838Jy  sigma=0.001613
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.005 mas, bmaj=4.298 mas, bpa=4.864 degrees
! Estimated noise=485.984 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00254921 Jy
! Component: 100  -  total flux cleaned = 0.00389236 Jy
! Component: 150  -  total flux cleaned = 0.00417946 Jy
! Component: 200  -  total flux cleaned = 0.00431577 Jy
! Total flux subtracted in 200 components = 0.00431577 Jy
! Clean residual min=-0.003994 max=0.004386 Jy/beam
! Clean residual mean=-0.000052 rms=0.001083 Jy/beam
! Combined flux in latest and established models = 0.865109 Jy
selfcal
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 107 components and 0.865109 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299779Jy  sigma=0.001612
! Fit after  self-cal, rms=0.299796Jy  sigma=0.001612
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.000546997 Jy
! Component: 100  -  total flux cleaned = 0.000749023 Jy
! Component: 150  -  total flux cleaned = 0.000942925 Jy
! Component: 200  -  total flux cleaned = 0.00106737 Jy
! Total flux subtracted in 200 components = 0.00106737 Jy
! Clean residual min=-0.003973 max=0.004336 Jy/beam
! Clean residual mean=-0.000053 rms=0.001076 Jy/beam
! Combined flux in latest and established models = 0.866176 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 112 components and 0.866176 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299758Jy  sigma=0.001612
! Fit after  self-cal, rms=0.299757Jy  sigma=0.001612
! 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.299757Jy  sigma=0.001612
! Fit after  self-cal, rms=0.299860Jy  sigma=0.001612
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=7.79 mas, bmaj=10.69 mas, bpa=-7.851 degrees
! Estimated noise=686.359 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00325269 Jy
! Component: 100  -  total flux cleaned = 0.00527713 Jy
! Component: 150  -  total flux cleaned = 0.00671389 Jy
! Component: 200  -  total flux cleaned = 0.00757494 Jy
! Total flux subtracted in 200 components = 0.00757494 Jy
! Clean residual min=-0.005622 max=0.005910 Jy/beam
! Clean residual mean=-0.000152 rms=0.002003 Jy/beam
! Combined flux in latest and established models = 0.873751 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 126 components and 0.873751 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299843Jy  sigma=0.001612
! Fit after  self-cal, rms=0.299844Jy  sigma=0.001612
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.00094209 Jy
! Component: 100  -  total flux cleaned = 0.00128675 Jy
! Component: 150  -  total flux cleaned = 0.00148594 Jy
! Component: 200  -  total flux cleaned = 0.00157695 Jy
! Total flux subtracted in 200 components = 0.00157695 Jy
! Clean residual min=-0.005589 max=0.005845 Jy/beam
! Clean residual mean=-0.000156 rms=0.001992 Jy/beam
! Combined flux in latest and established models = 0.875328 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 136 components and 0.875328 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.299845Jy  sigma=0.001612
! Fit after  self-cal, rms=0.299836Jy  sigma=0.001612
! 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.005 mas, bmaj=4.296 mas, bpa=4.869 degrees
! Estimated noise=486.274 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.005 x 4.296 at 4.869 degrees (North through East)
! Clean map  min=-0.0037428  max=0.58703 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.299836Jy  sigma=0.001612
! Fit after  self-cal, rms=0.836979Jy  sigma=0.001497
! Inverting map and beam 
! Estimated beam: bmin=2.01 mas, bmaj=4.299 mas, bpa=4.876 degrees
! Estimated noise=487.339 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00300816 Jy
! Component: 100  -  total flux cleaned = -0.00501554 Jy
! Component: 150  -  total flux cleaned = -0.00647483 Jy
! Component: 200  -  total flux cleaned = -0.00760518 Jy
! Total flux subtracted in 200 components = -0.00760518 Jy
! Clean residual min=-0.003136 max=0.003665 Jy/beam
! Clean residual mean=-0.000021 rms=0.000841 Jy/beam
! Combined flux in latest and established models = 0.867723 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 150 components and 0.867723 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.836954Jy  sigma=0.001496
! Fit after  self-cal, rms=0.836967Jy  sigma=0.001496
! Inverting map 
! Added new window around map position (-58.5, -9).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00124032 Jy
! Component: 100  -  total flux cleaned = 0.00122642 Jy
! Component: 150  -  total flux cleaned = 0.000710779 Jy
! Component: 200  -  total flux cleaned = 0.000243331 Jy
! Total flux subtracted in 200 components = 0.000243331 Jy
! Clean residual min=-0.003149 max=0.003144 Jy/beam
! Clean residual mean=-0.000020 rms=0.000818 Jy/beam
! Combined flux in latest and established models = 0.867966 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 165 components and 0.867966 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.836898Jy  sigma=0.001496
! Fit after  self-cal, rms=0.836881Jy  sigma=0.001496
! 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.836881Jy  sigma=0.001496
! Fit after  self-cal, rms=1.794496Jy  sigma=0.001496
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.839 mas, bmaj=4.04 mas, bpa=5.43 degrees
! Estimated noise=850.849 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.456492 Jy
! Component: 100  -  total flux cleaned = 0.599163 Jy
! Component: 150  -  total flux cleaned = 0.674717 Jy
! Component: 200  -  total flux cleaned = 0.718461 Jy
! Total flux subtracted in 200 components = 0.718461 Jy
! Clean residual min=-0.008685 max=0.022638 Jy/beam
! Clean residual mean=-0.000007 rms=0.002310 Jy/beam
! Combined flux in latest and established models = 0.718461 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 17 model components to the UV plane model.
! The established model now contains 17 components and 0.718461 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.011 mas, bmaj=4.301 mas, bpa=4.865 degrees
! Estimated noise=487.369 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.0429135 Jy
! Component: 100  -  total flux cleaned = 0.0694298 Jy
! Component: 150  -  total flux cleaned = 0.0873102 Jy
! Component: 200  -  total flux cleaned = 0.0998351 Jy
! Total flux subtracted in 200 components = 0.0998351 Jy
! Clean residual min=-0.003966 max=0.009389 Jy/beam
! Clean residual mean=0.000017 rms=0.001380 Jy/beam
! Combined flux in latest and established models = 0.818296 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 50 components and 0.818297 Jy
! Inverting map 
! Added new window around map position (-1, 5.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00954155 Jy
! Component: 100  -  total flux cleaned = 0.0162736 Jy
! Component: 150  -  total flux cleaned = 0.0217423 Jy
! Component: 200  -  total flux cleaned = 0.0261542 Jy
! Total flux subtracted in 200 components = 0.0261542 Jy
! Clean residual min=-0.003419 max=0.003584 Jy/beam
! Clean residual mean=-0.000007 rms=0.000961 Jy/beam
! Combined flux in latest and established models = 0.844451 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 73 components and 0.844451 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.802 mas, bmaj=10.71 mas, bpa=-7.873 degrees
! Estimated noise=685.001 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00606399 Jy
! Component: 100  -  total flux cleaned = 0.00953778 Jy
! Component: 150  -  total flux cleaned = 0.0122084 Jy
! Component: 200  -  total flux cleaned = 0.0143414 Jy
! Total flux subtracted in 200 components = 0.0143414 Jy
! Clean residual min=-0.003974 max=0.003853 Jy/beam
! Clean residual mean=-0.000042 rms=0.001170 Jy/beam
! Combined flux in latest and established models = 0.858792 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.00140735 Jy
! Component: 100  -  total flux cleaned = 0.00225327 Jy
! Component: 150  -  total flux cleaned = 0.00299879 Jy
! Component: 200  -  total flux cleaned = 0.00365725 Jy
! Total flux subtracted in 200 components = 0.00365725 Jy
! Clean residual min=-0.003978 max=0.003762 Jy/beam
! Clean residual mean=-0.000048 rms=0.001129 Jy/beam
! Combined flux in latest and established models = 0.862449 Jy
! Adding 64 model components to the UV plane model.
! The established model now contains 130 components and 0.862449 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.011 mas, bmaj=4.301 mas, bpa=4.865 degrees
! Estimated noise=487.369 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000600447 Jy
! Component: 100  -  total flux cleaned = -0.000477831 Jy
! Component: 150  -  total flux cleaned = -0.000368613 Jy
! Component: 200  -  total flux cleaned = -0.000265119 Jy
! Total flux subtracted in 200 components = -0.000265119 Jy
! Clean residual min=-0.003148 max=0.003125 Jy/beam
! Clean residual mean=-0.000017 rms=0.000853 Jy/beam
! Combined flux in latest and established models = 0.862184 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 149 components and 0.862184 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=1.794500Jy  sigma=0.001496
! Fit after  self-cal, rms=1.794500Jy  sigma=0.001496
wmodel J0825+0309_S_2001_04_09_pus_map.mod
! Writing 149 model components to file: J0825+0309_S_2001_04_09_pus_map.mod
wobs J0825+0309_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J0825+0309_S_2001_04_09_pus_uvs.fits
wwins J0825+0309_S_2001_04_09_pus_map.win
! wwins: Wrote 7 windows to J0825+0309_S_2001_04_09_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.000469261 Jy
! Component: 100  -  total flux cleaned = 0.000856707 Jy
! Component: 150  -  total flux cleaned = 0.00122827 Jy
! Component: 200  -  total flux cleaned = 0.0015352 Jy
! Component: 250  -  total flux cleaned = 0.00168459 Jy
! Component: 300  -  total flux cleaned = 0.00192781 Jy
! Component: 350  -  total flux cleaned = 0.00211788 Jy
! Component: 400  -  total flux cleaned = 0.00244384 Jy
! Component: 450  -  total flux cleaned = 0.00258061 Jy
! Component: 500  -  total flux cleaned = 0.00271601 Jy
! Component: 550  -  total flux cleaned = 0.00289312 Jy
! Component: 600  -  total flux cleaned = 0.00298038 Jy
! Component: 650  -  total flux cleaned = 0.00306632 Jy
! Component: 700  -  total flux cleaned = 0.00306652 Jy
! Component: 750  -  total flux cleaned = 0.00327781 Jy
! Component: 800  -  total flux cleaned = 0.00327777 Jy
! Component: 850  -  total flux cleaned = 0.00344332 Jy
! Component: 900  -  total flux cleaned = 0.00356593 Jy
! Component: 950  -  total flux cleaned = 0.00356617 Jy
! Component: 1000  -  total flux cleaned = 0.00372652 Jy
! Component: 1050  -  total flux cleaned = 0.0038055 Jy
! Component: 1100  -  total flux cleaned = 0.00388399 Jy
! Component: 1150  -  total flux cleaned = 0.00400106 Jy
! Component: 1200  -  total flux cleaned = 0.00403974 Jy
! Component: 1250  -  total flux cleaned = 0.00415496 Jy
! Component: 1300  -  total flux cleaned = 0.00426864 Jy
! Component: 1350  -  total flux cleaned = 0.00430562 Jy
! Component: 1400  -  total flux cleaned = 0.00426821 Jy
! Component: 1450  -  total flux cleaned = 0.00434244 Jy
! Component: 1500  -  total flux cleaned = 0.00445275 Jy
! Component: 1550  -  total flux cleaned = 0.00441646 Jy
! Component: 1600  -  total flux cleaned = 0.00452543 Jy
! Component: 1650  -  total flux cleaned = 0.00466875 Jy
! Component: 1700  -  total flux cleaned = 0.00463284 Jy
! Component: 1750  -  total flux cleaned = 0.00466844 Jy
! Component: 1800  -  total flux cleaned = 0.00470395 Jy
! Component: 1850  -  total flux cleaned = 0.004774 Jy
! Component: 1900  -  total flux cleaned = 0.00487783 Jy
! Component: 1950  -  total flux cleaned = 0.00487795 Jy
! Component: 2000  -  total flux cleaned = 0.00498021 Jy
! Total flux subtracted in 2048 components = 0.00487853 Jy
! Clean residual min=-0.002201 max=0.002050 Jy/beam
! Clean residual mean=-0.000028 rms=0.000647 Jy/beam
! Combined flux in latest and established models = 0.867063 Jy
keep
! Adding 155 model components to the UV plane model.
! The established model now contains 302 components and 0.867063 Jy
![Exited script file: muppet]
wmap "J0825+0309_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.011 x 4.301 at 4.865 degrees (North through East)
! Clean map  min=-0.0025876  max=0.59056 Jy/beam
! Writing clean map to FITS file: J0825+0309_S_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.590563 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000648015 
device "J0825+0309_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J0825+0309_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.329185 0.329185 0.65837 1.31674 2.63348 5.26696 10.5339 21.0678 42.1357 84.2714
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.59 
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.011 x 4.301 at 4.865 degrees (North through East)
! Clean map  min=-0.0025876  max=0.59056 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0825+0309_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J0825+0309_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0825+0309_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 15:57:29 2007