! Started logfile: J0152+2207_S_1996_03_13_yyk_uvs.log on Sun Jan  7 15:44:55 2007
obs J0152+2207_S_1996_03_13_yyk_uva.fits
! Reading UV FITS file: J0152+2207_S_1996_03_13_yyk_uva.fits
! AN table 1: 117 integrations on 45 of 45 possible baselines.
! Apparent sampling: 0.815764 visibilities/baseline/integration-bin.
! Found source: J0152+2207
! 
! 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.22049e+09        4e+06          1        4e+06
!  02        2  2.23236e+09        4e+06          1        4e+06
!  03        3  2.29236e+09        4e+06          1        4e+06
!  04        4  2.32236e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 655 lines of history.
! 
! Reading 17180 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
![@muppet J0152+2207_S_1996_03_13_yyk]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.04
float dynam
dynam = 6.0
float amp_soltime1
amp_soltime1 = 10
float amp_soltime2
amp_soltime2 = 1
float phase_soltime1
phase_soltime1=10
float phase_soltime2
phase_soltime2=0.5
float phase_soltime
phase_soltime=phase_soltime1
float ampcor_selflim
ampcor_selflim=1.20
float thresh
thresh = 0.10
float win_mult
win_mult = 1.8
float time_av
time_av = 30
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.
phase_soltime=phase_soltime1
print "uvstat(rms)=",uvstat(rms),"Jy"
! uvstat(rms)= 0.906951 Jy 
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.771 mas, bmaj=6.535 mas, bpa=-4.623 degrees
! Estimated noise=1777.38 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (0, 0).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.663651 Jy
! Component: 100  -  total flux cleaned = 0.804213 Jy
! Total flux subtracted in 100 components = 0.804213 Jy
! Clean residual min=-0.036326 max=0.085417 Jy/beam
! Clean residual mean=-0.000134 rms=0.011254 Jy/beam
! Combined flux in latest and established models = 0.804213 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 8 model components to the UV plane model.
! The established model now contains 8 components and 0.804213 Jy
! 
! Correcting IF 1.
!  A total of 126 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 2.
!  A total of 126 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 3.
!  A total of 126 telescope corrections were flagged in sub-array 1.
! 
! Correcting IF 4.
!  A total of 126 telescope corrections were flagged in sub-array 1.
! 
! Fit before self-cal, rms=0.406965Jy  sigma=0.002024
! Fit after  self-cal, rms=0.404304Jy  sigma=0.002013
! Inverting map and beam 
! Estimated beam: bmin=2.771 mas, bmaj=6.535 mas, bpa=-4.623 degrees
! Estimated noise=1777.38 mJy/beam.
! Added new window around map position (-1.5, 8.5).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0993493 Jy
! Component: 100  -  total flux cleaned = 0.146097 Jy
! Total flux subtracted in 100 components = 0.146097 Jy
! Clean residual min=-0.028022 max=0.052919 Jy/beam
! Clean residual mean=-0.000078 rms=0.008002 Jy/beam
! Combined flux in latest and established models = 0.95031 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 16 model components to the UV plane model.
! The established model now contains 24 components and 0.95031 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.383057Jy  sigma=0.001903
! Fit after  self-cal, rms=0.381715Jy  sigma=0.001896
! Inverting map 
! Added new window around map position (13, 39.5).
! clean: niter=100  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0587197 Jy
! Component: 100  -  total flux cleaned = 0.0905123 Jy
! Total flux subtracted in 100 components = 0.0905123 Jy
! Clean residual min=-0.024610 max=0.026326 Jy/beam
! Clean residual mean=-0.000051 rms=0.006270 Jy/beam
! Combined flux in latest and established models = 1.04082 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 16 model components to the UV plane model.
! The established model now contains 40 components and 1.04082 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.374284Jy  sigma=0.001848
! Fit after  self-cal, rms=0.373284Jy  sigma=0.001845
! Inverting map 
print "************** FINISHED UNIFORM WEIGHTING CLEAN **************"
! ************** FINISHED UNIFORM WEIGHTING CLEAN ************** 
! 
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! 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=3.464 mas, bmaj=7.814 mas, bpa=-8.854 degrees
! Estimated noise=996.466 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0443129 Jy
! Component: 100  -  total flux cleaned = 0.0707344 Jy
! Component: 150  -  total flux cleaned = 0.089682 Jy
! Component: 200  -  total flux cleaned = 0.103734 Jy
! Total flux subtracted in 200 components = 0.103734 Jy
! Clean residual min=-0.016189 max=0.022089 Jy/beam
! Clean residual mean=0.000042 rms=0.005757 Jy/beam
! Combined flux in latest and established models = 1.14456 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 55 model components to the UV plane model.
! The established model now contains 87 components and 1.14456 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.368805Jy  sigma=0.001819
! Fit after  self-cal, rms=0.368253Jy  sigma=0.001816
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.464 x 7.814 at -8.854 degrees (North through East)
! Clean map  min=-0.014802  max=0.7655 Jy/beam
if(peak(flux) < thresh*2)
  selflims ampcor_selflim
  end if
