! Started logfile: J1407+2827_X_2001_04_09_pus_uvs.log on Mon Oct  1 14:42:44 2007
obs J1407+2827_X_2001_04_09_pus_uva.fits
! Reading UV FITS file: J1407+2827_X_2001_04_09_pus_uva.fits
! AN table 1: 9 integrations on 190 of 190 possible baselines.
! AN table 2: 150 integrations on 190 of 190 possible baselines.
! AN table 3: 132 integrations on 190 of 190 possible baselines.
! AN table 4: 113 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.166949 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.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 1926 lines of history.
! 
! Reading 51260 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_2001_04_09_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 157 telescope corrections were flagged in sub-array 1.
!  A total of 2665 telescope corrections were flagged in sub-array 2.
!  A total of 1516 telescope corrections were flagged in sub-array 3.
!  A total of 1365 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 157 telescope corrections were flagged in sub-array 1.
!  A total of 2665 telescope corrections were flagged in sub-array 2.
!  A total of 1516 telescope corrections were flagged in sub-array 3.
!  A total of 1365 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 157 telescope corrections were flagged in sub-array 1.
!  A total of 2665 telescope corrections were flagged in sub-array 2.
!  A total of 1516 telescope corrections were flagged in sub-array 3.
!  A total of 1365 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 157 telescope corrections were flagged in sub-array 1.
!  A total of 2665 telescope corrections were flagged in sub-array 2.
!  A total of 1516 telescope corrections were flagged in sub-array 3.
!  A total of 1365 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=1.018633Jy  sigma=0.009525
! Fit after  self-cal, rms=0.441275Jy  sigma=0.003771
! 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 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.5529 mas, bmaj=0.8609 mas, bpa=-2.61 degrees
! Estimated noise=722.639 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.59038 Jy
! Component: 100  -  total flux cleaned = 0.796454 Jy
! Total flux subtracted in 100 components = 0.796454 Jy
! Clean residual min=-0.025263 max=0.104176 Jy/beam
! Clean residual mean=0.000906 rms=0.009981 Jy/beam
! Combined flux in latest and established models = 0.796454 Jy
! Performing phase self-cal
! Adding 11 model components to the UV plane model.
! The established model now contains 11 components and 0.796454 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.386218Jy  sigma=0.003800
! Fit after  self-cal, rms=0.385729Jy  sigma=0.003798
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.131433 Jy
! Component: 100  -  total flux cleaned = 0.223319 Jy
! Total flux subtracted in 100 components = 0.223319 Jy
! Clean residual min=-0.017722 max=0.070111 Jy/beam
! Clean residual mean=0.000576 rms=0.006921 Jy/beam
! Combined flux in latest and established models = 1.01977 Jy
! Performing phase self-cal
! Adding 15 model components to the UV plane model.
! The established model now contains 19 components and 1.01977 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.305793Jy  sigma=0.002781
! Fit after  self-cal, rms=0.305284Jy  sigma=0.002779
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-0.8, -1.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0752836 Jy
! Component: 100  -  total flux cleaned = 0.129407 Jy
! Total flux subtracted in 100 components = 0.129407 Jy
! Clean residual min=-0.016182 max=0.059412 Jy/beam
! Clean residual mean=0.000384 rms=0.005568 Jy/beam
! Combined flux in latest and established models = 1.14918 Jy
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 25 components and 1.14918 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.273865Jy  sigma=0.002338
! Fit after  self-cal, rms=0.272423Jy  sigma=0.002326
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-0.4, 1.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0578953 Jy
! Component: 100  -  total flux cleaned = 0.0962693 Jy
! Total flux subtracted in 100 components = 0.0962693 Jy
! Clean residual min=-0.014765 max=0.050399 Jy/beam
! Clean residual mean=0.000244 rms=0.004573 Jy/beam
! Combined flux in latest and established models = 1.24545 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 32 components and 1.24545 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.252541Jy  sigma=0.002050
! Fit after  self-cal, rms=0.251001Jy  sigma=0.002041
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-5.2, -4.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.046431 Jy
! Component: 100  -  total flux cleaned = 0.0778229 Jy
! Total flux subtracted in 100 components = 0.0778229 Jy
! Clean residual min=-0.013136 max=0.021449 Jy/beam
! Clean residual mean=0.000146 rms=0.003789 Jy/beam
! Combined flux in latest and established models = 1.32327 Jy
! Performing phase self-cal
! Adding 17 model components to the UV plane model.
! The established model now contains 36 components and 1.32327 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.238882Jy  sigma=0.001877
! Fit after  self-cal, rms=0.238358Jy  sigma=0.001874
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-0.6, 0.2).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0281252 Jy
! Component: 100  -  total flux cleaned = 0.0511315 Jy
! Total flux subtracted in 100 components = 0.0511315 Jy
! Clean residual min=-0.012792 max=0.017161 Jy/beam
! Clean residual mean=0.000074 rms=0.003425 Jy/beam
! Combined flux in latest and established models = 1.3744 Jy
! Performing phase self-cal
! Adding 18 model components to the UV plane model.
! The established model now contains 41 components and 1.3744 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.233330Jy  sigma=0.001785
! Fit after  self-cal, rms=0.233074Jy  sigma=0.001783
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6842 mas, bmaj=1.08 mas, bpa=-7.148 degrees
! Estimated noise=370.169 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.0392132 Jy
! Component: 100  -  total flux cleaned = 0.0650894 Jy
! Component: 150  -  total flux cleaned = 0.0841417 Jy
! Component: 200  -  total flux cleaned = 0.0987598 Jy
! Total flux subtracted in 200 components = 0.0987598 Jy
! Clean residual min=-0.015931 max=0.024182 Jy/beam
! Clean residual mean=-0.000958 rms=0.005036 Jy/beam
! Combined flux in latest and established models = 1.47316 Jy
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 60 components and 1.47316 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.227283Jy  sigma=0.001678
! Fit after  self-cal, rms=0.226668Jy  sigma=0.001673
! Inverting map 
! Your choice of large map pixels excluded 2.72% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        0.89     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.84     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        0.95     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.08     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.94     GC        0.91     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.93     KP        0.94     
!   LA        0.93     MA        1.00*    MC        1.00*    MK        0.95     
!   NL        0.94     NY        1.01     OV        0.94     PT        0.95     
!   SC        1.08     TS        0.92     WF        0.93     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        0.99     GC        0.96     GG        1.00*    
!   HH        3.09     HN        1.42     KK        0.90     KP        1.04     
!   LA        1.02     MA        0.97     MC        0.94     MK        0.91     
!   NL        1.03     NY        1.03     OV        0.95     PT        1.00     
!   SC        1.01     TS        0.89     WF        1.02     WZ        1.02     
! 
!  A total of 39 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.97     FD        0.96     GC        0.91     GG        1.00*    
!   HH        2.02     HN        0.95     KK        1.00     KP        0.98     
!   LA        0.95     MA        0.89     MC        1.21     MK        0.97     
!   NL        0.99     NY        1.02     OV        0.96     PT        0.98     
!   SC        1.00     TS        1.00*    WF        1.03     WZ        1.25     
! 
! 
! Correcting IF 2.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        0.93     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.92     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        0.83     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        0.99     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.95     GC        0.93     GG        1.00*    
!   HH        1.00*    HN        0.93     KK        0.94     KP        0.94     
!   LA        0.92     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        0.91     NY        1.04     OV        0.93     PT        0.97     
!   SC        1.09     TS        0.90     WF        0.93     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.00     GC        0.98     GG        1.00*    
!   HH        2.98     HN        1.43     KK        0.90     KP        1.04     
!   LA        1.01     MA        1.00     MC        0.91     MK        0.96     
!   NL        0.98     NY        1.03     OV        0.94     PT        1.01     
!   SC        0.99     TS        0.90     WF        1.04     WZ        0.97     
! 
!  A total of 39 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.97     GC        0.93     GG        1.00*    
!   HH        2.01     HN        0.94     KK        1.02     KP        0.98     
!   LA        0.95     MA        0.84     MC        1.16     MK        1.02     
!   NL        0.94     NY        1.02     OV        0.96     PT        1.00     
!   SC        1.00     TS        1.00*    WF        1.03     WZ        1.18     
! 
! 
! Correcting IF 3.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.01     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        1.05     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        0.85     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.14     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.98     FD        0.95     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        0.94     KP        0.86     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        0.92     NY        1.05     OV        0.93     PT        0.93     
!   SC        1.09     TS        0.95     WF        0.97     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.01     FD        1.02     GC        1.12     GG        1.00*    
!   HH        2.81     HN        1.42     KK        0.90     KP        0.95     
!   LA        1.04     MA        0.96     MC        0.95     MK        0.92     
!   NL        1.00     NY        1.00     OV        0.93     PT        0.97     
!   SC        1.00     TS        0.93     WF        1.07     WZ        1.05     
! 
!  A total of 39 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.98     FD        0.99     GC        1.07     GG        1.00*    
!   HH        2.62     HN        0.96     KK        1.02     KP        0.89     
!   LA        0.97     MA        0.94     MC        1.23     MK        0.98     
!   NL        0.96     NY        1.00     OV        0.94     PT        0.96     
!   SC        0.97     TS        1.00*    WF        1.09     WZ        1.23     
! 
! 
! Correcting IF 4.
!  A total of 15 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00*    FD        1.00*    GC        1.07     GG        1.00*    
!   HH        1.00*    HN        1.00*    KK        0.69     KP        1.00*    
!   LA        1.00*    MA        1.00*    MC        1.00*    MK        1.00*    
!   NL        1.00*    NY        1.16     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.01     WZ        1.00*    
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        0.96     FD        0.94     GC        1.11     GG        1.00*    
!   HH        1.00*    HN        0.95     KK        0.97     KP        1.06     
!   LA        0.94     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        0.93     NY        1.04     OV        0.90     PT        0.98     
!   SC        1.10     TS        0.93     WF        1.00     WZ        1.00*    
! 
!  A total of 3 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        0.99     FD        1.02     GC        1.17     GG        1.00*    
!   HH        3.06     HN        1.48     KK        0.91     KP        1.17     
!   LA        1.02     MA        0.96     MC        0.91     MK        0.96     
!   NL        1.01     NY        1.00     OV        0.92     PT        1.03     
!   SC        0.99     TS        0.94     WF        1.10     WZ        1.00     
! 
!  A total of 39 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        0.95     FD        0.98     GC        1.10     GG        1.00*    
!   HH        1.47     HN        0.98     KK        1.04     KP        1.10     
!   LA        0.96     MA        0.88     MC        1.24     MK        1.02     
!   NL        0.97     NY        1.00     OV        0.94     PT        1.00     
!   SC        0.96     TS        1.00*    WF        1.11     WZ        1.19     
! 
! 
! Fit before self-cal, rms=0.226668Jy  sigma=0.001673
! Fit after  self-cal, rms=0.240025Jy  sigma=0.001369
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6815 mas, bmaj=1.103 mas, bpa=-6.738 degrees
! Estimated noise=371.071 mJy/beam.
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (-6.8, -3.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0219755 Jy
! Component: 100  -  total flux cleaned = 0.0332207 Jy
! Component: 150  -  total flux cleaned = 0.0394349 Jy
! Component: 200  -  total flux cleaned = 0.0433015 Jy
! Total flux subtracted in 200 components = 0.0433015 Jy
! Clean residual min=-0.010695 max=0.010143 Jy/beam
! Clean residual mean=-0.000278 rms=0.002467 Jy/beam
! Combined flux in latest and established models = 1.51647 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 79 components and 1.51647 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.237799Jy  sigma=0.001339
! Fit after  self-cal, rms=0.237902Jy  sigma=0.001336
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.237902Jy  sigma=0.001336
! Fit after  self-cal, rms=0.225719Jy  sigma=0.001263
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6817 mas, bmaj=1.105 mas, bpa=-6.456 degrees
! Estimated noise=372.297 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00791656 Jy
! Component: 100  -  total flux cleaned = 0.00958501 Jy
! Component: 150  -  total flux cleaned = 0.0104023 Jy
! Component: 200  -  total flux cleaned = 0.0114756 Jy
! Total flux subtracted in 200 components = 0.0114756 Jy
! Clean residual min=-0.003214 max=0.007984 Jy/beam
! Clean residual mean=0.000389 rms=0.001008 Jy/beam
! Combined flux in latest and established models = 1.52794 Jy
selfcal
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 92 components and 1.52794 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225256Jy  sigma=0.001257
! Fit after  self-cal, rms=0.225208Jy  sigma=0.001256
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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)
! Added new window around map position (-1.4, 1).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00448392 Jy
! Component: 100  -  total flux cleaned = 0.00501441 Jy
! Component: 150  -  total flux cleaned = 0.00580129 Jy
! Component: 200  -  total flux cleaned = 0.00664786 Jy
! Total flux subtracted in 200 components = 0.00664786 Jy
! Clean residual min=-0.003154 max=0.004125 Jy/beam
! Clean residual mean=0.000299 rms=0.000899 Jy/beam
! Combined flux in latest and established models = 1.53459 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 99 components and 1.53459 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224864Jy  sigma=0.001252
! Fit after  self-cal, rms=0.224830Jy  sigma=0.001252
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-2, -1.6).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00259509 Jy
! Component: 100  -  total flux cleaned = 0.00300318 Jy
! Component: 150  -  total flux cleaned = 0.00350152 Jy
! Component: 200  -  total flux cleaned = 0.00384766 Jy
! Total flux subtracted in 200 components = 0.00384766 Jy
! Clean residual min=-0.003237 max=0.003637 Jy/beam
! Clean residual mean=0.000248 rms=0.000843 Jy/beam
! Combined flux in latest and established models = 1.53844 Jy
! Performing phase self-cal
! Adding 29 model components to the UV plane model.
! The established model now contains 107 components and 1.53844 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224601Jy  sigma=0.001250
! Fit after  self-cal, rms=0.224586Jy  sigma=0.001250
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-5.4, -1.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00277476 Jy
! Component: 100  -  total flux cleaned = 0.00311799 Jy
! Component: 150  -  total flux cleaned = 0.00353757 Jy
! Component: 200  -  total flux cleaned = 0.00363544 Jy
! Total flux subtracted in 200 components = 0.00363544 Jy
! Clean residual min=-0.003233 max=0.003327 Jy/beam
! Clean residual mean=0.000201 rms=0.000800 Jy/beam
! Combined flux in latest and established models = 1.54207 Jy
! Performing phase self-cal
! Adding 32 model components to the UV plane model.
! The established model now contains 120 components and 1.54207 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.224430Jy  sigma=0.001249
! Fit after  self-cal, rms=0.224418Jy  sigma=0.001249
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.224418Jy  sigma=0.001249
! Fit after  self-cal, rms=0.225910Jy  sigma=0.001246
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.68 mas, bmaj=1.105 mas, bpa=-6.39 degrees
! Estimated noise=372.094 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0044259 Jy
! Component: 100  -  total flux cleaned = 0.00542691 Jy
! Component: 150  -  total flux cleaned = 0.00596009 Jy
! Component: 200  -  total flux cleaned = 0.00645267 Jy
! Total flux subtracted in 200 components = 0.00645267 Jy
! Clean residual min=-0.002593 max=0.003181 Jy/beam
! Clean residual mean=0.000251 rms=0.000703 Jy/beam
! Combined flux in latest and established models = 1.54853 Jy
selfcal
! Performing phase self-cal
! Adding 35 model components to the UV plane model.
! The established model now contains 128 components and 1.54853 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225760Jy  sigma=0.001245
! Fit after  self-cal, rms=0.225745Jy  sigma=0.001244
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.00111594 Jy
! Component: 100  -  total flux cleaned = 0.00158189 Jy
! Component: 150  -  total flux cleaned = 0.00210302 Jy
! Component: 200  -  total flux cleaned = 0.00258962 Jy
! Total flux subtracted in 200 components = 0.00258962 Jy
! Clean residual min=-0.002588 max=0.002877 Jy/beam
! Clean residual mean=0.000217 rms=0.000676 Jy/beam
! Combined flux in latest and established models = 1.55111 Jy
! Performing phase self-cal
! Adding 38 model components to the UV plane model.
! The established model now contains 130 components and 1.55111 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225646Jy  sigma=0.001244
! Fit after  self-cal, rms=0.225643Jy  sigma=0.001244
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.225643Jy  sigma=0.001244
! Fit after  self-cal, rms=0.225713Jy  sigma=0.001243
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=2.494 mas, bmaj=2.545 mas, bpa=9.497 degrees
! Estimated noise=519.327 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0043323 Jy
! Component: 100  -  total flux cleaned = 0.00673446 Jy
! Component: 150  -  total flux cleaned = 0.00830081 Jy
! Component: 200  -  total flux cleaned = 0.00921264 Jy
! Total flux subtracted in 200 components = 0.00921264 Jy
! Clean residual min=-0.001762 max=0.002358 Jy/beam
! Clean residual mean=0.000494 rms=0.000744 Jy/beam
! Combined flux in latest and established models = 1.56033 Jy
selfcal
! Performing phase self-cal
! Adding 28 model components to the UV plane model.
! The established model now contains 151 components and 1.56033 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225709Jy  sigma=0.001243
! Fit after  self-cal, rms=0.225693Jy  sigma=0.001243
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.00134488 Jy
! Component: 100  -  total flux cleaned = 0.00156795 Jy
! Component: 150  -  total flux cleaned = 0.00172399 Jy
! Component: 200  -  total flux cleaned = 0.00180667 Jy
! Total flux subtracted in 200 components = 0.00180667 Jy
! Clean residual min=-0.001880 max=0.002155 Jy/beam
! Clean residual mean=0.000422 rms=0.000722 Jy/beam
! Combined flux in latest and established models = 1.56213 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 154 components and 1.56213 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.225695Jy  sigma=0.001243
! Fit after  self-cal, rms=0.225691Jy  sigma=0.001243
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6792 mas, bmaj=1.105 mas, bpa=-6.393 degrees
! Estimated noise=372.143 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6792 x 1.105 at -6.393 degrees (North through East)
! Clean map  min=-0.0018965  max=0.83402 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.225691Jy  sigma=0.001243
! Fit after  self-cal, rms=0.232691Jy  sigma=0.001175
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6791 mas, bmaj=1.104 mas, bpa=-6.356 degrees
! Estimated noise=372.411 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00143514 Jy
! Component: 100  -  total flux cleaned = 0.00152775 Jy
! Component: 150  -  total flux cleaned = 0.00160423 Jy
! Component: 200  -  total flux cleaned = 0.00174742 Jy
! Total flux subtracted in 200 components = 0.00174742 Jy
! Clean residual min=-0.002287 max=0.002491 Jy/beam
! Clean residual mean=0.000166 rms=0.000605 Jy/beam
! Combined flux in latest and established models = 1.56388 Jy
! Performing phase self-cal
! Adding 24 model components to the UV plane model.
! The established model now contains 160 components and 1.56388 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232582Jy  sigma=0.001174
! Fit after  self-cal, rms=0.232583Jy  sigma=0.001174
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 9.70037e-05 Jy
! Component: 100  -  total flux cleaned = 0.000167537 Jy
! Component: 150  -  total flux cleaned = 0.000296182 Jy
! Component: 200  -  total flux cleaned = 0.000418429 Jy
! Total flux subtracted in 200 components = 0.000418429 Jy
! Clean residual min=-0.002279 max=0.002356 Jy/beam
! Clean residual mean=0.000159 rms=0.000595 Jy/beam
! Combined flux in latest and established models = 1.5643 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 164 components and 1.5643 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.232503Jy  sigma=0.001173
! Fit after  self-cal, rms=0.232503Jy  sigma=0.001173
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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.232503Jy  sigma=0.001173
! Fit after  self-cal, rms=0.231361Jy  sigma=0.001173
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 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.5496 mas, bmaj=0.9033 mas, bpa=-2.463 degrees
! Estimated noise=723.545 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.585897 Jy
! Component: 100  -  total flux cleaned = 0.795177 Jy
! Component: 150  -  total flux cleaned = 0.928856 Jy
! Component: 200  -  total flux cleaned = 1.02833 Jy
! Total flux subtracted in 200 components = 1.02833 Jy
! Clean residual min=-0.014111 max=0.057379 Jy/beam
! Clean residual mean=0.000669 rms=0.005969 Jy/beam
! Combined flux in latest and established models = 1.02833 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 25 model components to the UV plane model.
! The established model now contains 25 components and 1.02833 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6785 mas, bmaj=1.103 mas, bpa=-6.351 degrees
! Estimated noise=372.51 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.145534 Jy
! Component: 100  -  total flux cleaned = 0.234779 Jy
! Component: 150  -  total flux cleaned = 0.297657 Jy
! Component: 200  -  total flux cleaned = 0.343794 Jy
! Total flux subtracted in 200 components = 0.343794 Jy
! Clean residual min=-0.005637 max=0.027137 Jy/beam
! Clean residual mean=0.002788 rms=0.004703 Jy/beam
! Combined flux in latest and established models = 1.37212 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 48 components and 1.37212 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (0.2, -0.8).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0354602 Jy
! Component: 100  -  total flux cleaned = 0.0633091 Jy
! Component: 150  -  total flux cleaned = 0.0855311 Jy
! Component: 200  -  total flux cleaned = 0.10356 Jy
! Total flux subtracted in 200 components = 0.10356 Jy
! Clean residual min=-0.003544 max=0.010838 Jy/beam
! Clean residual mean=0.001367 rms=0.002180 Jy/beam
! Combined flux in latest and established models = 1.47568 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 83 components and 1.47568 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.014798 Jy
! Component: 100  -  total flux cleaned = 0.0270074 Jy
! Component: 150  -  total flux cleaned = 0.0371859 Jy
! Component: 200  -  total flux cleaned = 0.0457609 Jy
! Total flux subtracted in 200 components = 0.0457609 Jy
! Clean residual min=-0.002577 max=0.006066 Jy/beam
! Clean residual mean=0.000754 rms=0.001188 Jy/beam
! Combined flux in latest and established models = 1.52144 Jy
! Adding 59 model components to the UV plane model.
! The established model now contains 114 components and 1.52144 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-0.2, 2.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00741423 Jy
! Component: 100  -  total flux cleaned = 0.0136585 Jy
! Component: 150  -  total flux cleaned = 0.0189884 Jy
! Component: 200  -  total flux cleaned = 0.0235613 Jy
! Total flux subtracted in 200 components = 0.0235613 Jy
! Clean residual min=-0.002413 max=0.003488 Jy/beam
! Clean residual mean=0.000439 rms=0.000783 Jy/beam
! Combined flux in latest and established models = 1.545 Jy
! Adding 48 model components to the UV plane model.
! The established model now contains 131 components and 1.545 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-4.6, -3.4).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00377081 Jy
! Component: 100  -  total flux cleaned = 0.00591289 Jy
! Component: 150  -  total flux cleaned = 0.0079941 Jy
! Component: 200  -  total flux cleaned = 0.00989068 Jy
! Total flux subtracted in 200 components = 0.00989068 Jy
! Clean residual min=-0.002497 max=0.002598 Jy/beam
! Clean residual mean=0.000308 rms=0.000654 Jy/beam
! Combined flux in latest and established models = 1.55489 Jy
! Adding 47 model components to the UV plane model.
! The established model now contains 145 components and 1.55489 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 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 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=2.491 mas, bmaj=2.543 mas, bpa=9.485 degrees
! Estimated noise=521.215 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00519958 Jy
! Component: 100  -  total flux cleaned = 0.00835232 Jy
! Component: 150  -  total flux cleaned = 0.0105279 Jy
! Component: 200  -  total flux cleaned = 0.0120361 Jy
! Total flux subtracted in 200 components = 0.0120361 Jy
! Clean residual min=-0.001733 max=0.002139 Jy/beam
! Clean residual mean=0.000478 rms=0.000677 Jy/beam
! Combined flux in latest and established models = 1.56693 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.000627736 Jy
! Component: 100  -  total flux cleaned = 0.00110661 Jy
! Component: 150  -  total flux cleaned = 0.00134647 Jy
! Component: 200  -  total flux cleaned = 0.00156064 Jy
! Total flux subtracted in 200 components = 0.00156064 Jy
! Clean residual min=-0.001770 max=0.002090 Jy/beam
! Clean residual mean=0.000416 rms=0.000660 Jy/beam
! Combined flux in latest and established models = 1.56849 Jy
! Adding 66 model components to the UV plane model.
! The established model now contains 199 components and 1.56849 Jy
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6785 mas, bmaj=1.103 mas, bpa=-6.351 degrees
! Estimated noise=372.51 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.00178037 Jy
! Component: 100  -  total flux cleaned = -0.00161469 Jy
! Component: 150  -  total flux cleaned = -0.00146203 Jy
! Component: 200  -  total flux cleaned = -0.00139029 Jy
! Total flux subtracted in 200 components = -0.00139029 Jy
! Clean residual min=-0.002448 max=0.002159 Jy/beam
! Clean residual mean=0.000154 rms=0.000564 Jy/beam
! Combined flux in latest and established models = 1.5671 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 205 components and 1.5671 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.230898Jy  sigma=0.001176
! Fit after  self-cal, rms=0.230747Jy  sigma=0.001175
wmodel J1407+2827_X_2001_04_09_pus_map.mod
! Writing 205 model components to file: J1407+2827_X_2001_04_09_pus_map.mod
wobs J1407+2827_X_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J1407+2827_X_2001_04_09_pus_uvs.fits
wwins J1407+2827_X_2001_04_09_pus_map.win
! wwins: Wrote 12 windows to J1407+2827_X_2001_04_09_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 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! clean: niter=1024  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = -0.000143319 Jy
! Component: 100  -  total flux cleaned = 0.000123344 Jy
! Component: 150  -  total flux cleaned = 0.000375119 Jy
! Component: 200  -  total flux cleaned = 0.000750941 Jy
! Component: 250  -  total flux cleaned = 0.00111283 Jy
! Component: 300  -  total flux cleaned = 0.00149771 Jy
! Component: 350  -  total flux cleaned = 0.00190469 Jy
! Component: 400  -  total flux cleaned = 0.00233295 Jy
! Component: 450  -  total flux cleaned = 0.00266286 Jy
! Component: 500  -  total flux cleaned = 0.00298665 Jy
! Component: 550  -  total flux cleaned = 0.0031895 Jy
! Component: 600  -  total flux cleaned = 0.00338955 Jy
! Component: 650  -  total flux cleaned = 0.00353073 Jy
! Component: 700  -  total flux cleaned = 0.00375324 Jy
! Component: 750  -  total flux cleaned = 0.00386339 Jy
! Component: 800  -  total flux cleaned = 0.00405387 Jy
! Component: 850  -  total flux cleaned = 0.00418872 Jy
! Component: 900  -  total flux cleaned = 0.00429542 Jy
! Component: 950  -  total flux cleaned = 0.004454 Jy
! Component: 1000  -  total flux cleaned = 0.00458493 Jy
! Total flux subtracted in 1024 components = 0.00463697 Jy
! Clean residual min=-0.001357 max=0.001445 Jy/beam
! Clean residual mean=0.000095 rms=0.000490 Jy/beam
! Combined flux in latest and established models = 1.57174 Jy
keep
! Adding 79 model components to the UV plane model.
! The established model now contains 283 components and 1.57174 Jy
![Exited script file: muppet]
wmap "J1407+2827_X_2001_04_09_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6785 x 1.103 at -6.351 degrees (North through East)
! Clean map  min=-0.0020494  max=0.83475 Jy/beam
! Writing clean map to FITS file: J1407+2827_X_2001_04_09_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.834746 
invert
! Inverting map 
! Your choice of large map pixels excluded 2.74% of the data.
!  The x-axis pixel size should ideally be below 0.1541 milli-arcsec
!  The y-axis pixel size should ideally be below 0.1632 milli-arcsec
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000490033 
device "J1407+2827_X_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J1407+2827_X_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.176113 0.176113 0.352227 0.704453 1.40891 2.81781 5.63562 11.2712 22.5425 45.085 90.17
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0014 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.834 
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.6785 x 1.103 at -6.351 degrees (North through East)
! Clean map  min=-0.0020494  max=0.83475 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1407+2827_X_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J1407+2827_X_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1407+2827_X_2001_04_09_pus_uvs.log closed on Mon Oct  1 14:43:07 2007