! Started logfile: J1407+2827_X_1998_10_01_pus_uvs.log on Wed Feb  6 12:33:48 2008
obs J1407+2827_X_1998_10_01_pus_uva.fits
! Reading UV FITS file: J1407+2827_X_1998_10_01_pus_uva.fits
! AN table 1: 188 integrations on 136 of 136 possible baselines.
! AN table 2: 30 integrations on 136 of 136 possible baselines.
! Apparent sampling: 0.0813208 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  8.40798e+09        4e+06          1        4e+06
!  02        2  8.47798e+09        4e+06          1        4e+06
!  03        3  8.79298e+09        4e+06          1        4e+06
!  04        4  8.89798e+09        4e+06          1        4e+06
! 
! Polarization(s): RR
! 
! Read 2049 lines of history.
! 
! Reading 9644 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 = 256 
print "field_cell =",field_cell
! field_cell = 0.2 
print "taper_size =",taper_size
! taper_size = 70 
![@muppet J1407+2827_X_1998_10_01_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 = 256x256 pixels with 0.200x0.200 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 2503 telescope corrections were flagged in sub-array 1.
!  A total of 480 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 2.
!  A total of 2503 telescope corrections were flagged in sub-array 1.
!  A total of 480 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 3.
!  A total of 2503 telescope corrections were flagged in sub-array 1.
!  A total of 480 telescope corrections were flagged in sub-array 2.
! 
! Correcting IF 4.
!  A total of 2502 telescope corrections were flagged in sub-array 1.
!  A total of 480 telescope corrections were flagged in sub-array 2.
! 
! Fit before self-cal, rms=0.951049Jy  sigma=0.007038
! Fit after  self-cal, rms=0.630574Jy  sigma=0.003775
! 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 
! Your choice of large map pixels excluded 1.48% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6285 mas, bmaj=2.033 mas, bpa=-12.7 degrees
! Estimated noise=1070.95 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.752021 Jy
! Component: 100  -  total flux cleaned = 0.988285 Jy
! Total flux subtracted in 100 components = 0.988285 Jy
! Clean residual min=-0.043057 max=0.106968 Jy/beam
! Clean residual mean=0.003797 rms=0.019461 Jy/beam
! Combined flux in latest and established models = 0.988285 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.988285 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.593406Jy  sigma=0.003316
! Fit after  self-cal, rms=0.593332Jy  sigma=0.003312
! Inverting map 
! Your choice of large map pixels excluded 1.48% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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 
! Your choice of large map pixels excluded 1.48% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6311 mas, bmaj=2.054 mas, bpa=-13.27 degrees
! Estimated noise=808.065 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.150417 Jy
! Component: 100  -  total flux cleaned = 0.241827 Jy
! Component: 150  -  total flux cleaned = 0.303137 Jy
! Component: 200  -  total flux cleaned = 0.345473 Jy
! Total flux subtracted in 200 components = 0.345473 Jy
! Clean residual min=-0.023611 max=0.043769 Jy/beam
! Clean residual mean=0.002339 rms=0.009242 Jy/beam
! Combined flux in latest and established models = 1.33376 Jy
! Performing phase self-cal
! Adding 39 model components to the UV plane model.
! The established model now contains 45 components and 1.33376 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.552339Jy  sigma=0.002513
! Fit after  self-cal, rms=0.551365Jy  sigma=0.002502
! Inverting map 
! Your choice of large map pixels excluded 1.48% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 99 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.99     GC        1.00*    HN        1.01     
!   KK        0.92     KP        0.98     LA        1.01     MK        1.01     
!   NL        0.96     NY        1.00*    ON        1.00*    OV        0.93     
!   PT        0.96     SC        1.05     WF        0.98     MC        1.00*    
!   GN        0.98     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    WF        0.00*    MC        0.00*    
!   GN        0.00*    
! 
! 
! Correcting IF 2.
!  A total of 99 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        0.98     GC        1.00*    HN        1.05     
!   KK        0.92     KP        0.99     LA        0.97     MK        1.00     
!   NL        0.98     NY        1.00*    ON        1.00*    OV        0.95     
!   PT        0.98     SC        1.04     WF        1.02     MC        1.00*    
!   GN        0.97     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    WF        0.00*    MC        0.00*    
!   GN        0.00*    
! 
! 
! Correcting IF 3.
!  A total of 99 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.03     FD        0.97     GC        1.00*    HN        1.01     
!   KK        0.94     KP        1.02     LA        1.01     MK        1.05     
!   NL        0.97     NY        1.00*    ON        1.00*    OV        0.92     
!   PT        0.98     SC        1.08     WF        0.96     MC        1.00*    
!   GN        1.05     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    WF        0.00*    MC        0.00*    
!   GN        0.00*    
! 
! 
! Correcting IF 4.
!  A total of 96 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.01     FD        0.96     GC        1.00*    HN        1.06     
!   KK        0.93     KP        1.00     LA        1.02     MK        0.97     
!   NL        0.98     NY        1.00*    ON        1.00*    OV        0.93     
!   PT        0.95     SC        1.02     WF        0.97     MC        1.00*    
!   GN        1.06     
! 
!  A total of 30 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.00*    FD        0.00*    GC        0.00*    HN        0.00*    
!   KK        0.00*    KP        0.00*    LA        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    ON        0.00*    OV        0.00*    
!   PT        0.00*    SC        0.00*    WF        0.00*    MC        0.00*    
!   GN        0.00*    
! 
! 
! Fit before self-cal, rms=0.551365Jy  sigma=0.002502
! Fit after  self-cal, rms=0.389998Jy  sigma=0.002451
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6386 mas, bmaj=2.128 mas, bpa=-13.65 degrees
! Estimated noise=803.271 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 (-5.2, -4.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0389703 Jy
! Component: 100  -  total flux cleaned = 0.0602293 Jy
! Component: 150  -  total flux cleaned = 0.0758865 Jy
! Component: 200  -  total flux cleaned = 0.0881534 Jy
! Total flux subtracted in 200 components = 0.0881534 Jy
! Clean residual min=-0.009529 max=0.020515 Jy/beam
! Clean residual mean=0.001454 rms=0.003655 Jy/beam
! Combined flux in latest and established models = 1.42191 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 65 components and 1.42191 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.385614Jy  sigma=0.002385
! Fit after  self-cal, rms=0.385373Jy  sigma=0.002382
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Added new window around map position (-7, -3.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0179869 Jy
! Component: 100  -  total flux cleaned = 0.0264486 Jy
! Component: 150  -  total flux cleaned = 0.0319826 Jy
! Component: 200  -  total flux cleaned = 0.0359125 Jy
! Total flux subtracted in 200 components = 0.0359125 Jy
! Clean residual min=-0.009519 max=0.013674 Jy/beam
! Clean residual mean=0.001099 rms=0.002745 Jy/beam
! Combined flux in latest and established models = 1.45782 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 81 components and 1.45782 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.384246Jy  sigma=0.002366
! Fit after  self-cal, rms=0.384264Jy  sigma=0.002366
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Added new window around map position (-2.6, 0.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0121784 Jy
! Component: 100  -  total flux cleaned = 0.0190564 Jy
! Component: 150  -  total flux cleaned = 0.0228155 Jy
! Component: 200  -  total flux cleaned = 0.0254744 Jy
! Total flux subtracted in 200 components = 0.0254744 Jy
! Clean residual min=-0.008301 max=0.008997 Jy/beam
! Clean residual mean=0.000755 rms=0.002313 Jy/beam
! Combined flux in latest and established models = 1.4833 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 103 components and 1.4833 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.383655Jy  sigma=0.002359
! Fit after  self-cal, rms=0.383692Jy  sigma=0.002359
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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.383692Jy  sigma=0.002359
! Fit after  self-cal, rms=0.394914Jy  sigma=0.002353
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6394 mas, bmaj=2.126 mas, bpa=-13.7 degrees
! Estimated noise=804.512 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00789169 Jy
! Component: 100  -  total flux cleaned = 0.0140544 Jy
! Component: 150  -  total flux cleaned = 0.0193191 Jy
! Component: 200  -  total flux cleaned = 0.0232177 Jy
! Total flux subtracted in 200 components = 0.0232177 Jy
! Clean residual min=-0.007846 max=0.007138 Jy/beam
! Clean residual mean=0.000599 rms=0.001869 Jy/beam
! Combined flux in latest and established models = 1.50652 Jy
selfcal
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 122 components and 1.50652 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.394624Jy  sigma=0.002350
! Fit after  self-cal, rms=0.394755Jy  sigma=0.002349
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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.00402342 Jy
! Component: 100  -  total flux cleaned = 0.00630084 Jy
! Component: 150  -  total flux cleaned = 0.0082484 Jy
! Component: 200  -  total flux cleaned = 0.0100442 Jy
! Total flux subtracted in 200 components = 0.0100442 Jy
! Clean residual min=-0.007634 max=0.006904 Jy/beam
! Clean residual mean=0.000481 rms=0.001734 Jy/beam
! Combined flux in latest and established models = 1.51656 Jy
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 132 components and 1.51656 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.394620Jy  sigma=0.002348
! Fit after  self-cal, rms=0.394619Jy  sigma=0.002348
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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.394619Jy  sigma=0.002348
! Fit after  self-cal, rms=0.397738Jy  sigma=0.002347
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6393 mas, bmaj=2.125 mas, bpa=-13.7 degrees
! Estimated noise=805.028 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00427295 Jy
! Component: 100  -  total flux cleaned = 0.00715791 Jy
! Component: 150  -  total flux cleaned = 0.00923071 Jy
! Component: 200  -  total flux cleaned = 0.0107769 Jy
! Total flux subtracted in 200 components = 0.0107769 Jy
! Clean residual min=-0.007397 max=0.006455 Jy/beam
! Clean residual mean=0.000453 rms=0.001613 Jy/beam
! Combined flux in latest and established models = 1.52734 Jy
selfcal
! Performing phase self-cal
! Adding 36 model components to the UV plane model.
! The established model now contains 142 components and 1.52734 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.397623Jy  sigma=0.002346
! Fit after  self-cal, rms=0.397660Jy  sigma=0.002346
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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.00246959 Jy
! Component: 100  -  total flux cleaned = 0.00378679 Jy
! Component: 150  -  total flux cleaned = 0.00501034 Jy
! Component: 200  -  total flux cleaned = 0.0059642 Jy
! Total flux subtracted in 200 components = 0.0059642 Jy
! Clean residual min=-0.007211 max=0.006437 Jy/beam
! Clean residual mean=0.000383 rms=0.001544 Jy/beam
! Combined flux in latest and established models = 1.5333 Jy
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 149 components and 1.5333 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.397591Jy  sigma=0.002345
! Fit after  self-cal, rms=0.397591Jy  sigma=0.002345
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 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.397591Jy  sigma=0.002345
! Fit after  self-cal, rms=0.399049Jy  sigma=0.002345
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=2.124 mas, bmaj=2.693 mas, bpa=-6.568 degrees
! Estimated noise=1130.81 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00554715 Jy
! Component: 100  -  total flux cleaned = 0.00779359 Jy
! Component: 150  -  total flux cleaned = 0.00910269 Jy
! Component: 200  -  total flux cleaned = 0.00986416 Jy
! Total flux subtracted in 200 components = 0.00986416 Jy
! Clean residual min=-0.004444 max=0.006405 Jy/beam
! Clean residual mean=0.000939 rms=0.001764 Jy/beam
! Combined flux in latest and established models = 1.54317 Jy
selfcal
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 164 components and 1.54317 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.398983Jy  sigma=0.002345
! Fit after  self-cal, rms=0.398988Jy  sigma=0.002345
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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.000182244 Jy
! Component: 100  -  total flux cleaned = 0.00120305 Jy
! Component: 150  -  total flux cleaned = 0.00165066 Jy
! Component: 200  -  total flux cleaned = 0.00210527 Jy
! Total flux subtracted in 200 components = 0.00210527 Jy
! Clean residual min=-0.004087 max=0.006343 Jy/beam
! Clean residual mean=0.000873 rms=0.001709 Jy/beam
! Combined flux in latest and established models = 1.54527 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 174 components and 1.54527 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.398984Jy  sigma=0.002345
! Fit after  self-cal, rms=0.398979Jy  sigma=0.002344
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
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 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6393 mas, bmaj=2.124 mas, bpa=-13.69 degrees
! Estimated noise=805.198 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6393 x 2.124 at -13.69 degrees (North through East)
! Clean map  min=-0.0057958  max=0.95232 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.398979Jy  sigma=0.002344
! Fit after  self-cal, rms=0.342892Jy  sigma=0.002163
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6384 mas, bmaj=2.125 mas, bpa=-13.72 degrees
! Estimated noise=805.733 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00182723 Jy
! Component: 100  -  total flux cleaned = 0.00343525 Jy
! Component: 150  -  total flux cleaned = 0.00445792 Jy
! Component: 200  -  total flux cleaned = 0.00520532 Jy
! Total flux subtracted in 200 components = 0.00520532 Jy
! Clean residual min=-0.006354 max=0.006252 Jy/beam
! Clean residual mean=0.000348 rms=0.001398 Jy/beam
! Combined flux in latest and established models = 1.55048 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 189 components and 1.55048 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.342806Jy  sigma=0.002162
! Fit after  self-cal, rms=0.342784Jy  sigma=0.002162
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000903669 Jy
! Component: 100  -  total flux cleaned = 0.00149164 Jy
! Component: 150  -  total flux cleaned = 0.00196938 Jy
! Component: 200  -  total flux cleaned = 0.00227406 Jy
! Total flux subtracted in 200 components = 0.00227406 Jy
! Clean residual min=-0.006124 max=0.006034 Jy/beam
! Clean residual mean=0.000323 rms=0.001344 Jy/beam
! Combined flux in latest and established models = 1.55275 Jy
! Performing phase self-cal
! Adding 34 model components to the UV plane model.
! The established model now contains 198 components and 1.55275 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.342745Jy  sigma=0.002162
! Fit after  self-cal, rms=0.342732Jy  sigma=0.002162
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.342732Jy  sigma=0.002162
! Fit after  self-cal, rms=0.354638Jy  sigma=0.002161
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 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6195 mas, bmaj=2.139 mas, bpa=-12.88 degrees
! Estimated noise=1038.6 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.73618 Jy
! Component: 100  -  total flux cleaned = 0.966694 Jy
! Component: 150  -  total flux cleaned = 1.08787 Jy
! Component: 200  -  total flux cleaned = 1.16438 Jy
! Total flux subtracted in 200 components = 1.16438 Jy
! Clean residual min=-0.023986 max=0.042487 Jy/beam
! Clean residual mean=0.002526 rms=0.010708 Jy/beam
! Combined flux in latest and established models = 1.16438 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 27 model components to the UV plane model.
! The established model now contains 27 components and 1.16438 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6381 mas, bmaj=2.125 mas, bpa=-13.73 degrees
! Estimated noise=805.758 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.0741535 Jy
! Component: 100  -  total flux cleaned = 0.12742 Jy
! Component: 150  -  total flux cleaned = 0.168449 Jy
! Component: 200  -  total flux cleaned = 0.200662 Jy
! Total flux subtracted in 200 components = 0.200662 Jy
! Clean residual min=-0.014560 max=0.022375 Jy/beam
! Clean residual mean=0.002699 rms=0.006189 Jy/beam
! Combined flux in latest and established models = 1.36504 Jy
! Adding 35 model components to the UV plane model.
! The established model now contains 51 components and 1.36504 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 70 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=2.123 mas, bmaj=2.693 mas, bpa=-6.635 degrees
! Estimated noise=1134.05 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0539678 Jy
! Component: 100  -  total flux cleaned = 0.0872937 Jy
! Component: 150  -  total flux cleaned = 0.109908 Jy
! Component: 200  -  total flux cleaned = 0.125874 Jy
! Total flux subtracted in 200 components = 0.125874 Jy
! Clean residual min=-0.006120 max=0.014049 Jy/beam
! Clean residual mean=0.003154 rms=0.003608 Jy/beam
! Combined flux in latest and established models = 1.49091 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.0120893 Jy
! Component: 100  -  total flux cleaned = 0.0215588 Jy
! Component: 150  -  total flux cleaned = 0.0291937 Jy
! Component: 200  -  total flux cleaned = 0.0354756 Jy
! Total flux subtracted in 200 components = 0.0354756 Jy
! Clean residual min=-0.003450 max=0.008150 Jy/beam
! Clean residual mean=0.001916 rms=0.001849 Jy/beam
! Combined flux in latest and established models = 1.52639 Jy
! Adding 103 model components to the UV plane model.
! The established model now contains 133 components and 1.52639 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Added new window around map position (6.6, -10.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00743873 Jy
! Component: 100  -  total flux cleaned = 0.0118316 Jy
! Component: 150  -  total flux cleaned = 0.0153657 Jy
! Component: 200  -  total flux cleaned = 0.0170566 Jy
! Total flux subtracted in 200 components = 0.0170566 Jy
! Clean residual min=-0.002566 max=0.005858 Jy/beam
! Clean residual mean=0.001308 rms=0.001358 Jy/beam
! Combined flux in latest and established models = 1.54345 Jy
! Adding 29 model components to the UV plane model.
! The established model now contains 161 components and 1.54345 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Added new window around map position (10, 3).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00560144 Jy
! Component: 100  -  total flux cleaned = 0.00914603 Jy
! Component: 150  -  total flux cleaned = 0.0121837 Jy
! Component: 200  -  total flux cleaned = 0.0149149 Jy
! Total flux subtracted in 200 components = 0.0149149 Jy
! Clean residual min=-0.002625 max=0.005161 Jy/beam
! Clean residual mean=0.000894 rms=0.001185 Jy/beam
! Combined flux in latest and established models = 1.55836 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 185 components and 1.55836 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Added new window around map position (11.4, 9.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0052757 Jy
! Component: 100  -  total flux cleaned = 0.00850658 Jy
! Component: 150  -  total flux cleaned = 0.0108453 Jy
! Component: 200  -  total flux cleaned = 0.0128589 Jy
! Total flux subtracted in 200 components = 0.0128589 Jy
! Clean residual min=-0.002392 max=0.004139 Jy/beam
! Clean residual mean=0.000614 rms=0.000986 Jy/beam
! Combined flux in latest and established models = 1.57122 Jy
! Adding 33 model components to the UV plane model.
! The established model now contains 214 components and 1.57122 Jy
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! Estimated beam: bmin=0.6381 mas, bmaj=2.125 mas, bpa=-13.73 degrees
! Estimated noise=805.758 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00317437 Jy
! Component: 100  -  total flux cleaned = -0.000811744 Jy
! Component: 150  -  total flux cleaned = 0.00101244 Jy
! Component: 200  -  total flux cleaned = 0.0026797 Jy
! Total flux subtracted in 200 components = 0.0026797 Jy
! Clean residual min=-0.006522 max=0.006634 Jy/beam
! Clean residual mean=0.000204 rms=0.001764 Jy/beam
! Combined flux in latest and established models = 1.5739 Jy
selfcal
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 241 components and 1.5739 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.354910Jy  sigma=0.002164
! Fit after  self-cal, rms=0.354874Jy  sigma=0.002163
wmodel J1407+2827_X_1998_10_01_pus_map.mod
! Writing 241 model components to file: J1407+2827_X_1998_10_01_pus_map.mod
wobs J1407+2827_X_1998_10_01_pus_uvs.fits
! Writing UV FITS file: J1407+2827_X_1998_10_01_pus_uvs.fits
wwins J1407+2827_X_1998_10_01_pus_map.win
! wwins: Wrote 7 windows to J1407+2827_X_1998_10_01_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -7.58913e-05 Jy
! Component: 100  -  total flux cleaned = 0.000718736 Jy
! Component: 150  -  total flux cleaned = 0.0013638 Jy
! Component: 200  -  total flux cleaned = 0.00205743 Jy
! Component: 250  -  total flux cleaned = 0.00279054 Jy
! Component: 300  -  total flux cleaned = 0.00348751 Jy
! Component: 350  -  total flux cleaned = 0.00430229 Jy
! Component: 400  -  total flux cleaned = 0.0049407 Jy
! Component: 450  -  total flux cleaned = 0.00555694 Jy
! Component: 500  -  total flux cleaned = 0.00628265 Jy
! Component: 550  -  total flux cleaned = 0.00692213 Jy
! Component: 600  -  total flux cleaned = 0.0077301 Jy
! Component: 650  -  total flux cleaned = 0.00827472 Jy
! Component: 700  -  total flux cleaned = 0.0088046 Jy
! Component: 750  -  total flux cleaned = 0.00914878 Jy
! Component: 800  -  total flux cleaned = 0.00948556 Jy
! Component: 850  -  total flux cleaned = 0.0097592 Jy
! Component: 900  -  total flux cleaned = 0.0101337 Jy
! Component: 950  -  total flux cleaned = 0.0102902 Jy
! Component: 1000  -  total flux cleaned = 0.010393 Jy
! Total flux subtracted in 1024 components = 0.0104436 Jy
! Clean residual min=-0.002526 max=0.003080 Jy/beam
! Clean residual mean=0.000055 rms=0.001041 Jy/beam
! Combined flux in latest and established models = 1.58434 Jy
keep
! Adding 71 model components to the UV plane model.
! The established model now contains 309 components and 1.58434 Jy
![Exited script file: muppet]
wmap "J1407+2827_X_1998_10_01_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6381 x 2.125 at -13.73 degrees (North through East)
! Clean map  min=-0.0037542  max=0.95155 Jy/beam
! Writing clean map to FITS file: J1407+2827_X_1998_10_01_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.951546 
invert
! Inverting map 
! Your choice of large map pixels excluded 1.57% of the data.
!  The x-axis pixel size should ideally be below 0.1942 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.00104284 
device "J1407+2827_X_1998_10_01_pus\_map.eps/VPS"
! Attempting to open device: 'J1407+2827_X_1998_10_01_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.328784 0.328784 0.657568 1.31514 2.63027 5.26054 10.5211 21.0422 42.0843 84.1687
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0031 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.951 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6381 x 2.125 at -13.73 degrees (North through East)
! Clean map  min=-0.0037542  max=0.95155 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1407+2827_X_1998_10_01_pus\_map.gif/vgif"
! Attempting to open device: 'J1407+2827_X_1998_10_01_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1407+2827_X_1998_10_01_pus_uvs.log closed on Wed Feb  6 12:33:54 2008