! Started logfile: J0423+2108_X_2002_07_24_pus_uvs.log on Fri Feb 22 17:32:45 2008
obs J0423+2108_X_2002_07_24_pus_uva.fits
! Reading UV FITS file: J0423+2108_X_2002_07_24_pus_uva.fits
! AN table 1: 277 integrations on 171 of 171 possible baselines.
! AN table 2: 50 integrations on 171 of 171 possible baselines.
! AN table 3: 44 integrations on 171 of 171 possible baselines.
! AN table 4: 124 integrations on 171 of 171 possible baselines.
! Apparent sampling: 0.177931 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J0423+2108
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! Warning: Unknown AN-table MNTSTA value (3).
!          Will assume that it is ground-based.
! 
! 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 989 lines of history.
! 
! Reading 60244 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 J0423+2108_X_2002_07_24_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 3478 telescope corrections were flagged in sub-array 1.
!  A total of 496 telescope corrections were flagged in sub-array 2.
!  A total of 658 telescope corrections were flagged in sub-array 3.
!  A total of 1753 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 2.
!  A total of 3477 telescope corrections were flagged in sub-array 1.
!  A total of 496 telescope corrections were flagged in sub-array 2.
!  A total of 658 telescope corrections were flagged in sub-array 3.
!  A total of 1757 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 3.
!  A total of 3481 telescope corrections were flagged in sub-array 1.
!  A total of 496 telescope corrections were flagged in sub-array 2.
!  A total of 658 telescope corrections were flagged in sub-array 3.
!  A total of 1813 telescope corrections were flagged in sub-array 4.
! 
! Correcting IF 4.
!  A total of 3470 telescope corrections were flagged in sub-array 1.
!  A total of 496 telescope corrections were flagged in sub-array 2.
!  A total of 658 telescope corrections were flagged in sub-array 3.
!  A total of 1754 telescope corrections were flagged in sub-array 4.
! 
! Fit before self-cal, rms=0.969190Jy  sigma=0.007617
! Fit after  self-cal, rms=0.903974Jy  sigma=0.007233
! 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 4.23% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6004 mas, bmaj=1.02 mas, bpa=-10.13 degrees
! Estimated noise=930.262 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.085961 Jy
! Component: 100  -  total flux cleaned = 0.108346 Jy
! Total flux subtracted in 100 components = 0.108346 Jy
! Clean residual min=-0.006316 max=0.009997 Jy/beam
! Clean residual mean=0.000088 rms=0.001717 Jy/beam
! Combined flux in latest and established models = 0.108346 Jy
! Performing phase self-cal
! Adding 4 model components to the UV plane model.
! The established model now contains 4 components and 0.108346 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.192424Jy  sigma=0.001220
! Fit after  self-cal, rms=0.192246Jy  sigma=0.001219
! Inverting map 
! Your choice of large map pixels excluded 4.23% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Added new window around map position (-0.6, 0).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0119385 Jy
! Component: 100  -  total flux cleaned = 0.0192558 Jy
! Total flux subtracted in 100 components = 0.0192558 Jy
! Clean residual min=-0.005314 max=0.007678 Jy/beam
! Clean residual mean=0.000053 rms=0.001567 Jy/beam
! Combined flux in latest and established models = 0.127601 Jy
! Performing phase self-cal
! Adding 7 model components to the UV plane model.
! The established model now contains 9 components and 0.127601 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.191265Jy  sigma=0.001209
! Fit after  self-cal, rms=0.191242Jy  sigma=0.001208
! Inverting map 
! Your choice of large map pixels excluded 4.23% of the data.
!  The x-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 4.23% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6594 mas, bmaj=1.29 mas, bpa=-8.951 degrees
! Estimated noise=384.557 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.4, -0.2).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0103426 Jy
! Component: 100  -  total flux cleaned = 0.0162538 Jy
! Component: 150  -  total flux cleaned = 0.0201959 Jy
! Component: 200  -  total flux cleaned = 0.0228631 Jy
! Total flux subtracted in 200 components = 0.0228631 Jy
! Clean residual min=-0.003186 max=0.003937 Jy/beam
! Clean residual mean=0.000060 rms=0.000820 Jy/beam
! Combined flux in latest and established models = 0.150464 Jy
! Performing phase self-cal
! Adding 23 model components to the UV plane model.
! The established model now contains 29 components and 0.150464 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.190648Jy  sigma=0.001202
! Fit after  self-cal, rms=0.190616Jy  sigma=0.001202
! Inverting map 
! Your choice of large map pixels excluded 4.23% of the data.
!  The x-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 105 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.97     GC        0.91     HN        1.00     
!   KP        0.97     LA        0.96     MA        1.00*    MC        1.17     
!   MK        1.09     NL        1.03     NY        0.83     ON        0.87     
!   OV        1.04     PT        0.99     SC        1.03     TC        1.00*    
!   WF        0.87     KK        0.90     WZ        0.88     
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.09     FD        0.99     GC        0.93     HN        0.95     
!   KP        0.98     LA        1.00     MA        1.00*    MC        1.00*    
!   MK        1.10     NL        1.05     NY        1.01     ON        1.00*    
!   OV        1.02     PT        1.02     SC        1.19     TC        1.00*    
!   WF        1.47     KK        1.03     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.03     FD        1.00*    GC        0.86     HN        1.08     
!   KP        1.00     LA        1.05     MA        1.00*    MC        1.00*    
!   MK        1.00*    NL        0.89     NY        1.13     ON        1.00*    
!   OV        1.09     PT        0.96     SC        1.00*    TC        1.00*    
!   WF        0.94     KK        1.00*    WZ        1.00*    
! 
!  A total of 90 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        0.97     
!   KP        1.00*    LA        1.00*    MA        0.86     MC        0.88     
!   MK        1.00*    NL        1.00*    NY        0.58     ON        0.74     
!   OV        1.00*    PT        1.00*    SC        0.90     TC        1.00*    
!   WF        0.84     KK        1.00*    WZ        0.96     
! 
! 
! Correcting IF 2.
!  A total of 99 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.97     GC        0.99     HN        1.01     
!   KP        0.93     LA        0.97     MA        1.00*    MC        1.09     
!   MK        1.06     NL        0.97     NY        0.95     ON        0.83     
!   OV        1.01     PT        1.02     SC        1.01     TC        1.00*    
!   WF        0.92     KK        0.93     WZ        0.85     
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.07     FD        0.94     GC        1.06     HN        1.02     
!   KP        0.90     LA        1.04     MA        1.00*    MC        1.00*    
!   MK        1.04     NL        0.96     NY        1.06     ON        1.00*    
!   OV        0.99     PT        1.09     SC        1.15     TC        1.00*    
!   WF        1.29     KK        0.78     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.15     FD        1.00*    GC        0.94     HN        1.02     
!   KP        0.86     LA        0.97     MA        1.00*    MC        1.00*    
!   MK        1.00*    NL        1.08     NY        1.07     ON        1.00*    
!   OV        0.99     PT        1.03     SC        1.00*    TC        1.00*    
!   WF        0.90     KK        1.00*    WZ        1.00*    
! 
!  A total of 90 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        1.04     
!   KP        1.00*    LA        1.00*    MA        0.93     MC        0.82     
!   MK        1.00*    NL        1.00*    NY        0.66     ON        0.85     
!   OV        1.00*    PT        1.00*    SC        0.90     TC        1.00*    
!   WF        0.82     KK        1.00*    WZ        0.87     
! 
! 
! Correcting IF 3.
!  A total of 99 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.96     FD        0.94     GC        1.05     HN        1.00     
!   KP        0.97     LA        0.99     MA        1.00*    MC        1.11     
!   MK        1.08     NL        0.98     NY        0.73     ON        1.01     
!   OV        1.02     PT        1.10     SC        1.04     TC        1.00*    
!   WF        0.91     KK        0.97     WZ        0.91     
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.01     FD        0.99     GC        1.14     HN        1.04     
!   KP        0.90     LA        1.02     MA        1.00*    MC        1.00*    
!   MK        1.04     NL        1.08     NY        1.16     ON        1.00*    
!   OV        1.08     PT        1.05     SC        1.05     TC        1.00*    
!   WF        1.38     KK        0.88     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.06     FD        1.00*    GC        1.02     HN        1.03     
!   KP        1.04     LA        1.08     MA        1.00*    MC        1.00*    
!   MK        1.00*    NL        0.99     NY        1.21     ON        1.00*    
!   OV        0.99     PT        1.09     SC        1.00*    TC        1.00*    
!   WF        1.06     KK        1.00*    WZ        1.00*    
! 
!  A total of 69 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        0.88     
!   KP        1.00*    LA        1.00*    MA        0.78     MC        0.94     
!   MK        1.00*    NL        1.00*    NY        0.78     ON        0.94     
!   OV        1.00*    PT        1.00*    SC        0.98     TC        1.00*    
!   WF        0.87     KK        1.00*    WZ        0.98     
! 
! 
! Correcting IF 4.
!  A total of 117 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.94     FD        0.92     GC        1.17     HN        1.04     
!   KP        0.97     LA        0.95     MA        1.00*    MC        1.80     
!   MK        0.99     NL        1.06     NY        0.68     ON        0.84     
!   OV        1.03     PT        1.03     SC        1.02     TC        1.00*    
!   WF        1.05     KK        0.96     WZ        1.00     
! 
!  A total of 33 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.03     FD        0.91     GC        1.26     HN        1.09     
!   KP        0.95     LA        1.01     MA        1.00*    MC        1.00*    
!   MK        1.00     NL        1.02     NY        1.00     ON        1.00*    
!   OV        1.06     PT        1.09     SC        1.23     TC        1.00*    
!   WF        1.30     KK        0.92     WZ        1.00*    
! 
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00     FD        1.00*    GC        1.23     HN        0.94     
!   KP        1.02     LA        0.99     MA        1.00*    MC        1.00*    
!   MK        1.00*    NL        0.98     NY        1.06     ON        1.00*    
!   OV        0.96     PT        1.08     SC        1.00*    TC        1.00*    
!   WF        1.05     KK        1.00*    WZ        1.00*    
! 
!  A total of 93 telescope corrections were flagged in sub-array 4.
!  Telescope amplitude corrections in sub-array 4:
!   BR        1.00*    FD        1.00*    GC        1.00*    HN        0.90     
!   KP        1.00*    LA        1.00*    MA        0.86     MC        1.19     
!   MK        1.00*    NL        1.00*    NY        0.99     ON        0.71     
!   OV        1.00*    PT        1.00*    SC        0.88     TC        1.00*    
!   WF        0.87     KK        1.00*    WZ        0.94     
! 
! 
! Fit before self-cal, rms=0.190616Jy  sigma=0.001202
! Fit after  self-cal, rms=0.182294Jy  sigma=0.001199
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6641 mas, bmaj=1.303 mas, bpa=-8.974 degrees
! Estimated noise=385.29 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.00157116 Jy
! Component: 100  -  total flux cleaned = 0.00199719 Jy
! Component: 150  -  total flux cleaned = 0.002275 Jy
! Component: 200  -  total flux cleaned = 0.00250661 Jy
! Total flux subtracted in 200 components = 0.00250661 Jy
! Clean residual min=-0.001823 max=0.001781 Jy/beam
! Clean residual mean=-0.000054 rms=0.000508 Jy/beam
! Combined flux in latest and established models = 0.152971 Jy
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 44 components and 0.152971 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.182267Jy  sigma=0.001198
! Fit after  self-cal, rms=0.182273Jy  sigma=0.001198
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.182273Jy  sigma=0.001198
! Fit after  self-cal, rms=0.182647Jy  sigma=0.001198
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6639 mas, bmaj=1.302 mas, bpa=-9 degrees
! Estimated noise=385.512 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000708162 Jy
! Component: 100  -  total flux cleaned = 0.000994395 Jy
! Component: 150  -  total flux cleaned = 0.00123103 Jy
! Component: 200  -  total flux cleaned = 0.0014119 Jy
! Total flux subtracted in 200 components = 0.0014119 Jy
! Clean residual min=-0.001779 max=0.001766 Jy/beam
! Clean residual mean=-0.000060 rms=0.000496 Jy/beam
! Combined flux in latest and established models = 0.154383 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 48 components and 0.154383 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.182635Jy  sigma=0.001198
! Fit after  self-cal, rms=0.182638Jy  sigma=0.001198
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.000151512 Jy
! Component: 100  -  total flux cleaned = 0.000357697 Jy
! Component: 150  -  total flux cleaned = 0.000470225 Jy
! Component: 200  -  total flux cleaned = 0.00057146 Jy
! Total flux subtracted in 200 components = 0.00057146 Jy
! Clean residual min=-0.001780 max=0.001731 Jy/beam
! Clean residual mean=-0.000059 rms=0.000492 Jy/beam
! Combined flux in latest and established models = 0.154954 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 51 components and 0.154954 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.182631Jy  sigma=0.001197
! Fit after  self-cal, rms=0.182627Jy  sigma=0.001197
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.182627Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183051Jy  sigma=0.001197
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6632 mas, bmaj=1.302 mas, bpa=-9.07 degrees
! Estimated noise=386.296 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000559841 Jy
! Component: 100  -  total flux cleaned = 0.000703092 Jy
! Component: 150  -  total flux cleaned = 0.00084689 Jy
! Component: 200  -  total flux cleaned = 0.000958159 Jy
! Total flux subtracted in 200 components = 0.000958159 Jy
! Clean residual min=-0.001782 max=0.001719 Jy/beam
! Clean residual mean=-0.000067 rms=0.000493 Jy/beam
! Combined flux in latest and established models = 0.155913 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 54 components and 0.155913 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183046Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183050Jy  sigma=0.001197
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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 = 7.95889e-05 Jy
! Component: 100  -  total flux cleaned = 0.000211629 Jy
! Component: 150  -  total flux cleaned = 0.00027937 Jy
! Component: 200  -  total flux cleaned = 0.000327045 Jy
! Total flux subtracted in 200 components = 0.000327045 Jy
! Clean residual min=-0.001771 max=0.001728 Jy/beam
! Clean residual mean=-0.000065 rms=0.000491 Jy/beam
! Combined flux in latest and established models = 0.15624 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 59 components and 0.15624 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183049Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183045Jy  sigma=0.001197
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.183045Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183544Jy  sigma=0.001197
clean clean_niter,clean_gain
! Inverting map and beam 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=2.049 mas, bmaj=2.481 mas, bpa=-8.864 degrees
! Estimated noise=583.4 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00139282 Jy
! Component: 100  -  total flux cleaned = 0.00145342 Jy
! Component: 150  -  total flux cleaned = 0.001527 Jy
! Component: 200  -  total flux cleaned = 0.00153907 Jy
! Total flux subtracted in 200 components = 0.00153907 Jy
! Clean residual min=-0.002870 max=0.003096 Jy/beam
! Clean residual mean=-0.000279 rms=0.000894 Jy/beam
! Combined flux in latest and established models = 0.157779 Jy
selfcal
! Performing phase self-cal
! Adding 13 model components to the UV plane model.
! The established model now contains 67 components and 0.157779 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183545Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183545Jy  sigma=0.001197
flux_cutoff = imstat(rms) * dynam
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.000242303 Jy
! Component: 100  -  total flux cleaned = 0.000307561 Jy
! Component: 150  -  total flux cleaned = 0.000369755 Jy
! Component: 200  -  total flux cleaned = 0.000380922 Jy
! Total flux subtracted in 200 components = 0.000380922 Jy
! Clean residual min=-0.002809 max=0.003278 Jy/beam
! Clean residual mean=-0.000258 rms=0.000893 Jy/beam
! Combined flux in latest and established models = 0.15816 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 71 components and 0.15816 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183548Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183544Jy  sigma=0.001197
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6629 mas, bmaj=1.302 mas, bpa=-9.123 degrees
! Estimated noise=387.128 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6629 x 1.302 at -9.123 degrees (North through East)
! Clean map  min=-0.001689  max=0.11294 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 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6008 mas, bmaj=1.021 mas, bpa=-12.17 degrees
! Estimated noise=932.602 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0841094 Jy
! Component: 100  -  total flux cleaned = 0.10875 Jy
! Component: 150  -  total flux cleaned = 0.122001 Jy
! Component: 200  -  total flux cleaned = 0.130673 Jy
! Total flux subtracted in 200 components = 0.130673 Jy
! Clean residual min=-0.004440 max=0.005184 Jy/beam
! Clean residual mean=0.000030 rms=0.001383 Jy/beam
! Combined flux in latest and established models = 0.130673 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 9 model components to the UV plane model.
! The established model now contains 9 components and 0.130673 Jy
! Inverting map and beam 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6629 mas, bmaj=1.302 mas, bpa=-9.123 degrees
! Estimated noise=387.128 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.00895259 Jy
! Component: 100  -  total flux cleaned = 0.0144412 Jy
! Component: 150  -  total flux cleaned = 0.0182194 Jy
! Component: 200  -  total flux cleaned = 0.0207963 Jy
! Total flux subtracted in 200 components = 0.0207963 Jy
! Clean residual min=-0.002015 max=0.002339 Jy/beam
! Clean residual mean=-0.000012 rms=0.000552 Jy/beam
! Combined flux in latest and established models = 0.15147 Jy
! Adding 24 model components to the UV plane model.
! The established model now contains 30 components and 0.15147 Jy
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=2.049 mas, bmaj=2.481 mas, bpa=-8.864 degrees
! Estimated noise=583.4 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00387518 Jy
! Component: 100  -  total flux cleaned = 0.00547373 Jy
! Component: 150  -  total flux cleaned = 0.00626625 Jy
! Component: 200  -  total flux cleaned = 0.00657249 Jy
! Total flux subtracted in 200 components = 0.00657249 Jy
! Clean residual min=-0.002748 max=0.003423 Jy/beam
! Clean residual mean=-0.000244 rms=0.000891 Jy/beam
! Combined flux in latest and established models = 0.158042 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 = 6.58801e-05 Jy
! Component: 100  -  total flux cleaned = 0.000122547 Jy
! Component: 150  -  total flux cleaned = 0.000172024 Jy
! Component: 200  -  total flux cleaned = 0.000215332 Jy
! Total flux subtracted in 200 components = 0.000215332 Jy
! Clean residual min=-0.002742 max=0.003362 Jy/beam
! Clean residual mean=-0.000251 rms=0.000889 Jy/beam
! Combined flux in latest and established models = 0.158258 Jy
! Adding 38 model components to the UV plane model.
! The established model now contains 64 components and 0.158258 Jy
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! Estimated beam: bmin=0.6629 mas, bmaj=1.302 mas, bpa=-9.123 degrees
! Estimated noise=387.128 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000930408 Jy
! Component: 100  -  total flux cleaned = -0.000752648 Jy
! Component: 150  -  total flux cleaned = -0.000604002 Jy
! Component: 200  -  total flux cleaned = -0.000471686 Jy
! Total flux subtracted in 200 components = -0.000471686 Jy
! Clean residual min=-0.001897 max=0.001753 Jy/beam
! Clean residual mean=-0.000066 rms=0.000498 Jy/beam
! Combined flux in latest and established models = 0.157786 Jy
selfcal
! Performing phase self-cal
! Adding 21 model components to the UV plane model.
! The established model now contains 75 components and 0.157786 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.183556Jy  sigma=0.001197
! Fit after  self-cal, rms=0.183558Jy  sigma=0.001197
wmodel J0423+2108_X_2002_07_24_pus_map.mod
! Writing 75 model components to file: J0423+2108_X_2002_07_24_pus_map.mod
wobs J0423+2108_X_2002_07_24_pus_uvs.fits
! Writing UV FITS file: J0423+2108_X_2002_07_24_pus_uvs.fits
wwins J0423+2108_X_2002_07_24_pus_map.win
! wwins: Wrote 3 windows to J0423+2108_X_2002_07_24_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 4.08% of the data.
!  The x-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.000521877 Jy
! Component: 100  -  total flux cleaned = -0.000459943 Jy
! Component: 150  -  total flux cleaned = -0.000400485 Jy
! Component: 200  -  total flux cleaned = -0.000342852 Jy
! Component: 250  -  total flux cleaned = -0.000176926 Jy
! Component: 300  -  total flux cleaned = -4.34265e-05 Jy
! Component: 350  -  total flux cleaned = 6.0456e-05 Jy
! Component: 400  -  total flux cleaned = 8.57838e-05 Jy
! Component: 450  -  total flux cleaned = 8.54838e-05 Jy
! Component: 500  -  total flux cleaned = 3.68959e-05 Jy
! Component: 550  -  total flux cleaned = -5.79927e-05 Jy
! Component: 600  -  total flux cleaned = -0.000104783 Jy
! Component: 650  -  total flux cleaned = -0.000219444 Jy
! Component: 700  -  total flux cleaned = -0.000309891 Jy
! Component: 750  -  total flux cleaned = -0.000376798 Jy
! Component: 800  -  total flux cleaned = -0.000442515 Jy
! Component: 850  -  total flux cleaned = -0.000464358 Jy
! Component: 900  -  total flux cleaned = -0.000550022 Jy
! Component: 950  -  total flux cleaned = -0.000613322 Jy
! Component: 1000  -  total flux cleaned = -0.000696741 Jy
! Total flux subtracted in 1024 components = -0.000717479 Jy
! Clean residual min=-0.001152 max=0.001173 Jy/beam
! Clean residual mean=-0.000052 rms=0.000400 Jy/beam
! Combined flux in latest and established models = 0.157068 Jy
keep
! Adding 79 model components to the UV plane model.
! The established model now contains 154 components and 0.157068 Jy
![Exited script file: muppet]
wmap "J0423+2108_X_2002_07_24_pus\_map.fits"
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-axis pixel size should ideally be below 0.1632 milli-arcsec
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 0.6629 x 1.302 at -9.123 degrees (North through East)
! Clean map  min=-0.0015635  max=0.11255 Jy/beam
! Writing clean map to FITS file: J0423+2108_X_2002_07_24_pus_map.fits
float peak_flux
peak_flux = peak(flux,max)
print "The peak flux is",peak_flux
! The peak flux is 0.112548 
invert
! Inverting map 
! Your choice of large map pixels excluded 4.08% of the data.
!  The x-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.000399916 
device "J0423+2108_X_2002_07_24_pus\_map.eps/VPS"
! Attempting to open device: 'J0423+2108_X_2002_07_24_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -1.06599 1.06599 2.13198 4.26396 8.52793 17.0559 34.1117 68.2234
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0011 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.112 
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.6629 x 1.302 at -9.123 degrees (North through East)
! Clean map  min=-0.0015635  max=0.11255 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J0423+2108_X_2002_07_24_pus\_map.gif/vgif"
! Attempting to open device: 'J0423+2108_X_2002_07_24_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J0423+2108_X_2002_07_24_pus_uvs.log closed on Fri Feb 22 17:33:01 2008