! Started logfile: J1357+7643_S_2000_05_22_pus_uvs.log on Mon Nov 19 18:48:38 2007
obs J1357+7643_S_2000_05_22_pus_uva.fits
! Reading UV FITS file: J1357+7643_S_2000_05_22_pus_uva.fits
! AN table 1: 707 integrations on 190 of 190 possible baselines.
! AN table 2: 208 integrations on 190 of 190 possible baselines.
! AN table 3: 116 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.214728 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1357+7643
! 
! 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 2003 lines of history.
! 
! Reading 168252 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 J1357+7643_S_2000_05_22_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 8391 telescope corrections were flagged in sub-array 1.
!  A total of 2480 telescope corrections were flagged in sub-array 2.
!  A total of 1166 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 8400 telescope corrections were flagged in sub-array 1.
!  A total of 2480 telescope corrections were flagged in sub-array 2.
!  A total of 1166 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 8391 telescope corrections were flagged in sub-array 1.
!  A total of 2480 telescope corrections were flagged in sub-array 2.
!  A total of 1166 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 8391 telescope corrections were flagged in sub-array 1.
!  A total of 2480 telescope corrections were flagged in sub-array 2.
!  A total of 1166 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.771307Jy  sigma=0.005643
! Fit after  self-cal, rms=0.569916Jy  sigma=0.004072
! 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.981 mas, bmaj=1.993 mas, bpa=25.75 degrees
! Estimated noise=566.813 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.40152 Jy
! Component: 100  -  total flux cleaned = 0.489099 Jy
! Total flux subtracted in 100 components = 0.489099 Jy
! Clean residual min=-0.007086 max=0.024881 Jy/beam
! Clean residual mean=0.000069 rms=0.001846 Jy/beam
! Combined flux in latest and established models = 0.489099 Jy
! Performing phase self-cal
! Adding 2 model components to the UV plane model.
! The established model now contains 2 components and 0.489099 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340604Jy  sigma=0.001532
! Fit after  self-cal, rms=0.340601Jy  sigma=0.001532
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0251281 Jy
! Component: 100  -  total flux cleaned = 0.0392588 Jy
! Total flux subtracted in 100 components = 0.0392588 Jy
! Clean residual min=-0.007247 max=0.010593 Jy/beam
! Clean residual mean=0.000048 rms=0.001695 Jy/beam
! Combined flux in latest and established models = 0.528358 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 11 components and 0.528358 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.337168Jy  sigma=0.001481
! Fit after  self-cal, rms=0.337135Jy  sigma=0.001481
! Inverting map 
! Added new window around map position (-2.5, -0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0114456 Jy
! Component: 100  -  total flux cleaned = 0.0193872 Jy
! Total flux subtracted in 100 components = 0.0193872 Jy
! Clean residual min=-0.007292 max=0.008262 Jy/beam
! Clean residual mean=0.000038 rms=0.001656 Jy/beam
! Combined flux in latest and established models = 0.547745 Jy
! Performing phase self-cal
! Adding 8 model components to the UV plane model.
! The established model now contains 16 components and 0.547745 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.336325Jy  sigma=0.001467
! Fit after  self-cal, rms=0.336296Jy  sigma=0.001467
! 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.454 mas, bmaj=2.614 mas, bpa=-43.3 degrees
! Estimated noise=225.368 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.0148076 Jy
! Component: 100  -  total flux cleaned = 0.0223318 Jy
! Component: 150  -  total flux cleaned = 0.0266093 Jy
! Component: 200  -  total flux cleaned = 0.0292396 Jy
! Total flux subtracted in 200 components = 0.0292396 Jy
! Clean residual min=-0.005755 max=0.005937 Jy/beam
! Clean residual mean=0.000131 rms=0.001045 Jy/beam
! Combined flux in latest and established models = 0.576984 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 33 components and 0.576984 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.335732Jy  sigma=0.001456
! Fit after  self-cal, rms=0.335705Jy  sigma=0.001456
! Inverting map 
! Added new window around map position (-4, -6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00472701 Jy
! Component: 100  -  total flux cleaned = 0.00581864 Jy
! Component: 150  -  total flux cleaned = 0.00663225 Jy
! Component: 200  -  total flux cleaned = 0.00693688 Jy
! Total flux subtracted in 200 components = 0.00693688 Jy
! Clean residual min=-0.005471 max=0.005009 Jy/beam
! Clean residual mean=0.000093 rms=0.001018 Jy/beam
! Combined flux in latest and established models = 0.583921 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 48 components and 0.583921 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.335500Jy  sigma=0.001454
! Fit after  self-cal, rms=0.335486Jy  sigma=0.001454
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 219 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.01     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        1.00     KP        1.02     
!   MA        0.46     MC        1.33     MK        1.03     NL        0.99     
!   NY        1.02     OV        1.01     PT        1.00     SC        1.12     
!   TS        0.99     WF        0.97     WZ        0.99     LA        0.99     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.00     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.01     KP        1.04     
!   MA        0.61     MC        0.96     MK        1.06     NL        1.02     
!   NY        1.04     OV        1.00     PT        0.99     SC        1.04     
!   TS        0.98     WF        1.08     WZ        1.00     LA        1.02     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        0.96     GC        1.07     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.97     KP        0.99     
!   MA        0.53     MC        1.00*    MK        1.01     NL        0.96     
!   NY        1.01     OV        1.01     PT        0.99     SC        1.01     
!   TS        1.00*    WF        0.81     WZ        1.03     LA        0.99     
! 
! 
! Correcting IF 2.
!  A total of 210 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.04     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.06     KP        1.00     
!   MA        1.07     MC        1.30     MK        0.98     NL        1.02     
!   NY        1.00     OV        1.00     PT        1.00     SC        1.15     
!   TS        1.02     WF        0.98     WZ        0.98     LA        0.95     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        1.04     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.05     KK        1.09     KP        0.97     
!   MA        0.93     MC        1.20     MK        1.02     NL        1.06     
!   NY        1.01     OV        0.97     PT        1.01     SC        1.04     
!   TS        1.04     WF        0.99     WZ        1.11     LA        0.97     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.98     FD        1.01     GC        1.06     GG        1.00*    
!   HH        1.00*    HN        1.02     KK        1.00     KP        1.00     
!   MA        0.63     MC        1.00*    MK        0.95     NL        0.99     
!   NY        1.03     OV        1.01     PT        0.99     SC        1.02     
!   TS        1.00*    WF        0.92     WZ        1.03     LA        0.96     
! 
! 
! Correcting IF 3.
!  A total of 219 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.95     FD        1.01     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.01     KP        1.00     
!   MA        0.72     MC        0.95     MK        0.99     NL        0.97     
!   NY        1.00     OV        1.03     PT        0.97     SC        1.16     
!   TS        1.03     WF        0.98     WZ        1.01     LA        0.99     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.94     FD        1.01     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.05     KP        0.96     
!   MA        0.71     MC        1.60     MK        1.03     NL        0.99     
!   NY        1.02     OV        1.01     PT        0.97     SC        1.07     
!   TS        1.05     WF        1.00     WZ        1.03     LA        1.03     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.96     FD        0.99     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        0.97     KP        0.97     
!   MA        0.60     MC        1.00*    MK        0.96     NL        0.94     
!   NY        1.02     OV        1.03     PT        0.97     SC        1.05     
!   TS        1.00*    WF        0.93     WZ        1.06     LA        1.00     
! 
! 
! Correcting IF 4.
!  A total of 219 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.02     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00     KK        1.05     KP        1.00     
!   MA        0.93     MC        0.97     MK        1.03     NL        0.98     
!   NY        0.96     OV        0.99     PT        0.98     SC        1.14     
!   TS        1.05     WF        0.99     WZ        1.01     LA        1.00     
! 
!  A total of 18 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.97     FD        1.01     GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.01     KK        1.06     KP        0.96     
!   MA        1.01     MC        0.90     MK        1.06     NL        1.01     
!   NY        0.98     OV        0.98     PT        0.95     SC        1.06     
!   TS        1.05     WF        1.01     WZ        1.02     LA        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        0.99     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        1.00     KP        0.98     
!   MA        0.97     MC        1.00*    MK        1.00     NL        0.96     
!   NY        1.07     OV        0.99     PT        0.98     SC        1.52     
!   TS        1.00*    WF        1.02     WZ        1.05     LA        1.01     
! 
! 
! Fit before self-cal, rms=0.335486Jy  sigma=0.001454
! Fit after  self-cal, rms=0.278445Jy  sigma=0.001416
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.457 mas, bmaj=2.616 mas, bpa=-45 degrees
! Estimated noise=225.756 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.00155441 Jy
! Component: 100  -  total flux cleaned = -0.00203791 Jy
! Component: 150  -  total flux cleaned = -0.00213305 Jy
! Component: 200  -  total flux cleaned = -0.00217465 Jy
! Total flux subtracted in 200 components = -0.00217465 Jy
! Clean residual min=-0.003084 max=0.002894 Jy/beam
! Clean residual mean=-0.000026 rms=0.000674 Jy/beam
! Combined flux in latest and established models = 0.581746 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 62 components and 0.581746 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.278416Jy  sigma=0.001416
! Fit after  self-cal, rms=0.278310Jy  sigma=0.001415
! 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.278310Jy  sigma=0.001415
! Fit after  self-cal, rms=0.284519Jy  sigma=0.001400
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.457 mas, bmaj=2.616 mas, bpa=-44.18 degrees
! Estimated noise=225.658 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000285476 Jy
! Component: 100  -  total flux cleaned = 7.20941e-05 Jy
! Component: 150  -  total flux cleaned = 0.000141308 Jy
! Component: 200  -  total flux cleaned = 0.000142138 Jy
! Total flux subtracted in 200 components = 0.000142138 Jy
! Clean residual min=-0.002464 max=0.002375 Jy/beam
! Clean residual mean=-0.000054 rms=0.000556 Jy/beam
! Combined flux in latest and established models = 0.581889 Jy
selfcal
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 73 components and 0.581888 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284503Jy  sigma=0.001400
! Fit after  self-cal, rms=0.284605Jy  sigma=0.001400
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 = 1.71852e-05 Jy
! Component: 100  -  total flux cleaned = 1.73131e-05 Jy
! Component: 150  -  total flux cleaned = 1.69199e-05 Jy
! Component: 200  -  total flux cleaned = -8.16782e-06 Jy
! Total flux subtracted in 200 components = -8.16782e-06 Jy
! Clean residual min=-0.002449 max=0.002342 Jy/beam
! Clean residual mean=-0.000054 rms=0.000555 Jy/beam
! Combined flux in latest and established models = 0.58188 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 77 components and 0.58188 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.284600Jy  sigma=0.001400
! Fit after  self-cal, rms=0.284600Jy  sigma=0.001400
! 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.284600Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285077Jy  sigma=0.001400
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.459 mas, bmaj=2.616 mas, bpa=-44.01 degrees
! Estimated noise=225.739 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000281494 Jy
! Component: 100  -  total flux cleaned = -0.000337361 Jy
! Component: 150  -  total flux cleaned = -0.000388837 Jy
! Component: 200  -  total flux cleaned = -0.000411903 Jy
! Total flux subtracted in 200 components = -0.000411903 Jy
! Clean residual min=-0.002434 max=0.002357 Jy/beam
! Clean residual mean=-0.000048 rms=0.000553 Jy/beam
! Combined flux in latest and established models = 0.581468 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 79 components and 0.581468 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285070Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285074Jy  sigma=0.001400
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 = 4.93738e-05 Jy
! Component: 100  -  total flux cleaned = 4.92781e-05 Jy
! Component: 150  -  total flux cleaned = 2.77547e-05 Jy
! Component: 200  -  total flux cleaned = 2.77463e-05 Jy
! Total flux subtracted in 200 components = 2.77463e-05 Jy
! Clean residual min=-0.002429 max=0.002341 Jy/beam
! Clean residual mean=-0.000048 rms=0.000552 Jy/beam
! Combined flux in latest and established models = 0.581496 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 82 components and 0.581496 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285067Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285067Jy  sigma=0.001400
! 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.285067Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285293Jy  sigma=0.001400
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.565 mas, bmaj=8.932 mas, bpa=-63.35 degrees
! Estimated noise=338.42 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000142535 Jy
! Component: 100  -  total flux cleaned = 0.000177223 Jy
! Component: 150  -  total flux cleaned = 0.00020491 Jy
! Component: 200  -  total flux cleaned = 0.000216237 Jy
! Total flux subtracted in 200 components = 0.000216237 Jy
! Clean residual min=-0.001802 max=0.001520 Jy/beam
! Clean residual mean=-0.000169 rms=0.000526 Jy/beam
! Combined flux in latest and established models = 0.581712 Jy
selfcal
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 86 components and 0.581712 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285290Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285291Jy  sigma=0.001400
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.000124958 Jy
! Component: 100  -  total flux cleaned = 0.000146339 Jy
! Component: 150  -  total flux cleaned = 0.000155111 Jy
! Component: 200  -  total flux cleaned = 0.000169788 Jy
! Total flux subtracted in 200 components = 0.000169788 Jy
! Clean residual min=-0.001792 max=0.001518 Jy/beam
! Clean residual mean=-0.000173 rms=0.000529 Jy/beam
! Combined flux in latest and established models = 0.581882 Jy
! Performing phase self-cal
! Adding 6 model components to the UV plane model.
! The established model now contains 87 components and 0.581882 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.285291Jy  sigma=0.001400
! Fit after  self-cal, rms=0.285292Jy  sigma=0.001400
! 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.46 mas, bmaj=2.617 mas, bpa=-43.93 degrees
! Estimated noise=225.833 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.46 x 2.617 at -43.93 degrees (North through East)
! Clean map  min=-0.0020854  max=0.52663 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.285292Jy  sigma=0.001400
! Fit after  self-cal, rms=0.476978Jy  sigma=0.001272
! Inverting map and beam 
! Estimated beam: bmin=2.46 mas, bmaj=2.62 mas, bpa=-44.3 degrees
! Estimated noise=225.692 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00107149 Jy
! Component: 100  -  total flux cleaned = -0.00118322 Jy
! Component: 150  -  total flux cleaned = -0.00121506 Jy
! Component: 200  -  total flux cleaned = -0.00124475 Jy
! Total flux subtracted in 200 components = -0.00124475 Jy
! Clean residual min=-0.001267 max=0.001209 Jy/beam
! Clean residual mean=-0.000024 rms=0.000316 Jy/beam
! Combined flux in latest and established models = 0.580637 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 91 components and 0.580637 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.476969Jy  sigma=0.001272
! Fit after  self-cal, rms=0.476983Jy  sigma=0.001272
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000121283 Jy
! Component: 100  -  total flux cleaned = -0.000147483 Jy
! Component: 150  -  total flux cleaned = -0.000197689 Jy
! Component: 200  -  total flux cleaned = -0.000221722 Jy
! Total flux subtracted in 200 components = -0.000221722 Jy
! Clean residual min=-0.001255 max=0.001206 Jy/beam
! Clean residual mean=-0.000023 rms=0.000314 Jy/beam
! Combined flux in latest and established models = 0.580416 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 93 components and 0.580416 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.476977Jy  sigma=0.001272
! Fit after  self-cal, rms=0.476982Jy  sigma=0.001272
! 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.476982Jy  sigma=0.001272
! Fit after  self-cal, rms=0.596346Jy  sigma=0.001271
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.971 mas, bmaj=1.993 mas, bpa=-39.45 degrees
! Estimated noise=568.436 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.401033 Jy
! Component: 100  -  total flux cleaned = 0.488957 Jy
! Component: 150  -  total flux cleaned = 0.514053 Jy
! Component: 200  -  total flux cleaned = 0.528834 Jy
! Total flux subtracted in 200 components = 0.528834 Jy
! Clean residual min=-0.003894 max=0.008084 Jy/beam
! Clean residual mean=0.000033 rms=0.000980 Jy/beam
! Combined flux in latest and established models = 0.528833 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 18 model components to the UV plane model.
! The established model now contains 18 components and 0.528833 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.461 mas, bmaj=2.622 mas, bpa=-44.26 degrees
! Estimated noise=225.617 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.0200536 Jy
! Component: 100  -  total flux cleaned = 0.0304921 Jy
! Component: 150  -  total flux cleaned = 0.0364872 Jy
! Component: 200  -  total flux cleaned = 0.0404209 Jy
! Total flux subtracted in 200 components = 0.0404209 Jy
! Clean residual min=-0.001412 max=0.002163 Jy/beam
! Clean residual mean=0.000037 rms=0.000400 Jy/beam
! Combined flux in latest and established models = 0.569254 Jy
! Adding 43 model components to the UV plane model.
! The established model now contains 52 components and 0.569254 Jy
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00275024 Jy
! Component: 100  -  total flux cleaned = 0.00472924 Jy
! Component: 150  -  total flux cleaned = 0.00618316 Jy
! Component: 200  -  total flux cleaned = 0.00726736 Jy
! Total flux subtracted in 200 components = 0.00726736 Jy
! Clean residual min=-0.001266 max=0.001234 Jy/beam
! Clean residual mean=-0.000004 rms=0.000316 Jy/beam
! Combined flux in latest and established models = 0.576522 Jy
! Adding 33 model components to the UV plane model.
! The established model now contains 72 components and 0.576522 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.562 mas, bmaj=8.943 mas, bpa=-62.81 degrees
! Estimated noise=337.314 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00169535 Jy
! Component: 100  -  total flux cleaned = 0.00248302 Jy
! Component: 150  -  total flux cleaned = 0.00286543 Jy
! Component: 200  -  total flux cleaned = 0.00299917 Jy
! Total flux subtracted in 200 components = 0.00299917 Jy
! Clean residual min=-0.001679 max=0.001351 Jy/beam
! Clean residual mean=-0.000076 rms=0.000497 Jy/beam
! Combined flux in latest and established models = 0.579521 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 = 2.9444e-05 Jy
! Component: 100  -  total flux cleaned = 5.84952e-05 Jy
! Component: 150  -  total flux cleaned = 6.73041e-05 Jy
! Component: 200  -  total flux cleaned = 7.14213e-05 Jy
! Total flux subtracted in 200 components = 7.14213e-05 Jy
! Clean residual min=-0.001682 max=0.001356 Jy/beam
! Clean residual mean=-0.000078 rms=0.000498 Jy/beam
! Combined flux in latest and established models = 0.579592 Jy
! Adding 29 model components to the UV plane model.
! The established model now contains 90 components and 0.579592 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.461 mas, bmaj=2.622 mas, bpa=-44.26 degrees
! Estimated noise=225.617 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000600772 Jy
! Component: 100  -  total flux cleaned = -0.000558836 Jy
! Component: 150  -  total flux cleaned = -0.000558917 Jy
! Component: 200  -  total flux cleaned = -0.000543107 Jy
! Total flux subtracted in 200 components = -0.000543107 Jy
! Clean residual min=-0.001204 max=0.001215 Jy/beam
! Clean residual mean=-0.000019 rms=0.000308 Jy/beam
! Combined flux in latest and established models = 0.579049 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 97 components and 0.579049 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.596331Jy  sigma=0.001271
! Fit after  self-cal, rms=0.596357Jy  sigma=0.001271
wmodel J1357+7643_S_2000_05_22_pus_map.mod
! Writing 97 model components to file: J1357+7643_S_2000_05_22_pus_map.mod
wobs J1357+7643_S_2000_05_22_pus_uvs.fits
! Writing UV FITS file: J1357+7643_S_2000_05_22_pus_uvs.fits
wwins J1357+7643_S_2000_05_22_pus_map.win
! wwins: Wrote 3 windows to J1357+7643_S_2000_05_22_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.000134647 Jy
! Component: 100  -  total flux cleaned = -0.00037316 Jy
! Component: 150  -  total flux cleaned = -0.000645788 Jy
! Component: 200  -  total flux cleaned = -0.00082939 Jy
! Component: 250  -  total flux cleaned = -0.000968778 Jy
! Component: 300  -  total flux cleaned = -0.00118317 Jy
! Component: 350  -  total flux cleaned = -0.00125952 Jy
! Component: 400  -  total flux cleaned = -0.00135368 Jy
! Component: 450  -  total flux cleaned = -0.00139063 Jy
! Component: 500  -  total flux cleaned = -0.00144544 Jy
! Component: 550  -  total flux cleaned = -0.00153554 Jy
! Component: 600  -  total flux cleaned = -0.00157111 Jy
! Component: 650  -  total flux cleaned = -0.00165946 Jy
! Component: 700  -  total flux cleaned = -0.00174691 Jy
! Component: 750  -  total flux cleaned = -0.00179886 Jy
! Component: 800  -  total flux cleaned = -0.00190195 Jy
! Component: 850  -  total flux cleaned = -0.00198678 Jy
! Component: 900  -  total flux cleaned = -0.00205402 Jy
! Component: 950  -  total flux cleaned = -0.00208731 Jy
! Component: 1000  -  total flux cleaned = -0.0021701 Jy
! Component: 1050  -  total flux cleaned = -0.00221926 Jy
! Component: 1100  -  total flux cleaned = -0.00226804 Jy
! Component: 1150  -  total flux cleaned = -0.00226797 Jy
! Component: 1200  -  total flux cleaned = -0.0023161 Jy
! Component: 1250  -  total flux cleaned = -0.00231618 Jy
! Component: 1300  -  total flux cleaned = -0.00236354 Jy
! Component: 1350  -  total flux cleaned = -0.00234789 Jy
! Component: 1400  -  total flux cleaned = -0.00237907 Jy
! Component: 1450  -  total flux cleaned = -0.00237914 Jy
! Component: 1500  -  total flux cleaned = -0.0024098 Jy
! Component: 1550  -  total flux cleaned = -0.00237945 Jy
! Component: 1600  -  total flux cleaned = -0.00242496 Jy
! Component: 1650  -  total flux cleaned = -0.00244018 Jy
! Component: 1700  -  total flux cleaned = -0.00247022 Jy
! Component: 1750  -  total flux cleaned = -0.00252992 Jy
! Component: 1800  -  total flux cleaned = -0.00251505 Jy
! Component: 1850  -  total flux cleaned = -0.00255929 Jy
! Component: 1900  -  total flux cleaned = -0.00260329 Jy
! Component: 1950  -  total flux cleaned = -0.00261786 Jy
! Component: 2000  -  total flux cleaned = -0.00264691 Jy
! Total flux subtracted in 2048 components = -0.00261799 Jy
! Clean residual min=-0.000817 max=0.000938 Jy/beam
! Clean residual mean=-0.000004 rms=0.000264 Jy/beam
! Combined flux in latest and established models = 0.576431 Jy
keep
! Adding 164 model components to the UV plane model.
! The established model now contains 261 components and 0.576431 Jy
![Exited script file: muppet]
wmap "J1357+7643_S_2000_05_22_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.461 x 2.622 at -44.26 degrees (North through East)
! Clean map  min=-0.0011078  max=0.52703 Jy/beam
! Writing clean map to FITS file: J1357+7643_S_2000_05_22_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.527031 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000263553 
device "J1357+7643_S_2000_05_22_pus\_map.eps/VPS"
! Attempting to open device: 'J1357+7643_S_2000_05_22_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.150022 0.150022 0.300043 0.600087 1.20017 2.40035 4.8007 9.60139 19.2028 38.4056 76.8111
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0007 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.527 
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.461 x 2.622 at -44.26 degrees (North through East)
! Clean map  min=-0.0011078  max=0.52703 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1357+7643_S_2000_05_22_pus\_map.gif/vgif"
! Attempting to open device: 'J1357+7643_S_2000_05_22_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1357+7643_S_2000_05_22_pus_uvs.log closed on Mon Nov 19 18:49:36 2007