! Started logfile: J1407+2827_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:05:47 2007
obs J1407+2827_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J1407+2827_S_2001_04_09_pus_uva.fits
! AN table 1: 71 integrations on 190 of 190 possible baselines.
! AN table 2: 102 integrations on 190 of 190 possible baselines.
! AN table 3: 113 integrations on 190 of 190 possible baselines.
! AN table 4: 119 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.16655 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1407+2827
! 
! 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 51264 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 J1407+2827_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 775 telescope corrections were flagged in sub-array 1.
!  A total of 1511 telescope corrections were flagged in sub-array 2.
!  A total of 1365 telescope corrections were flagged in sub-array 3.
!  A total of 2072 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 775 telescope corrections were flagged in sub-array 1.
!  A total of 1511 telescope corrections were flagged in sub-array 2.
!  A total of 1365 telescope corrections were flagged in sub-array 3.
!  A total of 2072 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 775 telescope corrections were flagged in sub-array 1.
!  A total of 1511 telescope corrections were flagged in sub-array 2.
!  A total of 1365 telescope corrections were flagged in sub-array 3.
!  A total of 2072 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 775 telescope corrections were flagged in sub-array 1.
!  A total of 1511 telescope corrections were flagged in sub-array 2.
!  A total of 1365 telescope corrections were flagged in sub-array 3.
!  A total of 2072 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.164784Jy  sigma=0.008762
! Fit after  self-cal, rms=0.514162Jy  sigma=0.003679
! 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.952 mas, bmaj=3.09 mas, bpa=-1 degrees
! Estimated noise=728.06 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.715794 Jy
! Component: 100  -  total flux cleaned = 0.983499 Jy
! Total flux subtracted in 100 components = 0.983499 Jy
! Clean residual min=-0.030162 max=0.134764 Jy/beam
! Clean residual mean=0.000126 rms=0.010199 Jy/beam
! Combined flux in latest and established models = 0.983499 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 13 components and 0.983499 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.478021Jy  sigma=0.003497
! Fit after  self-cal, rms=0.477401Jy  sigma=0.003494
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.167529 Jy
! Component: 100  -  total flux cleaned = 0.279367 Jy
! Total flux subtracted in 100 components = 0.279367 Jy
! Clean residual min=-0.025890 max=0.064982 Jy/beam
! Clean residual mean=0.000011 rms=0.006580 Jy/beam
! Combined flux in latest and established models = 1.26287 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 23 components and 1.26287 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385256Jy  sigma=0.002513
! Fit after  self-cal, rms=0.384891Jy  sigma=0.002512
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0777891 Jy
! Component: 100  -  total flux cleaned = 0.132532 Jy
! Total flux subtracted in 100 components = 0.132532 Jy
! Clean residual min=-0.024074 max=0.057794 Jy/beam
! Clean residual mean=-0.000045 rms=0.005423 Jy/beam
! Combined flux in latest and established models = 1.3954 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 30 components and 1.3954 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.363302Jy  sigma=0.002254
! Fit after  self-cal, rms=0.363206Jy  sigma=0.002254
! Inverting map 
! Added new window around map position (-6, -4).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0520557 Jy
! Component: 100  -  total flux cleaned = 0.0855548 Jy
! Total flux subtracted in 100 components = 0.0855548 Jy
! Clean residual min=-0.022454 max=0.029884 Jy/beam
! Clean residual mean=-0.000084 rms=0.004867 Jy/beam
! Combined flux in latest and established models = 1.48095 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 39 components and 1.48095 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.354723Jy  sigma=0.002160
! Fit after  self-cal, rms=0.354300Jy  sigma=0.002155
! 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.407 mas, bmaj=3.877 mas, bpa=-6.798 degrees
! Estimated noise=411.903 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.0306254 Jy
! Component: 100  -  total flux cleaned = 0.048448 Jy
! Component: 150  -  total flux cleaned = 0.0556621 Jy
! Component: 200  -  total flux cleaned = 0.0586478 Jy
! Total flux subtracted in 200 components = 0.0586478 Jy
! Clean residual min=-0.028447 max=0.021568 Jy/beam
! Clean residual mean=-0.002396 rms=0.007344 Jy/beam
! Combined flux in latest and established models = 1.5396 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 50 components and 1.5396 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.351329Jy  sigma=0.002124
! Fit after  self-cal, rms=0.351148Jy  sigma=0.002122
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.09     FD        1.05     GC        1.04     GG        1.00*    
!   HH        1.00*    HN        1.62     KK        0.98     KP        0.56     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        0.93     
!   NL        1.06     NY        1.00     OV        1.03     PT        1.00     
!   SC        1.00*    TS        0.99     WF        1.15     WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.11     FD        1.10     GC        1.30     GG        1.00*    
!   HH        1.29     HN        1.08     KK        1.00*    KP        1.04     
!   LA        1.08     MA        1.06     MC        3.17     MK        1.00*    
!   NL        1.05     NY        0.98     OV        1.00*    PT        1.06     
!   SC        0.95     TS        1.00*    WF        0.99     WZ        1.05     
! 
!  A total of 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.98     GC        1.03     GG        1.00*    
!   HH        1.39     HN        0.95     KK        1.03     KP        0.88     
!   LA        0.97     MA        0.86     MC        1.06     MK        0.99     
!   NL        0.98     NY        1.01     OV        1.02     PT        0.96     
!   SC        0.98     TS        1.00*    WF        1.03     WZ        1.33     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.96     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.01     KP        0.87     
!   LA        0.94     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        0.96     NY        1.00     OV        0.99     PT        0.92     
!   SC        1.05     TS        1.04     WF        0.99     WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        1.01     GC        0.99     GG        1.00*    
!   HH        1.00*    HN        1.63     KK        0.97     KP        0.57     
!   LA        1.05     MA        1.00*    MC        1.00*    MK        0.93     
!   NL        1.06     NY        1.00     OV        0.98     PT        1.02     
!   SC        1.00*    TS        1.03     WF        1.11     WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.09     FD        1.07     GC        1.26     GG        1.00*    
!   HH        1.73     HN        1.03     KK        1.00*    KP        1.09     
!   LA        1.10     MA        0.94     MC       13.03     MK        1.00*    
!   NL        1.04     NY        0.97     OV        1.00*    PT        1.10     
!   SC        0.97     TS        1.00*    WF        1.02     WZ        1.03     
! 
!  A total of 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.96     GC        1.00     GG        1.00*    
!   HH        1.61     HN        0.95     KK        1.01     KP        1.08     
!   LA        0.99     MA        0.84     MC        1.51     MK        1.00     
!   NL        0.98     NY        1.02     OV        0.99     PT        0.98     
!   SC        0.97     TS        1.00*    WF        1.04     WZ        1.29     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.94     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.00     KP        0.95     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        0.96     NY        1.05     OV        0.95     PT        0.94     
!   SC        1.05     TS        1.07     WF        1.03     WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.06     FD        1.01     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.61     KK        0.96     KP        0.70     
!   LA        0.97     MA        1.00*    MC        1.00*    MK        0.88     
!   NL        1.04     NY        0.99     OV        0.97     PT        1.01     
!   SC        1.00*    TS        1.00     WF        1.12     WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.12     FD        1.07     GC        1.20     GG        1.00*    
!   HH        1.65     HN        1.09     KK        1.00*    KP        1.14     
!   LA        1.03     MA        1.00     MC        7.22     MK        1.00*    
!   NL        1.03     NY        0.95     OV        1.00*    PT        1.08     
!   SC        0.94     TS        1.00*    WF        1.00     WZ        1.02     
! 
!  A total of 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        0.96     GC        0.98     GG        1.00*    
!   HH        1.35     HN        0.97     KK        0.99     KP        0.98     
!   LA        0.94     MA        0.84     MC        1.04     MK        0.95     
!   NL        0.96     NY        0.99     OV        0.97     PT        0.98     
!   SC        0.95     TS        1.00*    WF        1.02     WZ        1.25     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.94     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.98     KP        0.94     
!   LA        0.90     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        0.96     NY        1.00     OV        0.94     PT        0.93     
!   SC        1.02     TS        1.04     WF        1.03     WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 18 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.00     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.62     KK        0.94     KP        0.60     
!   LA        1.02     MA        1.00*    MC        1.00*    MK        0.87     
!   NL        1.03     NY        1.02     OV        0.97     PT        1.03     
!   SC        1.00*    TS        0.95     WF        1.10     WZ        1.00*    
! 
!  A total of 27 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.07     FD        1.07     GC        1.24     GG        1.00*    
!   HH        1.46     HN        1.04     KK        1.00*    KP        1.11     
!   LA        1.07     MA        0.95     MC        0.87     MK        1.00*    
!   NL        1.02     NY        0.92     OV        1.00*    PT        1.09     
!   SC        0.95     TS        1.00*    WF        1.02     WZ        1.04     
! 
!  A total of 39 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.95     FD        0.96     GC        1.01     GG        1.00*    
!   HH        1.80     HN        0.97     KK        0.97     KP        0.95     
!   LA        0.97     MA        0.65     MC        2.13     MK        0.94     
!   NL        0.96     NY        1.02     OV        0.97     PT        1.08     
!   SC        0.95     TS        1.00*    WF        1.04     WZ        1.24     
! 
!  A total of 6 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.92     FD        0.95     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.95     KP        0.91     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.92     
!   NL        0.95     NY        1.05     OV        0.94     PT        1.05     
!   SC        1.03     TS        1.01     WF        1.03     WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.351148Jy  sigma=0.002122
! Fit after  self-cal, rms=0.347918Jy  sigma=0.001490
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.44 mas, bmaj=4.01 mas, bpa=-6.635 degrees
! Estimated noise=419.443 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.00093231 Jy
! Component: 100  -  total flux cleaned = 0.00110547 Jy
! Component: 150  -  total flux cleaned = 0.00111328 Jy
! Component: 200  -  total flux cleaned = 0.00110922 Jy
! Total flux subtracted in 200 components = 0.00110922 Jy
! Clean residual min=-0.007225 max=0.004488 Jy/beam
! Clean residual mean=0.000010 rms=0.001302 Jy/beam
! Combined flux in latest and established models = 1.54071 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 57 components and 1.54071 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347753Jy  sigma=0.001488
! Fit after  self-cal, rms=0.348983Jy  sigma=0.001487
! 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.348983Jy  sigma=0.001487
! Fit after  self-cal, rms=0.352732Jy  sigma=0.001475
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.438 mas, bmaj=4.013 mas, bpa=-6.538 degrees
! Estimated noise=420.164 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00137075 Jy
! Component: 100  -  total flux cleaned = 0.00136139 Jy
! Component: 150  -  total flux cleaned = 0.00136243 Jy
! Component: 200  -  total flux cleaned = 0.00147732 Jy
! Total flux subtracted in 200 components = 0.00147732 Jy
! Clean residual min=-0.006783 max=0.004103 Jy/beam
! Clean residual mean=-0.000017 rms=0.001140 Jy/beam
! Combined flux in latest and established models = 1.54219 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 60 components and 1.54219 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352616Jy  sigma=0.001473
! Fit after  self-cal, rms=0.352626Jy  sigma=0.001473
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.000425714 Jy
! Component: 100  -  total flux cleaned = -0.000315175 Jy
! Component: 150  -  total flux cleaned = -0.000316869 Jy
! Component: 200  -  total flux cleaned = -0.000317963 Jy
! Total flux subtracted in 200 components = -0.000317963 Jy
! Clean residual min=-0.006569 max=0.004052 Jy/beam
! Clean residual mean=-0.000014 rms=0.001130 Jy/beam
! Combined flux in latest and established models = 1.54187 Jy
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 62 components and 1.54187 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352569Jy  sigma=0.001473
! Fit after  self-cal, rms=0.352567Jy  sigma=0.001473
! 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.352567Jy  sigma=0.001473
! Fit after  self-cal, rms=0.352770Jy  sigma=0.001472
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.435 mas, bmaj=4.014 mas, bpa=-6.456 degrees
! Estimated noise=421.035 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00238528 Jy
! Component: 100  -  total flux cleaned = 0.00237593 Jy
! Component: 150  -  total flux cleaned = 0.00237122 Jy
! Component: 200  -  total flux cleaned = 0.00237145 Jy
! Total flux subtracted in 200 components = 0.00237145 Jy
! Clean residual min=-0.006590 max=0.003876 Jy/beam
! Clean residual mean=-0.000012 rms=0.001103 Jy/beam
! Combined flux in latest and established models = 1.54424 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 64 components and 1.54424 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352689Jy  sigma=0.001472
! Fit after  self-cal, rms=0.352694Jy  sigma=0.001472
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.000212975 Jy
! Component: 100  -  total flux cleaned = -0.000299703 Jy
! Component: 150  -  total flux cleaned = -0.000302092 Jy
! Component: 200  -  total flux cleaned = -0.000376691 Jy
! Total flux subtracted in 200 components = -0.000376691 Jy
! Clean residual min=-0.006447 max=0.003837 Jy/beam
! Clean residual mean=-0.000009 rms=0.001095 Jy/beam
! Combined flux in latest and established models = 1.54386 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 65 components and 1.54386 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.352654Jy  sigma=0.001471
! Fit after  self-cal, rms=0.352654Jy  sigma=0.001471
! 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.352654Jy  sigma=0.001471
! Fit after  self-cal, rms=0.353257Jy  sigma=0.001471
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.366 mas, bmaj=8.772 mas, bpa=-0.8815 degrees
! Estimated noise=598.18 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00132946 Jy
! Component: 100  -  total flux cleaned = 0.00149336 Jy
! Component: 150  -  total flux cleaned = 0.00153969 Jy
! Component: 200  -  total flux cleaned = 0.0015413 Jy
! Total flux subtracted in 200 components = 0.0015413 Jy
! Clean residual min=-0.007445 max=0.007256 Jy/beam
! Clean residual mean=0.000015 rms=0.002224 Jy/beam
! Combined flux in latest and established models = 1.54541 Jy
selfcal
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 71 components and 1.54541 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353230Jy  sigma=0.001471
! Fit after  self-cal, rms=0.353233Jy  sigma=0.001471
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.000234712 Jy
! Component: 100  -  total flux cleaned = 0.000166786 Jy
! Component: 150  -  total flux cleaned = 0.000107617 Jy
! Component: 200  -  total flux cleaned = 0.000108675 Jy
! Total flux subtracted in 200 components = 0.000108675 Jy
! Clean residual min=-0.007437 max=0.007252 Jy/beam
! Clean residual mean=0.000012 rms=0.002222 Jy/beam
! Combined flux in latest and established models = 1.54551 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 72 components and 1.54551 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.353227Jy  sigma=0.001471
! Fit after  self-cal, rms=0.353227Jy  sigma=0.001471
! 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.433 mas, bmaj=4.015 mas, bpa=-6.408 degrees
! Estimated noise=422.028 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.433 x 4.015 at -6.408 degrees (North through East)
! Clean map  min=-0.0038482  max=1.043 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.353227Jy  sigma=0.001471
! Fit after  self-cal, rms=0.421823Jy  sigma=0.001280
! Inverting map and beam 
! Estimated beam: bmin=2.433 mas, bmaj=4.018 mas, bpa=-6.369 degrees
! Estimated noise=421.478 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000970975 Jy
! Component: 100  -  total flux cleaned = -0.0012301 Jy
! Component: 150  -  total flux cleaned = -0.00138176 Jy
! Component: 200  -  total flux cleaned = -0.00152084 Jy
! Total flux subtracted in 200 components = -0.00152084 Jy
! Clean residual min=-0.006643 max=0.004210 Jy/beam
! Clean residual mean=0.000069 rms=0.000850 Jy/beam
! Combined flux in latest and established models = 1.54399 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 74 components and 1.54399 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.421790Jy  sigma=0.001279
! Fit after  self-cal, rms=0.421797Jy  sigma=0.001279
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000376906 Jy
! Component: 100  -  total flux cleaned = -0.000377573 Jy
! Component: 150  -  total flux cleaned = -0.000505066 Jy
! Component: 200  -  total flux cleaned = -0.000505778 Jy
! Total flux subtracted in 200 components = -0.000505778 Jy
! Clean residual min=-0.006534 max=0.004203 Jy/beam
! Clean residual mean=0.000073 rms=0.000841 Jy/beam
! Combined flux in latest and established models = 1.54349 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 77 components and 1.54349 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.421772Jy  sigma=0.001279
! Fit after  self-cal, rms=0.421774Jy  sigma=0.001279
! 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.421774Jy  sigma=0.001279
! Fit after  self-cal, rms=0.422173Jy  sigma=0.001279
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.985 mas, bmaj=3.259 mas, bpa=-2.238 degrees
! Estimated noise=751.994 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.741114 Jy
! Component: 100  -  total flux cleaned = 1.00371 Jy
! Component: 150  -  total flux cleaned = 1.16122 Jy
! Component: 200  -  total flux cleaned = 1.26402 Jy
! Total flux subtracted in 200 components = 1.26402 Jy
! Clean residual min=-0.014877 max=0.056578 Jy/beam
! Clean residual mean=0.000113 rms=0.004530 Jy/beam
! Combined flux in latest and established models = 1.26402 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 25 model components to the UV plane model.
! The established model now contains 25 components and 1.26402 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.433 mas, bmaj=4.02 mas, bpa=-6.352 degrees
! Estimated noise=421.68 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.108093 Jy
! Component: 100  -  total flux cleaned = 0.171337 Jy
! Component: 150  -  total flux cleaned = 0.20986 Jy
! Component: 200  -  total flux cleaned = 0.234087 Jy
! Total flux subtracted in 200 components = 0.234087 Jy
! Clean residual min=-0.004460 max=0.013109 Jy/beam
! Clean residual mean=0.000492 rms=0.001534 Jy/beam
! Combined flux in latest and established models = 1.49811 Jy
! Adding 32 model components to the UV plane model.
! The established model now contains 45 components and 1.49811 Jy
! Inverting map 
! Added new window around map position (-2, 0).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.015606 Jy
! Component: 100  -  total flux cleaned = 0.0205777 Jy
! Component: 150  -  total flux cleaned = 0.023628 Jy
! Component: 200  -  total flux cleaned = 0.0262892 Jy
! Total flux subtracted in 200 components = 0.0262892 Jy
! Clean residual min=-0.005227 max=0.005939 Jy/beam
! Clean residual mean=0.000250 rms=0.000996 Jy/beam
! Combined flux in latest and established models = 1.5244 Jy
! Adding 23 model components to the UV plane model.
! The established model now contains 56 components and 1.5244 Jy
! Inverting map 
! Added new window around map position (-4, -7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00275442 Jy
! Component: 100  -  total flux cleaned = 0.00435452 Jy
! Component: 150  -  total flux cleaned = 0.00508659 Jy
! Component: 200  -  total flux cleaned = 0.0057728 Jy
! Total flux subtracted in 200 components = 0.0057728 Jy
! Clean residual min=-0.003656 max=0.004193 Jy/beam
! Clean residual mean=0.000197 rms=0.000889 Jy/beam
! Combined flux in latest and established models = 1.53017 Jy
! Adding 19 model components to the UV plane model.
! The established model now contains 64 components and 1.53017 Jy
! Inverting map 
! Added new window around map position (1, 7).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000897798 Jy
! Component: 100  -  total flux cleaned = 0.00130149 Jy
! Component: 150  -  total flux cleaned = 0.00188155 Jy
! Component: 200  -  total flux cleaned = 0.00259769 Jy
! Total flux subtracted in 200 components = 0.00259769 Jy
! Clean residual min=-0.003424 max=0.003796 Jy/beam
! Clean residual mean=0.000173 rms=0.000837 Jy/beam
! Combined flux in latest and established models = 1.53277 Jy
! Adding 17 model components to the UV plane model.
! The established model now contains 70 components and 1.53277 Jy
! Inverting map 
! Added new window around map position (-37.5, -13).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00150421 Jy
! Component: 100  -  total flux cleaned = 0.00231436 Jy
! Component: 150  -  total flux cleaned = 0.00277831 Jy
! Component: 200  -  total flux cleaned = 0.00351473 Jy
! Total flux subtracted in 200 components = 0.00351473 Jy
! Clean residual min=-0.003377 max=0.003278 Jy/beam
! Clean residual mean=0.000144 rms=0.000791 Jy/beam
! Combined flux in latest and established models = 1.53628 Jy
! Adding 20 model components to the UV plane model.
! The established model now contains 76 components and 1.53629 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.379 mas, bmaj=8.784 mas, bpa=-0.8725 degrees
! Estimated noise=596.679 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00467891 Jy
! Component: 100  -  total flux cleaned = 0.00742101 Jy
! Component: 150  -  total flux cleaned = 0.00932745 Jy
! Component: 200  -  total flux cleaned = 0.0107253 Jy
! Total flux subtracted in 200 components = 0.0107253 Jy
! Clean residual min=-0.003459 max=0.003136 Jy/beam
! Clean residual mean=0.000167 rms=0.001068 Jy/beam
! Combined flux in latest and established models = 1.54701 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.000923082 Jy
! Component: 100  -  total flux cleaned = 0.0013256 Jy
! Component: 150  -  total flux cleaned = 0.00152929 Jy
! Component: 200  -  total flux cleaned = 0.00171112 Jy
! Total flux subtracted in 200 components = 0.00171112 Jy
! Clean residual min=-0.003495 max=0.003113 Jy/beam
! Clean residual mean=0.000123 rms=0.001046 Jy/beam
! Combined flux in latest and established models = 1.54872 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 122 components and 1.54872 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.433 mas, bmaj=4.02 mas, bpa=-6.352 degrees
! Estimated noise=421.68 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00156193 Jy
! Component: 100  -  total flux cleaned = -0.00143056 Jy
! Component: 150  -  total flux cleaned = -0.00143003 Jy
! Component: 200  -  total flux cleaned = -0.00131129 Jy
! Total flux subtracted in 200 components = -0.00131129 Jy
! Clean residual min=-0.003262 max=0.002732 Jy/beam
! Clean residual mean=0.000053 rms=0.000729 Jy/beam
! Combined flux in latest and established models = 1.54741 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 130 components and 1.54741 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.422114Jy  sigma=0.001277
! Fit after  self-cal, rms=0.422068Jy  sigma=0.001277
wmodel J1407+2827_S_2001_04_09_pus_map.mod
! Writing 130 model components to file: J1407+2827_S_2001_04_09_pus_map.mod
wobs J1407+2827_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J1407+2827_S_2001_04_09_pus_uvs.fits
wwins J1407+2827_S_2001_04_09_pus_map.win
! wwins: Wrote 6 windows to J1407+2827_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.0012658 Jy
! Component: 100  -  total flux cleaned = -0.00172671 Jy
! Component: 150  -  total flux cleaned = -0.00192164 Jy
! Component: 200  -  total flux cleaned = -0.00206334 Jy
! Component: 250  -  total flux cleaned = -0.00215556 Jy
! Component: 300  -  total flux cleaned = -0.00215529 Jy
! Component: 350  -  total flux cleaned = -0.00206679 Jy
! Component: 400  -  total flux cleaned = -0.00215458 Jy
! Component: 450  -  total flux cleaned = -0.00215457 Jy
! Component: 500  -  total flux cleaned = -0.00206978 Jy
! Component: 550  -  total flux cleaned = -0.00202822 Jy
! Component: 600  -  total flux cleaned = -0.00194507 Jy
! Component: 650  -  total flux cleaned = -0.00190397 Jy
! Component: 700  -  total flux cleaned = -0.00182255 Jy
! Component: 750  -  total flux cleaned = -0.00166127 Jy
! Component: 800  -  total flux cleaned = -0.0017014 Jy
! Component: 850  -  total flux cleaned = -0.00154293 Jy
! Component: 900  -  total flux cleaned = -0.00150385 Jy
! Component: 950  -  total flux cleaned = -0.00142586 Jy
! Component: 1000  -  total flux cleaned = -0.00138736 Jy
! Component: 1050  -  total flux cleaned = -0.00134872 Jy
! Component: 1100  -  total flux cleaned = -0.00123437 Jy
! Component: 1150  -  total flux cleaned = -0.00108345 Jy
! Component: 1200  -  total flux cleaned = -0.00104609 Jy
! Component: 1250  -  total flux cleaned = -0.000897151 Jy
! Component: 1300  -  total flux cleaned = -0.000860428 Jy
! Component: 1350  -  total flux cleaned = -0.000823783 Jy
! Component: 1400  -  total flux cleaned = -0.000714114 Jy
! Component: 1450  -  total flux cleaned = -0.000641715 Jy
! Component: 1500  -  total flux cleaned = -0.000605676 Jy
! Component: 1550  -  total flux cleaned = -0.000498285 Jy
! Component: 1600  -  total flux cleaned = -0.000427012 Jy
! Component: 1650  -  total flux cleaned = -0.000356203 Jy
! Component: 1700  -  total flux cleaned = -0.000356072 Jy
! Component: 1750  -  total flux cleaned = -0.000216649 Jy
! Component: 1800  -  total flux cleaned = -0.000147437 Jy
! Component: 1850  -  total flux cleaned = -0.000113056 Jy
! Component: 1900  -  total flux cleaned = -0.000147428 Jy
! Component: 1950  -  total flux cleaned = -7.90828e-05 Jy
! Component: 2000  -  total flux cleaned = -1.12546e-05 Jy
! Total flux subtracted in 2048 components = 5.62013e-05 Jy
! Clean residual min=-0.001823 max=0.001944 Jy/beam
! Clean residual mean=0.000042 rms=0.000608 Jy/beam
! Combined flux in latest and established models = 1.54747 Jy
keep
! Adding 145 model components to the UV plane model.
! The established model now contains 269 components and 1.54747 Jy
![Exited script file: muppet]
wmap "J1407+2827_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.433 x 4.02 at -6.352 degrees (North through East)
! Clean map  min=-0.0028434  max=1.0456 Jy/beam
! Writing clean map to FITS file: J1407+2827_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 1.04563 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000607112 
device "J1407+2827_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J1407+2827_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.174185 0.174185 0.348371 0.696742 1.39348 2.78697 5.57393 11.1479 22.2957 44.5915 89.1829
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0018 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.045 
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.433 x 4.02 at -6.352 degrees (North through East)
! Clean map  min=-0.0028434  max=1.0456 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1407+2827_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J1407+2827_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1407+2827_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:06:09 2007