gscale
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.03415
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        1.09     HN        1.03     KP        0.91     
!   LA        0.95     MK        1.01     NL        0.87     OV        1.08     
!   PT        0.93     SC        0.85     
! 
! 
! Correcting IF 2.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.984125
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.04     FD        1.16     HN        1.11     KP        0.95     
!   LA        1.06     MK        1.05     NL        0.92     OV        1.05     
!   PT        0.92     SC        0.90     
! 
! 
! Correcting IF 3.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 1.02787
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.97     FD        1.08     HN        0.97     KP        0.94     
!   LA        0.82     MK        0.92     NL        0.93     OV        0.94     
!   PT        1.13     SC        1.03     
! 
! 
! Correcting IF 4.
!  A total of 3 telescope corrections were flagged in sub-array 1.
!  Amplitude normalization factor in sub-array 1: 0.999903
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        1.12     HN        1.04     KP        0.97     
!   LA        0.89     MK        1.08     NL        1.02     OV        0.93     
!   PT        0.96     SC        1.00     
! 
! 
! Fit before self-cal, rms=0.368253Jy  sigma=0.001816
! Fit after  self-cal, rms=0.348772Jy  sigma=0.001758
selfcal false, false, phase_soltime
! Performing phase self-cal over 10 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.348772Jy  sigma=0.001758
! Fit after  self-cal, rms=0.348750Jy  sigma=0.001758
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=3.498 mas, bmaj=7.749 mas, bpa=-7.845 degrees
! Estimated noise=1007.48 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.02448 Jy
! Component: 100  -  total flux cleaned = 0.0384274 Jy
! Component: 150  -  total flux cleaned = 0.0473875 Jy
! Component: 200  -  total flux cleaned = 0.0512821 Jy
! Total flux subtracted in 200 components = 0.0512821 Jy
! Clean residual min=-0.010858 max=0.017614 Jy/beam
! Clean residual mean=0.000006 rms=0.003274 Jy/beam
! Combined flux in latest and established models = 1.19584 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 23 model components to the UV plane model.
! The established model now contains 102 components and 1.19584 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.347384Jy  sigma=0.001750
! Fit after  self-cal, rms=0.347153Jy  sigma=0.001750
! Inverting map 
! Added new window around map position (19.5, 33).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0182361 Jy
! Component: 100  -  total flux cleaned = 0.0252344 Jy
! Component: 150  -  total flux cleaned = 0.0312511 Jy
! Component: 200  -  total flux cleaned = 0.0354687 Jy
! Total flux subtracted in 200 components = 0.0354687 Jy
! Clean residual min=-0.008007 max=0.012539 Jy/beam
! Clean residual mean=0.000032 rms=0.002812 Jy/beam
! Combined flux in latest and established models = 1.23131 Jy
! Performing phase self-cal over 10 minute time intervals
! Adding 32 model components to the UV plane model.
! The established model now contains 128 components and 1.23131 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.346256Jy  sigma=0.001745
! Fit after  self-cal, rms=0.346167Jy  sigma=0.001745
! Inverting map 
print "************** FINISHED AMPLITUDE GSCALE SELF-CAL **************"
! ************** FINISHED AMPLITUDE GSCALE SELF-CAL ************** 
! 
phase_soltime=phase_soltime2
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.346167Jy  sigma=0.001745
! Fit after  self-cal, rms=0.343822Jy  sigma=0.001732
dynam = dynam - 0.5
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 false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00348879 Jy
! Component: 100  -  total flux cleaned = 0.00572247 Jy
! Component: 150  -  total flux cleaned = 0.00710607 Jy
! Component: 200  -  total flux cleaned = 0.00852888 Jy
! Total flux subtracted in 200 components = 0.00852888 Jy
! Clean residual min=-0.007640 max=0.012337 Jy/beam
! Clean residual mean=0.000044 rms=0.002724 Jy/beam
! Combined flux in latest and established models = 1.23984 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 32 model components to the UV plane model.
! The established model now contains 139 components and 1.23984 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.343592Jy  sigma=0.001731
! Fit after  self-cal, rms=0.342683Jy  sigma=0.001727
! Inverting map 
! Added new window around map position (0.5, 37).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0166803 Jy
! Component: 100  -  total flux cleaned = 0.0269443 Jy
! Component: 150  -  total flux cleaned = 0.0346409 Jy
! Component: 200  -  total flux cleaned = 0.0401452 Jy
! Total flux subtracted in 200 components = 0.0401452 Jy
! Clean residual min=-0.006028 max=0.010763 Jy/beam
! Clean residual mean=0.000050 rms=0.002087 Jy/beam
! Combined flux in latest and established models = 1.27998 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 47 model components to the UV plane model.
! The established model now contains 181 components and 1.27998 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.342043Jy  sigma=0.001723
! Fit after  self-cal, rms=0.341625Jy  sigma=0.001721
! Inverting map 
! Added new window around map position (10, 25.5).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0113765 Jy
! Component: 100  -  total flux cleaned = 0.0173476 Jy
! Component: 150  -  total flux cleaned = 0.0218979 Jy
! Component: 200  -  total flux cleaned = 0.0256568 Jy
! Total flux subtracted in 200 components = 0.0256568 Jy
! Clean residual min=-0.005548 max=0.005738 Jy/beam
! Clean residual mean=0.000055 rms=0.001789 Jy/beam
! Combined flux in latest and established models = 1.30564 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 38 model components to the UV plane model.
! The established model now contains 211 components and 1.30564 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.341258Jy  sigma=0.001719
! Fit after  self-cal, rms=0.341038Jy  sigma=0.001718
! Inverting map 
print "*** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime ***"
! *** FINISHED NATURAL WEIGHTING CLEAN with shorter phase_soltime *** 
! 
dynam = dynam - 0.25
restore
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.498 x 7.749 at -7.845 degrees (North through East)
! Clean map  min=-0.0054523  max=0.77948 Jy/beam
if(peak(flux) > thresh)
  selfcal true, true, amp_soltime1
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  selfcal true, true, amp_soltime2
  selfcal false, false, phase_soltime
  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 false,false,phase_soltime
    new_peak = peak(flux)
    until(new_peak<=flux_cutoff)
  print "************** FINISHED AMPLITUDE SELF-CAL **************"
  end if
