! Started logfile: J1407+2827_S_2000_12_04_pus_uvs.log on Fri Oct 19 11:48:22 2007
obs J1407+2827_S_2000_12_04_pus_uva.fits
! Reading UV FITS file: J1407+2827_S_2000_12_04_pus_uva.fits
! AN table 1: 258 integrations on 190 of 190 possible baselines.
! AN table 2: 43 integrations on 190 of 190 possible baselines.
! AN table 3: 16 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.189905 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.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 2168 lines of history.
! 
! Reading 45752 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_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 3068 telescope corrections were flagged in sub-array 1.
!  A total of 530 telescope corrections were flagged in sub-array 2.
!  A total of 287 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 3068 telescope corrections were flagged in sub-array 1.
!  A total of 530 telescope corrections were flagged in sub-array 2.
!  A total of 287 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 3068 telescope corrections were flagged in sub-array 1.
!  A total of 530 telescope corrections were flagged in sub-array 2.
!  A total of 287 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 3069 telescope corrections were flagged in sub-array 1.
!  A total of 530 telescope corrections were flagged in sub-array 2.
!  A total of 287 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.816362Jy  sigma=0.006111
! Fit after  self-cal, rms=0.580745Jy  sigma=0.004376
! 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.107 mas, bmaj=3.082 mas, bpa=12.18 degrees
! Estimated noise=861.479 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.772563 Jy
! Component: 100  -  total flux cleaned = 1.05439 Jy
! Total flux subtracted in 100 components = 1.05439 Jy
! Clean residual min=-0.039034 max=0.134505 Jy/beam
! Clean residual mean=0.000015 rms=0.012951 Jy/beam
! Combined flux in latest and established models = 1.05439 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 20 components and 1.05439 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.495368Jy  sigma=0.003985
! Fit after  self-cal, rms=0.494569Jy  sigma=0.003982
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.158908 Jy
! Component: 100  -  total flux cleaned = 0.259192 Jy
! Total flux subtracted in 100 components = 0.259192 Jy
! Clean residual min=-0.029238 max=0.055885 Jy/beam
! Clean residual mean=-0.000115 rms=0.008017 Jy/beam
! Combined flux in latest and established models = 1.31358 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 36 components and 1.31358 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.419281Jy  sigma=0.003236
! Fit after  self-cal, rms=0.419036Jy  sigma=0.003235
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0668242 Jy
! Component: 100  -  total flux cleaned = 0.111328 Jy
! Total flux subtracted in 100 components = 0.111328 Jy
! Clean residual min=-0.027808 max=0.040108 Jy/beam
! Clean residual mean=-0.000171 rms=0.006997 Jy/beam
! Combined flux in latest and established models = 1.42491 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 41 components and 1.42491 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.405468Jy  sigma=0.003088
! Fit after  self-cal, rms=0.405371Jy  sigma=0.003087
! 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.639 mas, bmaj=3.756 mas, bpa=14.65 degrees
! Estimated noise=438.671 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.0480278 Jy
! Component: 100  -  total flux cleaned = 0.0662766 Jy
! Component: 150  -  total flux cleaned = 0.0749052 Jy
! Component: 200  -  total flux cleaned = 0.0780269 Jy
! Total flux subtracted in 200 components = 0.0780269 Jy
! Clean residual min=-0.028576 max=0.033624 Jy/beam
! Clean residual mean=-0.001716 rms=0.007382 Jy/beam
! Combined flux in latest and established models = 1.50293 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 47 components and 1.50293 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.401611Jy  sigma=0.003041
! Fit after  self-cal, rms=0.401503Jy  sigma=0.003041
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 144 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.02     GC        1.08     GG        1.00*    
!   HH        1.42     HN        1.03     KK        1.00*    KP        1.05     
!   LA        1.06     MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        0.96     NY        0.97     OV        0.98     PT        1.03     
!   SC        1.00     TS        1.00*    WF        1.08     WZ        1.04     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.08     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.00     KK        0.99     KP        1.07     
!   LA        1.08     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        1.08     NY       12.95     OV        1.00     PT        1.05     
!   SC        1.06     TS        1.00*    WF        1.01     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 144 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        1.03     GC        1.11     GG        1.00*    
!   HH        1.36     HN        1.02     KK        1.00*    KP        1.04     
!   LA        1.02     MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        0.94     NY        0.97     OV        0.93     PT        1.04     
!   SC        0.95     TS        1.00*    WF        1.18     WZ        1.05     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.06     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.97     KP        1.02     
!   LA        1.03     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.02     NY       10.72     OV        0.96     PT        1.04     
!   SC        1.04     TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 144 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.78     FD        0.93     GC        1.11     GG        1.00*    
!   HH        1.26     HN        1.13     KK        1.00*    KP        0.95     
!   LA        1.00     MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        0.95     NY        0.93     OV        0.93     PT        0.92     
!   SC        0.94     TS        1.00*    WF        0.95     WZ        0.91     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.77     FD        0.86     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        1.12     KK        0.99     KP        0.88     
!   LA        1.15     MA        1.00*    MC        1.00*    MK        1.05     
!   NL        1.56     NY       11.79     OV        0.79     PT        0.84     
!   SC        1.13     TS        1.00*    WF        1.00     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 144 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.01     GC        1.06     GG        1.00*    
!   HH        1.40     HN        1.02     KK        1.00*    KP        1.04     
!   LA        1.00     MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        0.95     NY        0.91     OV        0.95     PT        1.03     
!   SC        0.98     TS        1.00*    WF        1.05     WZ        1.06     
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        1.02     GC        1.00*    GG        1.00*    
!   HH        1.00*    HN        0.98     KK        0.95     KP        1.00     
!   LA        1.01     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        1.05     NY        8.66     OV        0.99     PT        1.04     
!   SC        1.06     TS        1.00*    WF        0.98     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
! 
! Fit before self-cal, rms=0.401503Jy  sigma=0.003041
! Fit after  self-cal, rms=0.484831Jy  sigma=0.002790
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.74 mas, bmaj=3.908 mas, bpa=8.413 degrees
! Estimated noise=451.607 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 (-6.5, -4.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0241772 Jy
! Component: 100  -  total flux cleaned = 0.0218387 Jy
! Component: 150  -  total flux cleaned = 0.0195637 Jy
! Component: 200  -  total flux cleaned = 0.0179941 Jy
! Total flux subtracted in 200 components = 0.017994 Jy
! Clean residual min=-0.023431 max=0.024059 Jy/beam
! Clean residual mean=-0.000237 rms=0.006029 Jy/beam
! Combined flux in latest and established models = 1.52093 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 63 components and 1.52093 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.483224Jy  sigma=0.002776
! Fit after  self-cal, rms=0.483784Jy  sigma=0.002774
! 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.483784Jy  sigma=0.002774
! Fit after  self-cal, rms=0.463905Jy  sigma=0.002506
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.742 mas, bmaj=3.908 mas, bpa=8.14 degrees
! Estimated noise=450.859 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0134282 Jy
! Component: 100  -  total flux cleaned = 0.0140976 Jy
! Component: 150  -  total flux cleaned = 0.0149148 Jy
! Component: 200  -  total flux cleaned = 0.0156361 Jy
! Total flux subtracted in 200 components = 0.0156361 Jy
! Clean residual min=-0.006775 max=0.007635 Jy/beam
! Clean residual mean=0.000474 rms=0.001952 Jy/beam
! Combined flux in latest and established models = 1.53656 Jy
selfcal
! Performing phase self-cal
! Adding 14 model components to the UV plane model.
! The established model now contains 72 components and 1.53656 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.463291Jy  sigma=0.002500
! Fit after  self-cal, rms=0.463109Jy  sigma=0.002499
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.0029343 Jy
! Component: 100  -  total flux cleaned = 0.00312336 Jy
! Component: 150  -  total flux cleaned = 0.00349695 Jy
! Component: 200  -  total flux cleaned = 0.00399358 Jy
! Total flux subtracted in 200 components = 0.00399358 Jy
! Clean residual min=-0.006950 max=0.007089 Jy/beam
! Clean residual mean=0.000399 rms=0.001868 Jy/beam
! Combined flux in latest and established models = 1.54056 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 76 components and 1.54056 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.462915Jy  sigma=0.002498
! Fit after  self-cal, rms=0.462934Jy  sigma=0.002498
! 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.462934Jy  sigma=0.002498
! Fit after  self-cal, rms=0.465794Jy  sigma=0.002495
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.722 mas, bmaj=3.895 mas, bpa=9.069 degrees
! Estimated noise=450.15 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00537919 Jy
! Component: 100  -  total flux cleaned = 0.00598002 Jy
! Component: 150  -  total flux cleaned = 0.0063366 Jy
! Component: 200  -  total flux cleaned = 0.0068178 Jy
! Total flux subtracted in 200 components = 0.0068178 Jy
! Clean residual min=-0.005909 max=0.006223 Jy/beam
! Clean residual mean=0.000394 rms=0.001468 Jy/beam
! Combined flux in latest and established models = 1.54737 Jy
selfcal
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 80 components and 1.54737 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.465601Jy  sigma=0.002493
! Fit after  self-cal, rms=0.465652Jy  sigma=0.002493
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 (-33.5, -13.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00641368 Jy
! Component: 100  -  total flux cleaned = 0.00983219 Jy
! Component: 150  -  total flux cleaned = 0.0106965 Jy
! Component: 200  -  total flux cleaned = 0.0112299 Jy
! Total flux subtracted in 200 components = 0.0112299 Jy
! Clean residual min=-0.005559 max=0.004812 Jy/beam
! Clean residual mean=0.000223 rms=0.001325 Jy/beam
! Combined flux in latest and established models = 1.5586 Jy
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 95 components and 1.5586 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.465512Jy  sigma=0.002492
! Fit after  self-cal, rms=0.465518Jy  sigma=0.002492
! 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.465518Jy  sigma=0.002492
! Fit after  self-cal, rms=0.468726Jy  sigma=0.002491
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.494 mas, bmaj=9.164 mas, bpa=18.16 degrees
! Estimated noise=558.892 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00442055 Jy
! Component: 100  -  total flux cleaned = 0.00733433 Jy
! Component: 150  -  total flux cleaned = 0.00932562 Jy
! Component: 200  -  total flux cleaned = 0.00987176 Jy
! Total flux subtracted in 200 components = 0.00987176 Jy
! Clean residual min=-0.004581 max=0.004670 Jy/beam
! Clean residual mean=0.000223 rms=0.001513 Jy/beam
! Combined flux in latest and established models = 1.56848 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 110 components and 1.56848 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.468703Jy  sigma=0.002491
! Fit after  self-cal, rms=0.468717Jy  sigma=0.002491
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.00127605 Jy
! Component: 100  -  total flux cleaned = 0.00159707 Jy
! Component: 150  -  total flux cleaned = 0.00173913 Jy
! Component: 200  -  total flux cleaned = 0.00178189 Jy
! Total flux subtracted in 200 components = 0.00178189 Jy
! Clean residual min=-0.004497 max=0.004509 Jy/beam
! Clean residual mean=0.000154 rms=0.001495 Jy/beam
! Combined flux in latest and established models = 1.57026 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 116 components and 1.57026 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.468709Jy  sigma=0.002491
! Fit after  self-cal, rms=0.468708Jy  sigma=0.002491
! 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.707 mas, bmaj=3.884 mas, bpa=9.796 degrees
! Estimated noise=449.84 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.707 x 3.884 at 9.796 degrees (North through East)
! Clean map  min=-0.0051456  max=1.0395 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.468708Jy  sigma=0.002491
! Fit after  self-cal, rms=0.720639Jy  sigma=0.001879
! Inverting map and beam 
! Estimated beam: bmin=2.715 mas, bmaj=3.887 mas, bpa=9.334 degrees
! Estimated noise=449.723 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000447901 Jy
! Component: 100  -  total flux cleaned = -0.000578986 Jy
! Component: 150  -  total flux cleaned = -0.000579746 Jy
! Component: 200  -  total flux cleaned = -0.000369042 Jy
! Total flux subtracted in 200 components = -0.000369042 Jy
! Clean residual min=-0.004417 max=0.004450 Jy/beam
! Clean residual mean=0.000107 rms=0.001056 Jy/beam
! Combined flux in latest and established models = 1.56989 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 122 components and 1.56989 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.720596Jy  sigma=0.001879
! Fit after  self-cal, rms=0.720631Jy  sigma=0.001879
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000419564 Jy
! Component: 100  -  total flux cleaned = 0.00060676 Jy
! Component: 150  -  total flux cleaned = 0.000778207 Jy
! Component: 200  -  total flux cleaned = 0.000776278 Jy
! Total flux subtracted in 200 components = 0.000776278 Jy
! Clean residual min=-0.004380 max=0.004346 Jy/beam
! Clean residual mean=0.000095 rms=0.001035 Jy/beam
! Combined flux in latest and established models = 1.57067 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 129 components and 1.57067 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.720603Jy  sigma=0.001878
! Fit after  self-cal, rms=0.720626Jy  sigma=0.001878
! 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.720626Jy  sigma=0.001878
! Fit after  self-cal, rms=0.740153Jy  sigma=0.001878
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.126 mas, bmaj=3.301 mas, bpa=9.171 degrees
! Estimated noise=931.435 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.81152 Jy
! Component: 100  -  total flux cleaned = 1.09504 Jy
! Component: 150  -  total flux cleaned = 1.24355 Jy
! Component: 200  -  total flux cleaned = 1.32889 Jy
! Total flux subtracted in 200 components = 1.32889 Jy
! Clean residual min=-0.015036 max=0.045754 Jy/beam
! Clean residual mean=0.000140 rms=0.004925 Jy/beam
! Combined flux in latest and established models = 1.32889 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 36 model components to the UV plane model.
! The established model now contains 36 components and 1.32889 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.707 mas, bmaj=3.883 mas, bpa=9.79 degrees
! Estimated noise=449.425 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.0852383 Jy
! Component: 100  -  total flux cleaned = 0.135628 Jy
! Component: 150  -  total flux cleaned = 0.166671 Jy
! Component: 200  -  total flux cleaned = 0.186502 Jy
! Total flux subtracted in 200 components = 0.186502 Jy
! Clean residual min=-0.005364 max=0.012635 Jy/beam
! Clean residual mean=0.000977 rms=0.001960 Jy/beam
! Combined flux in latest and established models = 1.51539 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 56 components and 1.51539 Jy
! Inverting map 
! Added new window around map position (-2, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0137272 Jy
! Component: 100  -  total flux cleaned = 0.0229269 Jy
! Component: 150  -  total flux cleaned = 0.0265183 Jy
! Component: 200  -  total flux cleaned = 0.0294425 Jy
! Total flux subtracted in 200 components = 0.0294425 Jy
! Clean residual min=-0.004374 max=0.005638 Jy/beam
! Clean residual mean=0.000478 rms=0.001312 Jy/beam
! Combined flux in latest and established models = 1.54484 Jy
! Adding 32 model components to the UV plane model.
! The established model now contains 82 components and 1.54484 Jy
! Inverting map 
! Added new window around map position (4.5, -0.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00374601 Jy
! Component: 100  -  total flux cleaned = 0.00638621 Jy
! Component: 150  -  total flux cleaned = 0.00856566 Jy
! Component: 200  -  total flux cleaned = 0.010187 Jy
! Total flux subtracted in 200 components = 0.010187 Jy
! Clean residual min=-0.004156 max=0.004148 Jy/beam
! Clean residual mean=0.000310 rms=0.001150 Jy/beam
! Combined flux in latest and established models = 1.55502 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 97 components and 1.55502 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.492 mas, bmaj=9.17 mas, bpa=17.88 degrees
! Estimated noise=558.295 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00562634 Jy
! Component: 100  -  total flux cleaned = 0.00894667 Jy
! Component: 150  -  total flux cleaned = 0.0103483 Jy
! Component: 200  -  total flux cleaned = 0.011601 Jy
! Total flux subtracted in 200 components = 0.011601 Jy
! Clean residual min=-0.004217 max=0.004422 Jy/beam
! Clean residual mean=0.000303 rms=0.001253 Jy/beam
! Combined flux in latest and established models = 1.56663 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.000884898 Jy
! Component: 100  -  total flux cleaned = 0.00169868 Jy
! Component: 150  -  total flux cleaned = 0.00217005 Jy
! Component: 200  -  total flux cleaned = 0.00238593 Jy
! Total flux subtracted in 200 components = 0.00238593 Jy
! Clean residual min=-0.004071 max=0.004370 Jy/beam
! Clean residual mean=0.000209 rms=0.001195 Jy/beam
! Combined flux in latest and established models = 1.56901 Jy
! Adding 50 model components to the UV plane model.
! The established model now contains 141 components and 1.56901 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.707 mas, bmaj=3.883 mas, bpa=9.79 degrees
! Estimated noise=449.425 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000916049 Jy
! Component: 100  -  total flux cleaned = -0.000364115 Jy
! Component: 150  -  total flux cleaned = 1.80305e-05 Jy
! Component: 200  -  total flux cleaned = 0.000248101 Jy
! Total flux subtracted in 200 components = 0.000248101 Jy
! Clean residual min=-0.003920 max=0.003980 Jy/beam
! Clean residual mean=0.000084 rms=0.000995 Jy/beam
! Combined flux in latest and established models = 1.56926 Jy
selfcal
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 149 components and 1.56926 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.740059Jy  sigma=0.001879
! Fit after  self-cal, rms=0.740522Jy  sigma=0.001879
wmodel J1407+2827_S_2000_12_04_pus_map.mod
! Writing 149 model components to file: J1407+2827_S_2000_12_04_pus_map.mod
wobs J1407+2827_S_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J1407+2827_S_2000_12_04_pus_uvs.fits
wwins J1407+2827_S_2000_12_04_pus_map.win
! wwins: Wrote 5 windows to J1407+2827_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.000360931 Jy
! Component: 100  -  total flux cleaned = -0.000629901 Jy
! Component: 150  -  total flux cleaned = -0.000818902 Jy
! Component: 200  -  total flux cleaned = -0.000939509 Jy
! Component: 250  -  total flux cleaned = -0.00105655 Jy
! Component: 300  -  total flux cleaned = -0.00111307 Jy
! Component: 350  -  total flux cleaned = -0.00111262 Jy
! Component: 400  -  total flux cleaned = -0.00100489 Jy
! Component: 450  -  total flux cleaned = -0.000951987 Jy
! Component: 500  -  total flux cleaned = -0.00089968 Jy
! Component: 550  -  total flux cleaned = -0.000848588 Jy
! Component: 600  -  total flux cleaned = -0.00089854 Jy
! Component: 650  -  total flux cleaned = -0.00084942 Jy
! Component: 700  -  total flux cleaned = -0.000897795 Jy
! Component: 750  -  total flux cleaned = -0.00089749 Jy
! Component: 800  -  total flux cleaned = -0.000990715 Jy
! Component: 850  -  total flux cleaned = -0.000944845 Jy
! Component: 900  -  total flux cleaned = -0.00108109 Jy
! Component: 950  -  total flux cleaned = -0.00112557 Jy
! Component: 1000  -  total flux cleaned = -0.00112528 Jy
! Component: 1050  -  total flux cleaned = -0.00108117 Jy
! Component: 1100  -  total flux cleaned = -0.0011244 Jy
! Component: 1150  -  total flux cleaned = -0.00108166 Jy
! Component: 1200  -  total flux cleaned = -0.00112386 Jy
! Component: 1250  -  total flux cleaned = -0.00104029 Jy
! Component: 1300  -  total flux cleaned = -0.00112287 Jy
! Component: 1350  -  total flux cleaned = -0.0010412 Jy
! Component: 1400  -  total flux cleaned = -0.00108145 Jy
! Component: 1450  -  total flux cleaned = -0.000961473 Jy
! Component: 1500  -  total flux cleaned = -0.000922215 Jy
! Component: 1550  -  total flux cleaned = -0.000804942 Jy
! Component: 1600  -  total flux cleaned = -0.000843877 Jy
! Component: 1650  -  total flux cleaned = -0.000766586 Jy
! Component: 1700  -  total flux cleaned = -0.000651914 Jy
! Component: 1750  -  total flux cleaned = -0.00061415 Jy
! Component: 1800  -  total flux cleaned = -0.000614032 Jy
! Component: 1850  -  total flux cleaned = -0.000576257 Jy
! Component: 1900  -  total flux cleaned = -0.000502182 Jy
! Component: 1950  -  total flux cleaned = -0.000392222 Jy
! Component: 2000  -  total flux cleaned = -0.000283449 Jy
! Total flux subtracted in 2048 components = -0.000319524 Jy
! Clean residual min=-0.001795 max=0.001898 Jy/beam
! Clean residual mean=0.000073 rms=0.000669 Jy/beam
! Combined flux in latest and established models = 1.56894 Jy
keep
! Adding 145 model components to the UV plane model.
! The established model now contains 292 components and 1.56894 Jy
![Exited script file: muppet]
wmap "J1407+2827_S_2000_12_04_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.707 x 3.883 at 9.79 degrees (North through East)
! Clean map  min=-0.0034115  max=1.0503 Jy/beam
! Writing clean map to FITS file: J1407+2827_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.05026 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000665755 
device "J1407+2827_S_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J1407+2827_S_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.190168 0.190168 0.380336 0.760673 1.52135 3.04269 6.08538 12.1708 24.3415 48.6831 97.3661
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0019 
print "peak=",int(1000*peak_flux)/1000
! peak= 1.05 
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.707 x 3.883 at 9.79 degrees (North through East)
! Clean map  min=-0.0034115  max=1.0503 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1407+2827_S_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J1407+2827_S_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1407+2827_S_2000_12_04_pus_uvs.log closed on Fri Oct 19 11:48:41 2007