! Started logfile: J0203+1134_X_2000_12_04_pus_uvs.log on Fri Oct 12 15:12:08 2007
obs J0203+1134_X_2000_12_04_pus_uva.fits
! Reading UV FITS file: J0203+1134_X_2000_12_04_pus_uva.fits
! AN table 1: 169 integrations on 190 of 190 possible baselines.
! AN table 2: 277 integrations on 190 of 190 possible baselines.
! AN table 3: 98 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.180805 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0203+1134
! 
! 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.40997e+09        8e+06          1        8e+06
!  02        2  8.47997e+09        8e+06          1        8e+06
!  03        3  8.79497e+09        8e+06          1        8e+06
!  04        4  8.89997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 2126 lines of history.
! 
! Reading 74752 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 J0203+1134_X_2000_12_04_pus]
integer clean_niter
clean_niter = 100
float clean_gain
clean_gain = 0.03
float dynam
dynam = 6.0
float soltime1
soltime1 = 120
float soltime2
soltime2 = 20
float thresh
thresh = 0.5
float win_mult
win_mult = 1.8
float time_av
time_av = 16
float old_peak
float new_peak
float flux_cutoff
mapsize field_size, field_cell
! Map grid = 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 3233 telescope corrections were flagged in sub-array 1.
!  A total of 2709 telescope corrections were flagged in sub-array 2.
!  A total of 1217 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 3233 telescope corrections were flagged in sub-array 1.
!  A total of 2709 telescope corrections were flagged in sub-array 2.
!  A total of 1217 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 3233 telescope corrections were flagged in sub-array 1.
!  A total of 2708 telescope corrections were flagged in sub-array 2.
!  A total of 1217 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 3233 telescope corrections were flagged in sub-array 1.
!  A total of 2708 telescope corrections were flagged in sub-array 2.
!  A total of 1217 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=0.752258Jy  sigma=0.006453
! Fit after  self-cal, rms=0.573491Jy  sigma=0.004751
! 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 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.506 mas, bmaj=1.148 mas, bpa=-4.926 degrees
! Estimated noise=700.39 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.364766 Jy
! Component: 100  -  total flux cleaned = 0.46169 Jy
! Total flux subtracted in 100 components = 0.46169 Jy
! Clean residual min=-0.016663 max=0.059768 Jy/beam
! Clean residual mean=0.000754 rms=0.006364 Jy/beam
! Combined flux in latest and established models = 0.461689 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 7 components and 0.461689 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232072Jy  sigma=0.001664
! Fit after  self-cal, rms=0.232002Jy  sigma=0.001663
! Inverting map 
! Your choice of large map pixels excluded 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Added new window around map position (-0.6, 1.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0597353 Jy
! Component: 100  -  total flux cleaned = 0.0924181 Jy
! Total flux subtracted in 100 components = 0.0924181 Jy
! Clean residual min=-0.013846 max=0.024881 Jy/beam
! Clean residual mean=0.000409 rms=0.003487 Jy/beam
! Combined flux in latest and established models = 0.554108 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 15 components and 0.554108 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.214758Jy  sigma=0.001411
! Fit after  self-cal, rms=0.213596Jy  sigma=0.001399
! Inverting map 
! Your choice of large map pixels excluded 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0246943 Jy
! Component: 100  -  total flux cleaned = 0.0394112 Jy
! Total flux subtracted in 100 components = 0.0394112 Jy
! Clean residual min=-0.009878 max=0.014851 Jy/beam
! Clean residual mean=0.000263 rms=0.002328 Jy/beam
! Combined flux in latest and established models = 0.593519 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 23 components and 0.593519 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.210303Jy  sigma=0.001344
! Fit after  self-cal, rms=0.209992Jy  sigma=0.001341
! Inverting map 
! Your choice of large map pixels excluded 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6054 mas, bmaj=1.344 mas, bpa=-5.043 degrees
! Estimated noise=314.806 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.0192569 Jy
! Component: 100  -  total flux cleaned = 0.029641 Jy
! Component: 150  -  total flux cleaned = 0.0357328 Jy
! Component: 200  -  total flux cleaned = 0.0393666 Jy
! Total flux subtracted in 200 components = 0.0393666 Jy
! Clean residual min=-0.006606 max=0.008440 Jy/beam
! Clean residual mean=0.000429 rms=0.001704 Jy/beam
! Combined flux in latest and established models = 0.632885 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 33 components and 0.632885 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.208721Jy  sigma=0.001320
! Fit after  self-cal, rms=0.208566Jy  sigma=0.001318
! Inverting map 
! Your choice of large map pixels excluded 11.9% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 147 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.02     GC        1.00*    GG        1.00*    
!   HH        1.12     HN        1.01     KK        1.00*    KP        0.99     
!   LA        1.00     MA        1.02     MC        0.96     MK        1.00*    
!   NL        1.00     NY        1.00     OV        1.00     PT        0.99     
!   SC        1.03     TS        1.00*    WF        1.00     WZ        1.00     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.02     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.00     KP        1.03     
!   LA        1.05     MA        1.00*    MC        1.00*    MK        0.96     
!   NL        1.00*    NY        1.00*    OV        1.00     PT        1.02     
!   SC        1.00*    TS        0.98     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 2.
!  A total of 147 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00     FD        1.04     GC        1.00*    GG        1.00*    
!   HH        1.10     HN        1.00     KK        1.00*    KP        1.00     
!   LA        0.98     MA        1.01     MC        0.99     MK        1.00*    
!   NL        0.95     NY        1.00     OV        1.00     PT        0.98     
!   SC        1.02     TS        1.00*    WF        0.99     WZ        0.99     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.02     FD        1.03     GC        1.02     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.01     KP        1.03     
!   LA        1.03     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        1.00*    NY        1.00*    OV        0.99     PT        1.02     
!   SC        1.00*    TS        0.98     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 3.
!  A total of 147 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        1.09     GC        1.00*    GG        1.00*    
!   HH        1.09     HN        1.01     KK        1.00*    KP        1.00     
!   LA        1.00     MA        1.02     MC        0.99     MK        1.00*    
!   NL        0.95     NY        1.02     OV        0.97     PT        0.96     
!   SC        1.03     TS        1.00*    WF        1.02     WZ        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.07     GC        1.10     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.97     KP        1.02     
!   LA        1.04     MA        1.00*    MC        1.00*    MK        0.98     
!   NL        1.00*    NY        1.00*    OV        0.96     PT        0.98     
!   SC        1.00*    TS        1.02     WF        1.00*    WZ        1.00*    
! 
! 
! Correcting IF 4.
!  A total of 147 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.00*    FD        0.00*    GC        0.00*    GG        0.00*    
!   HH        0.00*    HN        0.00*    KK        0.00*    KP        0.00*    
!   LA        0.00*    MA        0.00*    MC        0.00*    MK        0.00*    
!   NL        0.00*    NY        0.00*    OV        0.00*    PT        0.00*    
!   SC        0.00*    TS        0.00*    WF        0.00*    WZ        0.00*    
! 
!  A total of 6 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        1.07     GC        1.00*    GG        1.00*    
!   HH        1.08     HN        0.97     KK        1.00*    KP        1.01     
!   LA        0.99     MA        1.03     MC        0.99     MK        1.00*    
!   NL        0.96     NY        1.01     OV        1.00     PT        0.94     
!   SC        1.02     TS        1.00*    WF        0.99     WZ        1.01     
! 
!  A total of 6 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.04     FD        1.05     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.99     KP        1.03     
!   LA        1.04     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        1.00*    NY        1.00*    OV        0.99     PT        0.97     
!   SC        1.00*    TS        1.03     WF        1.00*    WZ        1.00*    
! 
! 
! Fit before self-cal, rms=0.208566Jy  sigma=0.001318
! Fit after  self-cal, rms=0.216915Jy  sigma=0.001304
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6038 mas, bmaj=1.37 mas, bpa=-5.218 degrees
! Estimated noise=316.661 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 (-1.6, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00544979 Jy
! Component: 100  -  total flux cleaned = 0.00589013 Jy
! Component: 150  -  total flux cleaned = 0.00589616 Jy
! Component: 200  -  total flux cleaned = 0.00589947 Jy
! Total flux subtracted in 200 components = 0.00589947 Jy
! Clean residual min=-0.002982 max=0.003077 Jy/beam
! Clean residual mean=0.000291 rms=0.000787 Jy/beam
! Combined flux in latest and established models = 0.638785 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 53 components and 0.638785 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216683Jy  sigma=0.001302
! Fit after  self-cal, rms=0.216750Jy  sigma=0.001302
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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.216750Jy  sigma=0.001302
! Fit after  self-cal, rms=0.216666Jy  sigma=0.001302
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6035 mas, bmaj=1.37 mas, bpa=-5.2 degrees
! Estimated noise=316.656 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00269902 Jy
! Component: 100  -  total flux cleaned = 0.00290114 Jy
! Component: 150  -  total flux cleaned = 0.00282072 Jy
! Component: 200  -  total flux cleaned = 0.00274815 Jy
! Total flux subtracted in 200 components = 0.00274815 Jy
! Clean residual min=-0.002636 max=0.002668 Jy/beam
! Clean residual mean=0.000186 rms=0.000670 Jy/beam
! Combined flux in latest and established models = 0.641533 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 59 components and 0.641533 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216542Jy  sigma=0.001301
! Fit after  self-cal, rms=0.216523Jy  sigma=0.001301
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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.000524001 Jy
! Component: 100  -  total flux cleaned = 0.000454818 Jy
! Component: 150  -  total flux cleaned = 0.000322936 Jy
! Component: 200  -  total flux cleaned = 0.000322864 Jy
! Total flux subtracted in 200 components = 0.000322864 Jy
! Clean residual min=-0.002750 max=0.002499 Jy/beam
! Clean residual mean=0.000184 rms=0.000630 Jy/beam
! Combined flux in latest and established models = 0.641856 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 62 components and 0.641856 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216448Jy  sigma=0.001301
! Fit after  self-cal, rms=0.216438Jy  sigma=0.001300
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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.216438Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216272Jy  sigma=0.001300
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6035 mas, bmaj=1.371 mas, bpa=-5.174 degrees
! Estimated noise=316.501 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00126709 Jy
! Component: 100  -  total flux cleaned = 0.00133351 Jy
! Component: 150  -  total flux cleaned = 0.0012158 Jy
! Component: 200  -  total flux cleaned = 0.00116167 Jy
! Total flux subtracted in 200 components = 0.00116167 Jy
! Clean residual min=-0.002276 max=0.002246 Jy/beam
! Clean residual mean=0.000102 rms=0.000573 Jy/beam
! Combined flux in latest and established models = 0.643017 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 63 components and 0.643017 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216209Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216198Jy  sigma=0.001300
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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.000266082 Jy
! Component: 100  -  total flux cleaned = 0.000158126 Jy
! Component: 150  -  total flux cleaned = 0.000157996 Jy
! Component: 200  -  total flux cleaned = 0.000156883 Jy
! Total flux subtracted in 200 components = 0.000156883 Jy
! Clean residual min=-0.002326 max=0.002140 Jy/beam
! Clean residual mean=0.000101 rms=0.000554 Jy/beam
! Combined flux in latest and established models = 0.643174 Jy
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 66 components and 0.643174 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216153Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216149Jy  sigma=0.001300
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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.216149Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216243Jy  sigma=0.001300
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=2.347 mas, bmaj=2.913 mas, bpa=-1.957 degrees
! Estimated noise=421.869 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000782849 Jy
! Component: 100  -  total flux cleaned = 0.000783719 Jy
! Component: 150  -  total flux cleaned = 0.000768333 Jy
! Component: 200  -  total flux cleaned = 0.000738801 Jy
! Total flux subtracted in 200 components = 0.000738801 Jy
! Clean residual min=-0.001778 max=0.001723 Jy/beam
! Clean residual mean=0.000124 rms=0.000530 Jy/beam
! Combined flux in latest and established models = 0.643913 Jy
selfcal
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 75 components and 0.643913 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216234Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216233Jy  sigma=0.001300
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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 = 7.50808e-05 Jy
! Component: 100  -  total flux cleaned = 7.12818e-05 Jy
! Component: 150  -  total flux cleaned = 8.55703e-05 Jy
! Component: 200  -  total flux cleaned = 7.38556e-05 Jy
! Total flux subtracted in 200 components = 7.38556e-05 Jy
! Clean residual min=-0.001701 max=0.001640 Jy/beam
! Clean residual mean=0.000123 rms=0.000524 Jy/beam
! Combined flux in latest and established models = 0.643987 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 82 components and 0.643987 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216230Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216228Jy  sigma=0.001300
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6036 mas, bmaj=1.371 mas, bpa=-5.16 degrees
! Estimated noise=316.395 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6036 x 1.371 at -5.16 degrees (North through East)
! Clean map  min=-0.0017042  max=0.46807 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
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 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.5022 mas, bmaj=1.17 mas, bpa=-4.888 degrees
! Estimated noise=757.5 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.364155 Jy
! Component: 100  -  total flux cleaned = 0.473037 Jy
! Component: 150  -  total flux cleaned = 0.530389 Jy
! Component: 200  -  total flux cleaned = 0.563386 Jy
! Total flux subtracted in 200 components = 0.563386 Jy
! Clean residual min=-0.007490 max=0.017010 Jy/beam
! Clean residual mean=0.000305 rms=0.002490 Jy/beam
! Combined flux in latest and established models = 0.563386 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 13 model components to the UV plane model.
! The established model now contains 13 components and 0.563386 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6036 mas, bmaj=1.371 mas, bpa=-5.16 degrees
! Estimated noise=316.395 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.0325394 Jy
! Component: 100  -  total flux cleaned = 0.0507521 Jy
! Component: 150  -  total flux cleaned = 0.0616873 Jy
! Component: 200  -  total flux cleaned = 0.0686921 Jy
! Total flux subtracted in 200 components = 0.0686921 Jy
! Clean residual min=-0.002283 max=0.003844 Jy/beam
! Clean residual mean=0.000217 rms=0.000832 Jy/beam
! Combined flux in latest and established models = 0.632079 Jy
! Adding 31 model components to the UV plane model.
! The established model now contains 39 components and 0.632079 Jy
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Added new window around map position (1, -1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00469887 Jy
! Component: 100  -  total flux cleaned = 0.00799174 Jy
! Component: 150  -  total flux cleaned = 0.00992272 Jy
! Component: 200  -  total flux cleaned = 0.0103904 Jy
! Total flux subtracted in 200 components = 0.0103904 Jy
! Clean residual min=-0.001999 max=0.002154 Jy/beam
! Clean residual mean=0.000068 rms=0.000536 Jy/beam
! Combined flux in latest and established models = 0.642469 Jy
! Adding 30 model components to the UV plane model.
! The established model now contains 58 components and 0.642469 Jy
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 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 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=2.347 mas, bmaj=2.913 mas, bpa=-1.957 degrees
! Estimated noise=421.869 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00132768 Jy
! Component: 100  -  total flux cleaned = 0.00143296 Jy
! Component: 150  -  total flux cleaned = 0.00139058 Jy
! Component: 200  -  total flux cleaned = 0.00137229 Jy
! Total flux subtracted in 200 components = 0.00137229 Jy
! Clean residual min=-0.001629 max=0.001653 Jy/beam
! Clean residual mean=0.000124 rms=0.000526 Jy/beam
! Combined flux in latest and established models = 0.643841 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.97681e-05 Jy
! Component: 100  -  total flux cleaned = -4.14381e-05 Jy
! Component: 150  -  total flux cleaned = -6.36245e-05 Jy
! Component: 200  -  total flux cleaned = -9.3778e-05 Jy
! Total flux subtracted in 200 components = -9.3778e-05 Jy
! Clean residual min=-0.001617 max=0.001644 Jy/beam
! Clean residual mean=0.000130 rms=0.000520 Jy/beam
! Combined flux in latest and established models = 0.643748 Jy
! Adding 32 model components to the UV plane model.
! The established model now contains 87 components and 0.643748 Jy
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! Estimated beam: bmin=0.6036 mas, bmaj=1.371 mas, bpa=-5.16 degrees
! Estimated noise=316.395 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000602326 Jy
! Component: 100  -  total flux cleaned = -0.000663853 Jy
! Component: 150  -  total flux cleaned = -0.000779138 Jy
! Component: 200  -  total flux cleaned = -0.000776604 Jy
! Total flux subtracted in 200 components = -0.000776604 Jy
! Clean residual min=-0.001950 max=0.001881 Jy/beam
! Clean residual mean=0.000063 rms=0.000494 Jy/beam
! Combined flux in latest and established models = 0.642971 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 99 components and 0.642971 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.216172Jy  sigma=0.001300
! Fit after  self-cal, rms=0.216005Jy  sigma=0.001299
wmodel J0203+1134_X_2000_12_04_pus_map.mod
! Writing 99 model components to file: J0203+1134_X_2000_12_04_pus_map.mod
wobs J0203+1134_X_2000_12_04_pus_uvs.fits
! Writing UV FITS file: J0203+1134_X_2000_12_04_pus_uvs.fits
wwins J0203+1134_X_2000_12_04_pus_map.win
! wwins: Wrote 4 windows to J0203+1134_X_2000_12_04_pus_map.win
x = (field_size-8) * field_cell / 4
addwin -x,x,-x,x
clean (field_size*4),0.01
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 0.00029304 Jy
! Component: 100  -  total flux cleaned = 0.000661309 Jy
! Component: 150  -  total flux cleaned = 0.00106834 Jy
! Component: 200  -  total flux cleaned = 0.001428 Jy
! Component: 250  -  total flux cleaned = 0.0016676 Jy
! Component: 300  -  total flux cleaned = 0.00177113 Jy
! Component: 350  -  total flux cleaned = 0.0018718 Jy
! Component: 400  -  total flux cleaned = 0.00192063 Jy
! Component: 450  -  total flux cleaned = 0.00201632 Jy
! Component: 500  -  total flux cleaned = 0.00211029 Jy
! Component: 550  -  total flux cleaned = 0.00217931 Jy
! Component: 600  -  total flux cleaned = 0.00224698 Jy
! Component: 650  -  total flux cleaned = 0.00233586 Jy
! Component: 700  -  total flux cleaned = 0.00246645 Jy
! Component: 750  -  total flux cleaned = 0.00248779 Jy
! Component: 800  -  total flux cleaned = 0.00257222 Jy
! Component: 850  -  total flux cleaned = 0.00259306 Jy
! Component: 900  -  total flux cleaned = 0.0026549 Jy
! Component: 950  -  total flux cleaned = 0.00271595 Jy
! Component: 1000  -  total flux cleaned = 0.00281607 Jy
! Total flux subtracted in 1024 components = 0.00283584 Jy
! Clean residual min=-0.001039 max=0.001100 Jy/beam
! Clean residual mean=0.000020 rms=0.000375 Jy/beam
! Combined flux in latest and established models = 0.645807 Jy
keep
! Adding 76 model components to the UV plane model.
! The established model now contains 174 components and 0.645807 Jy
![Exited script file: muppet]
wmap "J0203+1134_X_2000_12_04_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6036 x 1.371 at -5.16 degrees (North through East)
! Clean map  min=-0.0013326  max=0.46923 Jy/beam
! Writing clean map to FITS file: J0203+1134_X_2000_12_04_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.469229 
invert
! Inverting map 
! Your choice of large map pixels excluded 12% of the data.
!  The x-axis pixel size should ideally be below 0.1608 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1844 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000373756 
device "J0203+1134_X_2000_12_04_pus\_map.eps/VPS"
! Attempting to open device: 'J0203+1134_X_2000_12_04_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.23896 0.23896 0.477919 0.955839 1.91168 3.82336 7.64671 15.2934 30.5868 61.1737
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.469 
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.6036 x 1.371 at -5.16 degrees (North through East)
! Clean map  min=-0.0013326  max=0.46923 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0203+1134_X_2000_12_04_pus\_map.gif/vgif"
! Attempting to open device: 'J0203+1134_X_2000_12_04_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0203+1134_X_2000_12_04_pus_uvs.log closed on Fri Oct 12 15:12:28 2007