! Performing amp+phase self-cal over 10 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.341038Jy  sigma=0.001718
! Fit after  self-cal, rms=0.333798Jy  sigma=0.001705
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333798Jy  sigma=0.001705
! Fit after  self-cal, rms=0.333702Jy  sigma=0.001705
! Inverting map and beam 
! Estimated beam: bmin=3.491 mas, bmaj=7.712 mas, bpa=-7.522 degrees
! Estimated noise=1001.89 mJy/beam.
! Added new window around map position (35, -7).
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00721339 Jy
! Component: 100  -  total flux cleaned = 0.0105089 Jy
! Component: 150  -  total flux cleaned = 0.0118287 Jy
! Component: 200  -  total flux cleaned = 0.0127131 Jy
! Total flux subtracted in 200 components = 0.0127131 Jy
! Clean residual min=-0.004700 max=0.005256 Jy/beam
! Clean residual mean=0.000019 rms=0.001373 Jy/beam
! Combined flux in latest and established models = 1.31835 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 38 model components to the UV plane model.
! The established model now contains 240 components and 1.31835 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333513Jy  sigma=0.001704
! Fit after  self-cal, rms=0.333439Jy  sigma=0.001704
! Inverting map 
! Performing amp+phase self-cal over 1 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333439Jy  sigma=0.001704
! Fit after  self-cal, rms=0.333338Jy  sigma=0.001702
! Performing phase self-cal over 0.5 minute time intervals
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333338Jy  sigma=0.001702
! Fit after  self-cal, rms=0.333309Jy  sigma=0.001702
! Inverting map and beam 
! Estimated beam: bmin=3.49 mas, bmaj=7.704 mas, bpa=-7.436 degrees
! Estimated noise=1002.88 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00335435 Jy
! Component: 100  -  total flux cleaned = 0.00347352 Jy
! Component: 150  -  total flux cleaned = 0.00359633 Jy
! Component: 200  -  total flux cleaned = 0.00383202 Jy
! Total flux subtracted in 200 components = 0.00383202 Jy
! Clean residual min=-0.004697 max=0.005028 Jy/beam
! Clean residual mean=0.000016 rms=0.001283 Jy/beam
! Combined flux in latest and established models = 1.32218 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 42 model components to the UV plane model.
! The established model now contains 256 components and 1.32218 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333214Jy  sigma=0.001701
! Fit after  self-cal, rms=0.333183Jy  sigma=0.001701
! Inverting map 
! ************** FINISHED AMPLITUDE SELF-CAL ************** 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
win_mult = win_mult * 1.4
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=7.444 mas, bmaj=10.48 mas, bpa=-6.144 degrees
! Estimated noise=1244.24 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal false,false,phase_soltime
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.00216608 Jy
! Component: 100  -  total flux cleaned = 0.00361481 Jy
! Component: 150  -  total flux cleaned = 0.00484475 Jy
! Component: 200  -  total flux cleaned = 0.005333 Jy
! Total flux subtracted in 200 components = 0.005333 Jy
! Clean residual min=-0.004391 max=0.004926 Jy/beam
! Clean residual mean=0.000036 rms=0.001394 Jy/beam
! Combined flux in latest and established models = 1.32752 Jy
! Performing phase self-cal over 0.5 minute time intervals
! Adding 25 model components to the UV plane model.
! The established model now contains 278 components and 1.32752 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333153Jy  sigma=0.001701
! Fit after  self-cal, rms=0.333131Jy  sigma=0.001701
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
win_mult = win_mult / 1.4
print "************** FINISHED TAPERING SELF-CAL CLEAN **************"
! ************** FINISHED TAPERING SELF-CAL CLEAN ************** 
! 
print "************** CLEARING MODEL AND STARTING OVER **********"
! ************** CLEARING MODEL AND STARTING OVER ********** 
clrmod true,true,true
! clrmod: Cleared the established, tentative and continuum 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.769 mas, bmaj=6.484 mas, bpa=-3.651 degrees
! Estimated noise=1776.06 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.673608 Jy
! Component: 100  -  total flux cleaned = 0.83914 Jy
! Component: 150  -  total flux cleaned = 0.923201 Jy
! Component: 200  -  total flux cleaned = 0.978763 Jy
! Total flux subtracted in 200 components = 0.978763 Jy
! Clean residual min=-0.015973 max=0.023288 Jy/beam
! Clean residual mean=-0.000071 rms=0.005493 Jy/beam
! Combined flux in latest and established models = 0.978763 Jy
uvw 0,-2
! Uniform weighting is not currently selected.
! Gridding weights will be scaled by errors raised to the power -2.
! Radial weighting is not currently selected.
flux_cutoff = imstat(rms) * dynam
! Adding 41 model components to the UV plane model.
! The established model now contains 41 components and 0.978763 Jy
! Inverting map and beam 
! Estimated beam: bmin=3.49 mas, bmaj=7.704 mas, bpa=-7.436 degrees
! Estimated noise=1002.88 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.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0617703 Jy
! Component: 100  -  total flux cleaned = 0.103389 Jy
! Component: 150  -  total flux cleaned = 0.134624 Jy
! Component: 200  -  total flux cleaned = 0.159832 Jy
! Total flux subtracted in 200 components = 0.159832 Jy
! Clean residual min=-0.009889 max=0.012224 Jy/beam
! Clean residual mean=-0.000002 rms=0.003774 Jy/beam
! Combined flux in latest and established models = 1.13859 Jy
! Adding 86 model components to the UV plane model.
! The established model now contains 118 components and 1.13859 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=7.444 mas, bmaj=10.48 mas, bpa=-6.144 degrees
! Estimated noise=1244.24 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.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0341538 Jy
! Component: 100  -  total flux cleaned = 0.058549 Jy
! Component: 150  -  total flux cleaned = 0.0775513 Jy
! Component: 200  -  total flux cleaned = 0.0930831 Jy
! Total flux subtracted in 200 components = 0.0930831 Jy
! Clean residual min=-0.009100 max=0.008415 Jy/beam
! Clean residual mean=0.000035 rms=0.003325 Jy/beam
! Combined flux in latest and established models = 1.23168 Jy
! Adding 115 model components to the UV plane model.
! The established model now contains 211 components and 1.23168 Jy
! Inverting map 
uvtaper 0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=3.49 mas, bmaj=7.704 mas, bpa=-7.436 degrees
! Estimated noise=1002.88 mJy/beam.
! clean: niter=200  gain=0.04  cutoff=0
! Component: 050  -  total flux cleaned = 0.0115134 Jy
! Component: 100  -  total flux cleaned = 0.020652 Jy
! Component: 150  -  total flux cleaned = 0.0274257 Jy
! Component: 200  -  total flux cleaned = 0.0338271 Jy
! Total flux subtracted in 200 components = 0.0338271 Jy
! Clean residual min=-0.005259 max=0.005663 Jy/beam
! Clean residual mean=0.000012 rms=0.001729 Jy/beam
! Combined flux in latest and established models = 1.26551 Jy
selfcal false, false, phase_soltime
! Performing phase self-cal over 0.5 minute time intervals
! Adding 43 model components to the UV plane model.
! The established model now contains 252 components and 1.26551 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.333705Jy  sigma=0.001704
! Fit after  self-cal, rms=0.333545Jy  sigma=0.001703
wmodel J0152+2207_S_1996_03_13_yyk\_map.mod
! Writing 252 model components to file: J0152+2207_S_1996_03_13_yyk_map.mod
wobs J0152+2207_S_1996_03_13_yyk\_uvs.fits
! Writing UV FITS file: J0152+2207_S_1996_03_13_yyk_uvs.fits
wwins J0152+2207_S_1996_03_13_yyk\_map.win
! wwins: Wrote 7 windows to J0152+2207_S_1996_03_13_yyk_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 = -8.75238e-05 Jy
! Component: 100  -  total flux cleaned = 0.00019648 Jy
! Component: 150  -  total flux cleaned = 0.000553506 Jy
! Component: 200  -  total flux cleaned = 0.000552037 Jy
! Component: 250  -  total flux cleaned = 0.000308393 Jy
! Component: 300  -  total flux cleaned = 7.20615e-05 Jy
! Component: 350  -  total flux cleaned = 0.000383688 Jy
! Component: 400  -  total flux cleaned = 0.000536748 Jy
! Component: 450  -  total flux cleaned = 0.00075999 Jy
! Component: 500  -  total flux cleaned = 0.000686607 Jy
! Component: 550  -  total flux cleaned = 0.000616407 Jy
! Component: 600  -  total flux cleaned = 0.000758351 Jy
! Component: 650  -  total flux cleaned = 0.000758818 Jy
! Component: 700  -  total flux cleaned = 0.000689893 Jy
! Component: 750  -  total flux cleaned = 0.000622301 Jy
! Component: 800  -  total flux cleaned = 0.000423585 Jy
! Component: 850  -  total flux cleaned = 0.000488239 Jy
! Component: 900  -  total flux cleaned = 0.00042348 Jy
! Component: 950  -  total flux cleaned = 0.000676512 Jy
! Component: 1000  -  total flux cleaned = 0.00048746 Jy
! Component: 1050  -  total flux cleaned = 0.000612196 Jy
! Component: 1100  -  total flux cleaned = 0.000674268 Jy
! Component: 1150  -  total flux cleaned = 0.000614023 Jy
! Component: 1200  -  total flux cleaned = 0.00073371 Jy
! Component: 1250  -  total flux cleaned = 0.000792375 Jy
! Component: 1300  -  total flux cleaned = 0.000732862 Jy
! Component: 1350  -  total flux cleaned = 0.000674516 Jy
! Component: 1400  -  total flux cleaned = 0.000616674 Jy
! Component: 1450  -  total flux cleaned = 0.000447667 Jy
! Component: 1500  -  total flux cleaned = 0.00033683 Jy
! Component: 1550  -  total flux cleaned = 0.000503768 Jy
! Component: 1600  -  total flux cleaned = 0.000557911 Jy
! Component: 1650  -  total flux cleaned = 0.000449023 Jy
! Component: 1700  -  total flux cleaned = 0.000503367 Jy
! Component: 1750  -  total flux cleaned = 0.000663116 Jy
! Component: 1800  -  total flux cleaned = 0.00061006 Jy
! Component: 1850  -  total flux cleaned = 0.000559521 Jy
! Component: 1900  -  total flux cleaned = 0.000714563 Jy
! Component: 1950  -  total flux cleaned = 0.000511011 Jy
! Component: 2000  -  total flux cleaned = 0.000662505 Jy
! Total flux subtracted in 2048 components = 0.000562012 Jy
! Clean residual min=-0.002856 max=0.002723 Jy/beam
! Clean residual mean=0.000000 rms=0.001071 Jy/beam
! Combined flux in latest and established models = 1.26607 Jy
keep
! Adding 147 model components to the UV plane model.
! The established model now contains 398 components and 1.26607 Jy
![Exited script file: muppet]
wmap "J0152+2207_S_1996_03_13_yyk\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.49 x 7.704 at -7.436 degrees (North through East)
! Clean map  min=-0.0042312  max=0.77712 Jy/beam
! Writing clean map to FITS file: J0152+2207_S_1996_03_13_yyk_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.777121 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00106505 
device "J0152+2207_S_1996_03_13_yyk\_map.eps/VPS"
! Attempting to open device: 'J0152+2207_S_1996_03_13_yyk_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.411151 0.411151 0.822303 1.64461 3.28921 6.57842 13.1568 26.3137 52.6274
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0031 
print "peak=",int(peak_flux*1000)/1000
! peak= 0.777 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 3.49 x 7.704 at -7.436 degrees (North through East)
! Clean map  min=-0.0042312  max=0.77712 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0152+2207_S_1996_03_13_yyk\_map.gif/gif"
! Attempting to open device: 'J0152+2207_S_1996_03_13_yyk_map.gif/gif'
mapplot cln
quit
! Quitting program
! Log file J0152+2207_S_1996_03_13_yyk_uvs.log closed on Sun Jan  7 15:45:04 2007