! Started logfile: J1504+1029_S_2001_04_09_pus_uvs.log on Fri Oct  5 16:08:27 2007
obs J1504+1029_S_2001_04_09_pus_uva.fits
! Reading UV FITS file: J1504+1029_S_2001_04_09_pus_uva.fits
! AN table 1: 165 integrations on 190 of 190 possible baselines.
! AN table 2: 113 integrations on 190 of 190 possible baselines.
! AN table 3: 54 integrations on 190 of 190 possible baselines.
! Apparent sampling: 0.0970989 visibilities/baseline/integration-bin.
! *** This seems a bit low - see "help observe" on the binwid argument.
! Found source: J1504+1029
! 
! There are 4 IFs, and a total of 4 channels:
! 
!  IF  Channel    Frequency  Freq offset  Number of   Overall IF
!       origin    at origin  per channel   channels    bandwidth
!  ------------------------------------------------------------- (Hz)
!  01        1  2.22997e+09        8e+06          1        8e+06
!  02        2  2.25997e+09        8e+06          1        8e+06
!  03        3  2.34997e+09        8e+06          1        8e+06
!  04        4  2.36997e+09        8e+06          1        8e+06
! 
! Polarization(s): RR
! 
! Read 1949 lines of history.
! 
! Reading 24500 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 = 512 
print "field_cell =",field_cell
! field_cell = 0.5 
print "taper_size =",taper_size
! taper_size = 20 
![@muppet J1504+1029_S_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 = 512x512 pixels with 0.500x0.500 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 2098 telescope corrections were flagged in sub-array 1.
!  A total of 2017 telescope corrections were flagged in sub-array 2.
!  A total of 933 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 2.
!  A total of 2098 telescope corrections were flagged in sub-array 1.
!  A total of 2017 telescope corrections were flagged in sub-array 2.
!  A total of 933 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 3.
!  A total of 2098 telescope corrections were flagged in sub-array 1.
!  A total of 2017 telescope corrections were flagged in sub-array 2.
!  A total of 933 telescope corrections were flagged in sub-array 3.
! 
! Correcting IF 4.
!  A total of 2098 telescope corrections were flagged in sub-array 1.
!  A total of 2017 telescope corrections were flagged in sub-array 2.
!  A total of 933 telescope corrections were flagged in sub-array 3.
! 
! Fit before self-cal, rms=1.050543Jy  sigma=0.009325
! Fit after  self-cal, rms=0.357117Jy  sigma=0.003008
! 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 
! Estimated beam: bmin=2.262 mas, bmaj=3.429 mas, bpa=-3.909 degrees
! Estimated noise=1112.73 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.666045 Jy
! Component: 100  -  total flux cleaned = 0.892121 Jy
! Total flux subtracted in 100 components = 0.892121 Jy
! Clean residual min=-0.027233 max=0.099713 Jy/beam
! Clean residual mean=0.000322 rms=0.009642 Jy/beam
! Combined flux in latest and established models = 0.892121 Jy
! Performing phase self-cal
! Adding 10 model components to the UV plane model.
! The established model now contains 10 components and 0.892121 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.315099Jy  sigma=0.002594
! Fit after  self-cal, rms=0.314364Jy  sigma=0.002588
! Inverting map 
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.110312 Jy
! Component: 100  -  total flux cleaned = 0.171921 Jy
! Total flux subtracted in 100 components = 0.171921 Jy
! Clean residual min=-0.016081 max=0.041111 Jy/beam
! Clean residual mean=0.000221 rms=0.005330 Jy/beam
! Combined flux in latest and established models = 1.06404 Jy
! Performing phase self-cal
! Adding 16 model components to the UV plane model.
! The established model now contains 22 components and 1.06404 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.251226Jy  sigma=0.001861
! Fit after  self-cal, rms=0.250590Jy  sigma=0.001852
! Inverting map 
! Added new window around map position (4, -0.5).
! clean: niter=100  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0455912 Jy
! Component: 100  -  total flux cleaned = 0.0772969 Jy
! Total flux subtracted in 100 components = 0.0772969 Jy
! Clean residual min=-0.013819 max=0.021335 Jy/beam
! Clean residual mean=0.000168 rms=0.003995 Jy/beam
! Combined flux in latest and established models = 1.14134 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 42 components and 1.14134 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.235337Jy  sigma=0.001655
! Fit after  self-cal, rms=0.234994Jy  sigma=0.001651
! Inverting map 
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 
! Estimated beam: bmin=2.488 mas, bmaj=5.34 mas, bpa=-3.413 degrees
! Estimated noise=523.411 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.047305 Jy
! Component: 100  -  total flux cleaned = 0.0746991 Jy
! Component: 150  -  total flux cleaned = 0.091793 Jy
! Component: 200  -  total flux cleaned = 0.102806 Jy
! Total flux subtracted in 200 components = 0.102806 Jy
! Clean residual min=-0.010594 max=0.014765 Jy/beam
! Clean residual mean=0.000216 rms=0.003234 Jy/beam
! Combined flux in latest and established models = 1.24414 Jy
! Performing phase self-cal
! Adding 42 model components to the UV plane model.
! The established model now contains 73 components and 1.24414 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.226363Jy  sigma=0.001523
! Fit after  self-cal, rms=0.225877Jy  sigma=0.001516
! Inverting map 
print "************** FINISHED NATURAL WEIGHTING CLEAN **************"
! ************** FINISHED NATURAL WEIGHTING CLEAN ************** 
! 
gscale true
! Performing overall amplitude self-cal
! 
! Correcting IF 1.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.00     FD        1.00     GC        1.03     GG        1.00*    
!   HH        1.00*    HN        0.97     KK        1.01     KP        0.97     
!   LA        0.96     MA        1.00*    MC        1.00*    MK        1.00     
!   NL        1.01     NY        1.08     OV        1.01     PT        0.94     
!   SC        0.99     TS        0.98     WF        1.04     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.02     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.90     MC        0.92     MK        1.00*    
!   NL        1.00*    NY        1.02     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.01     WF        1.00*    WZ        0.99     
! 
!  A total of 42 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.89     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.90     MC        0.84     MK        1.00*    
!   NL        1.00*    NY        1.03     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        0.92     
! 
! 
! Correcting IF 2.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.99     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.96     KK        1.01     KP        0.94     
!   LA        0.98     MA        1.00*    MC        1.00*    MK        1.02     
!   NL        1.01     NY        1.09     OV        0.99     PT        0.98     
!   SC        0.98     TS        1.02     WF        1.01     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.04     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.97     MC        1.01     MK        1.00*    
!   NL        1.00*    NY        1.06     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.06     WF        1.00*    WZ        0.99     
! 
!  A total of 42 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.81     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.90     MC        6.53     MK        1.00*    
!   NL        1.00*    NY        1.47     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        0.95     
! 
! 
! Correcting IF 3.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        1.05     FD        0.99     GC        1.00     GG        1.00*    
!   HH        1.00*    HN        0.98     KK        1.04     KP        1.02     
!   LA        0.95     MA        1.00*    MC        1.00*    MK        0.99     
!   NL        1.01     NY        1.06     OV        1.00     PT        0.98     
!   SC        0.96     TS        1.04     WF        1.02     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.98     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.07     MC        0.95     MK        1.00*    
!   NL        1.00*    NY        1.03     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.13     WF        1.00*    WZ        1.02     
! 
!  A total of 42 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        2.49     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.86     MC        3.05     MK        1.00*    
!   NL        1.00*    NY        2.59     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.17     
! 
! 
! Correcting IF 4.
!  A total of 42 telescope corrections were flagged in sub-array 1.
!  Telescope amplitude corrections in sub-array 1:
!   BR        0.98     FD        1.00     GC        1.05     GG        1.00*    
!   HH        1.00*    HN        0.99     KK        0.98     KP        1.04     
!   LA        0.99     MA        1.00*    MC        1.00*    MK        0.97     
!   NL        1.01     NY        1.10     OV        0.99     PT        1.01     
!   SC        0.97     TS        0.97     WF        1.04     WZ        1.00*    
! 
!  A total of 141 telescope corrections were flagged in sub-array 2.
!  Telescope amplitude corrections in sub-array 2:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        1.09     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        1.01     MC        0.92     MK        1.00*    
!   NL        1.00*    NY        1.02     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.01     WF        1.00*    WZ        2.05     
! 
!  A total of 42 telescope corrections were flagged in sub-array 3.
!  Telescope amplitude corrections in sub-array 3:
!   BR        1.00*    FD        1.00*    GC        1.00*    GG        1.00*    
!   HH        0.88     HN        1.00*    KK        1.00*    KP        1.00*    
!   LA        1.00*    MA        0.77     MC        0.94     MK        1.00*    
!   NL        1.00*    NY        1.09     OV        1.00*    PT        1.00*    
!   SC        1.00*    TS        1.00*    WF        1.00*    WZ        1.43     
! 
! 
! Fit before self-cal, rms=0.225877Jy  sigma=0.001516
! Fit after  self-cal, rms=0.311664Jy  sigma=0.001359
dynam = dynam - 0.5
flux_cutoff = imstat(rms) * dynam
! Inverting map and beam 
! Estimated beam: bmin=2.495 mas, bmaj=5.636 mas, bpa=-2.515 degrees
! Estimated noise=522.866 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 (11, 2.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0141823 Jy
! Component: 100  -  total flux cleaned = 0.0176614 Jy
! Component: 150  -  total flux cleaned = 0.0172237 Jy
! Component: 200  -  total flux cleaned = 0.0172256 Jy
! Total flux subtracted in 200 components = 0.0172256 Jy
! Clean residual min=-0.006140 max=0.008245 Jy/beam
! Clean residual mean=0.000043 rms=0.001741 Jy/beam
! Combined flux in latest and established models = 1.26137 Jy
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 94 components and 1.26137 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.310875Jy  sigma=0.001345
! Fit after  self-cal, rms=0.316614Jy  sigma=0.001341
! Inverting map 
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.316614Jy  sigma=0.001341
! Fit after  self-cal, rms=0.335447Jy  sigma=0.001312
dynam = dynam - 0.75
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.499 mas, bmaj=5.624 mas, bpa=-2.483 degrees
! Estimated noise=523.483 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00334133 Jy
! Component: 100  -  total flux cleaned = 0.00564416 Jy
! Component: 150  -  total flux cleaned = 0.00688192 Jy
! Component: 200  -  total flux cleaned = 0.00755215 Jy
! Total flux subtracted in 200 components = 0.00755215 Jy
! Clean residual min=-0.004785 max=0.005690 Jy/beam
! Clean residual mean=0.000055 rms=0.001215 Jy/beam
! Combined flux in latest and established models = 1.26892 Jy
selfcal
! Performing phase self-cal
! Adding 26 model components to the UV plane model.
! The established model now contains 112 components and 1.26892 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.335232Jy  sigma=0.001308
! Fit after  self-cal, rms=0.335408Jy  sigma=0.001307
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! Added new window around map position (18.5, 8.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0044618 Jy
! Component: 100  -  total flux cleaned = 0.00590251 Jy
! Component: 150  -  total flux cleaned = 0.00636901 Jy
! Component: 200  -  total flux cleaned = 0.00646752 Jy
! Total flux subtracted in 200 components = 0.00646752 Jy
! Clean residual min=-0.004464 max=0.004155 Jy/beam
! Clean residual mean=0.000030 rms=0.001080 Jy/beam
! Combined flux in latest and established models = 1.27539 Jy
! Performing phase self-cal
! Adding 22 model components to the UV plane model.
! The established model now contains 126 components and 1.27539 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.335273Jy  sigma=0.001305
! Fit after  self-cal, rms=0.335277Jy  sigma=0.001305
! Inverting map 
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.335277Jy  sigma=0.001305
! Fit after  self-cal, rms=0.339194Jy  sigma=0.001304
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=2.503 mas, bmaj=5.618 mas, bpa=-2.522 degrees
! Estimated noise=524.108 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00239317 Jy
! Component: 100  -  total flux cleaned = 0.00360047 Jy
! Component: 150  -  total flux cleaned = 0.00406814 Jy
! Component: 200  -  total flux cleaned = 0.00441004 Jy
! Total flux subtracted in 200 components = 0.00441004 Jy
! Clean residual min=-0.004053 max=0.004042 Jy/beam
! Clean residual mean=0.000034 rms=0.001004 Jy/beam
! Combined flux in latest and established models = 1.2798 Jy
selfcal
! Performing phase self-cal
! Adding 27 model components to the UV plane model.
! The established model now contains 139 components and 1.2798 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339085Jy  sigma=0.001303
! Fit after  self-cal, rms=0.339083Jy  sigma=0.001303
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000532244 Jy
! Component: 100  -  total flux cleaned = 0.000864059 Jy
! Component: 150  -  total flux cleaned = 0.00101758 Jy
! Component: 200  -  total flux cleaned = 0.00116238 Jy
! Total flux subtracted in 200 components = 0.00116238 Jy
! Clean residual min=-0.003992 max=0.003912 Jy/beam
! Clean residual mean=0.000030 rms=0.000970 Jy/beam
! Combined flux in latest and established models = 1.28096 Jy
! Performing phase self-cal
! Adding 30 model components to the UV plane model.
! The established model now contains 145 components and 1.28096 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.339031Jy  sigma=0.001302
! Fit after  self-cal, rms=0.339019Jy  sigma=0.001302
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 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.339019Jy  sigma=0.001302
! Fit after  self-cal, rms=0.340730Jy  sigma=0.001302
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.371 mas, bmaj=10.68 mas, bpa=9.661 degrees
! Estimated noise=708.242 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00373237 Jy
! Component: 100  -  total flux cleaned = 0.00425448 Jy
! Component: 150  -  total flux cleaned = 0.00439354 Jy
! Component: 200  -  total flux cleaned = 0.00439253 Jy
! Total flux subtracted in 200 components = 0.00439253 Jy
! Clean residual min=-0.004065 max=0.004436 Jy/beam
! Clean residual mean=0.000073 rms=0.001294 Jy/beam
! Combined flux in latest and established models = 1.28535 Jy
selfcal
! Performing phase self-cal
! Adding 19 model components to the UV plane model.
! The established model now contains 155 components and 1.28535 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340671Jy  sigma=0.001301
! Fit after  self-cal, rms=0.340740Jy  sigma=0.001301
flux_cutoff = imstat(rms) * dynam
! Inverting map 
repeat
  if (peak(flux) > flux_cutoff) peakwin win_mult
  clean clean_niter,clean_gain
  flux_cutoff = imstat(rms) * dynam
  selfcal
  new_peak = peak(flux)
  until(new_peak<=flux_cutoff)
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000317069 Jy
! Component: 100  -  total flux cleaned = 0.000506649 Jy
! Component: 150  -  total flux cleaned = 0.000609187 Jy
! Component: 200  -  total flux cleaned = 0.000607899 Jy
! Total flux subtracted in 200 components = 0.000607899 Jy
! Clean residual min=-0.003996 max=0.004353 Jy/beam
! Clean residual mean=0.000069 rms=0.001259 Jy/beam
! Combined flux in latest and established models = 1.28596 Jy
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 163 components and 1.28596 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=0.340714Jy  sigma=0.001301
! Fit after  self-cal, rms=0.340713Jy  sigma=0.001301
! Inverting map 
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 
! Estimated beam: bmin=2.504 mas, bmaj=5.617 mas, bpa=-2.54 degrees
! Estimated noise=524.54 mJy/beam.
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.504 x 5.617 at -2.54 degrees (North through East)
! Clean map  min=-0.0035271  max=0.89587 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.340713Jy  sigma=0.001301
! Fit after  self-cal, rms=2.160442Jy  sigma=0.001162
! Inverting map and beam 
! Estimated beam: bmin=2.509 mas, bmaj=5.617 mas, bpa=-2.525 degrees
! Estimated noise=525.169 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000582486 Jy
! Component: 100  -  total flux cleaned = 0.00106475 Jy
! Component: 150  -  total flux cleaned = 0.0011325 Jy
! Component: 200  -  total flux cleaned = 0.00113106 Jy
! Total flux subtracted in 200 components = 0.00113106 Jy
! Clean residual min=-0.003334 max=0.003481 Jy/beam
! Clean residual mean=0.000038 rms=0.000846 Jy/beam
! Combined flux in latest and established models = 1.28709 Jy
! Performing phase self-cal
! Adding 25 model components to the UV plane model.
! The established model now contains 182 components and 1.28709 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=2.160412Jy  sigma=0.001162
! Fit after  self-cal, rms=2.160438Jy  sigma=0.001161
! Inverting map 
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.000297506 Jy
! Component: 100  -  total flux cleaned = 0.000240968 Jy
! Component: 150  -  total flux cleaned = 0.000297423 Jy
! Component: 200  -  total flux cleaned = 0.000350016 Jy
! Total flux subtracted in 200 components = 0.000350016 Jy
! Clean residual min=-0.003303 max=0.003372 Jy/beam
! Clean residual mean=0.000037 rms=0.000831 Jy/beam
! Combined flux in latest and established models = 1.28744 Jy
! Performing phase self-cal
! Adding 33 model components to the UV plane model.
! The established model now contains 191 components and 1.28744 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=2.160416Jy  sigma=0.001161
! Fit after  self-cal, rms=2.160418Jy  sigma=0.001161
! Inverting map 
! Performing amp+phase self-cal
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=2.160418Jy  sigma=0.001161
! Fit after  self-cal, rms=3.928580Jy  sigma=0.001161
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 
! Estimated beam: bmin=2.269 mas, bmaj=3.552 mas, bpa=-3.873 degrees
! Estimated noise=1153.93 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.673352 Jy
! Component: 100  -  total flux cleaned = 0.902592 Jy
! Component: 150  -  total flux cleaned = 1.00933 Jy
! Component: 200  -  total flux cleaned = 1.07111 Jy
! Total flux subtracted in 200 components = 1.07111 Jy
! Clean residual min=-0.012398 max=0.033541 Jy/beam
! Clean residual mean=0.000238 rms=0.004315 Jy/beam
! Combined flux in latest and established models = 1.07111 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.07111 Jy
! Inverting map and beam 
! Estimated beam: bmin=2.509 mas, bmaj=5.619 mas, bpa=-2.531 degrees
! Estimated noise=525.418 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.0769186 Jy
! Component: 100  -  total flux cleaned = 0.120595 Jy
! Component: 150  -  total flux cleaned = 0.148167 Jy
! Component: 200  -  total flux cleaned = 0.166659 Jy
! Total flux subtracted in 200 components = 0.166659 Jy
! Clean residual min=-0.004825 max=0.011070 Jy/beam
! Clean residual mean=0.000143 rms=0.002001 Jy/beam
! Combined flux in latest and established models = 1.23777 Jy
! Adding 80 model components to the UV plane model.
! The established model now contains 95 components and 1.23777 Jy
! Inverting map 
! Added new window around map position (1.5, -4.5).
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.0132152 Jy
! Component: 100  -  total flux cleaned = 0.0228355 Jy
! Component: 150  -  total flux cleaned = 0.03005 Jy
! Component: 200  -  total flux cleaned = 0.0355528 Jy
! Total flux subtracted in 200 components = 0.0355528 Jy
! Clean residual min=-0.003568 max=0.003923 Jy/beam
! Clean residual mean=0.000075 rms=0.001003 Jy/beam
! Combined flux in latest and established models = 1.27333 Jy
! Adding 42 model components to the UV plane model.
! The established model now contains 129 components and 1.27333 Jy
! Inverting map 
uvtaper 0.3,taper_size
! Gaussian taper: value 0.3 at UV radius = 20 mega-wavelengths.
clean clean_niter,clean_gain
! Inverting map and beam 
! Estimated beam: bmin=8.364 mas, bmaj=10.67 mas, bpa=9.659 degrees
! Estimated noise=709.117 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = 0.00650853 Jy
! Component: 100  -  total flux cleaned = 0.010366 Jy
! Component: 150  -  total flux cleaned = 0.0124889 Jy
! Component: 200  -  total flux cleaned = 0.0131603 Jy
! Total flux subtracted in 200 components = 0.0131603 Jy
! Clean residual min=-0.003216 max=0.003772 Jy/beam
! Clean residual mean=0.000117 rms=0.001246 Jy/beam
! Combined flux in latest and established models = 1.28649 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.000553929 Jy
! Component: 100  -  total flux cleaned = 0.000922091 Jy
! Component: 150  -  total flux cleaned = 0.00128517 Jy
! Component: 200  -  total flux cleaned = 0.00155963 Jy
! Total flux subtracted in 200 components = 0.00155963 Jy
! Clean residual min=-0.003033 max=0.003696 Jy/beam
! Clean residual mean=0.000109 rms=0.001205 Jy/beam
! Combined flux in latest and established models = 1.28805 Jy
! Adding 62 model components to the UV plane model.
! The established model now contains 182 components and 1.28805 Jy
! Inverting map 
uvtaper 0,0
! No UV-taper is currently set.
clean
! Inverting map and beam 
! Estimated beam: bmin=2.509 mas, bmaj=5.619 mas, bpa=-2.531 degrees
! Estimated noise=525.418 mJy/beam.
! clean: niter=200  gain=0.03  cutoff=0
! Component: 050  -  total flux cleaned = -0.000573976 Jy
! Component: 100  -  total flux cleaned = -0.000483639 Jy
! Component: 150  -  total flux cleaned = -0.000315656 Jy
! Component: 200  -  total flux cleaned = -8.52877e-05 Jy
! Total flux subtracted in 200 components = -8.52877e-05 Jy
! Clean residual min=-0.003169 max=0.003437 Jy/beam
! Clean residual mean=0.000042 rms=0.000816 Jy/beam
! Combined flux in latest and established models = 1.28796 Jy
selfcal
! Performing phase self-cal
! Adding 20 model components to the UV plane model.
! The established model now contains 196 components and 1.28796 Jy
! 
! Correcting IF 1.
! 
! Correcting IF 2.
! 
! Correcting IF 3.
! 
! Correcting IF 4.
! 
! Fit before self-cal, rms=3.928278Jy  sigma=0.001162
! Fit after  self-cal, rms=3.928263Jy  sigma=0.001161
wmodel J1504+1029_S_2001_04_09_pus_map.mod
! Writing 196 model components to file: J1504+1029_S_2001_04_09_pus_map.mod
wobs J1504+1029_S_2001_04_09_pus_uvs.fits
! Writing UV FITS file: J1504+1029_S_2001_04_09_pus_uvs.fits
wwins J1504+1029_S_2001_04_09_pus_map.win
! wwins: Wrote 5 windows to J1504+1029_S_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 
! clean: niter=2048  gain=0.01  cutoff=0
! Component: 050  -  total flux cleaned = 5.99127e-05 Jy
! Component: 100  -  total flux cleaned = 0.000164973 Jy
! Component: 150  -  total flux cleaned = 0.0002646 Jy
! Component: 200  -  total flux cleaned = 0.000219444 Jy
! Component: 250  -  total flux cleaned = 0.000130023 Jy
! Component: 300  -  total flux cleaned = -4.41279e-05 Jy
! Component: 350  -  total flux cleaned = -0.000171688 Jy
! Component: 400  -  total flux cleaned = -0.00029597 Jy
! Component: 450  -  total flux cleaned = -0.000456638 Jy
! Component: 500  -  total flux cleaned = -0.000495574 Jy
! Component: 550  -  total flux cleaned = -0.000649748 Jy
! Component: 600  -  total flux cleaned = -0.000800872 Jy
! Component: 650  -  total flux cleaned = -0.000801213 Jy
! Component: 700  -  total flux cleaned = -0.000910109 Jy
! Component: 750  -  total flux cleaned = -0.000945395 Jy
! Component: 800  -  total flux cleaned = -0.000840032 Jy
! Component: 850  -  total flux cleaned = -0.000875031 Jy
! Component: 900  -  total flux cleaned = -0.000772662 Jy
! Component: 950  -  total flux cleaned = -0.000671865 Jy
! Component: 1000  -  total flux cleaned = -0.000572743 Jy
! Component: 1050  -  total flux cleaned = -0.000540713 Jy
! Component: 1100  -  total flux cleaned = -0.000443958 Jy
! Component: 1150  -  total flux cleaned = -0.000476189 Jy
! Component: 1200  -  total flux cleaned = -0.000381698 Jy
! Component: 1250  -  total flux cleaned = -0.00050562 Jy
! Component: 1300  -  total flux cleaned = -0.00038145 Jy
! Component: 1350  -  total flux cleaned = -0.000168522 Jy
! Component: 1400  -  total flux cleaned = -0.000138777 Jy
! Component: 1450  -  total flux cleaned = -7.94927e-05 Jy
! Component: 1500  -  total flux cleaned = -0.00010893 Jy
! Component: 1550  -  total flux cleaned = 7.83575e-06 Jy
! Component: 1600  -  total flux cleaned = 6.54738e-05 Jy
! Component: 1650  -  total flux cleaned = 9.42064e-05 Jy
! Component: 1700  -  total flux cleaned = 0.000179041 Jy
! Component: 1750  -  total flux cleaned = 0.000263081 Jy
! Component: 1800  -  total flux cleaned = 0.000290891 Jy
! Component: 1850  -  total flux cleaned = 0.000373636 Jy
! Component: 1900  -  total flux cleaned = 0.000373371 Jy
! Component: 1950  -  total flux cleaned = 0.000509078 Jy
! Component: 2000  -  total flux cleaned = 0.000643748 Jy
! Total flux subtracted in 2048 components = 0.000750127 Jy
! Clean residual min=-0.001828 max=0.001533 Jy/beam
! Clean residual mean=0.000040 rms=0.000503 Jy/beam
! Combined flux in latest and established models = 1.28871 Jy
keep
! Adding 136 model components to the UV plane model.
! The established model now contains 330 components and 1.28871 Jy
![Exited script file: muppet]
wmap "J1504+1029_S_2001_04_09_pus\_map.fits"
! Inverting map 
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.509 x 5.619 at -2.531 degrees (North through East)
! Clean map  min=-0.0029169  max=0.89463 Jy/beam
! Writing clean map to FITS file: J1504+1029_S_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.89463 
invert
! Inverting map 
float image_rms
image_rms = imstat(rms)
print "The final image rms is",image_rms
! The final image rms is 0.000502012 
device "J1504+1029_S_2001_04_09_pus\_map.eps/VPS"
! Attempting to open device: 'J1504+1029_S_2001_04_09_pus_map.eps/VPS'
loglevs 100*3*image_rms/peak_flux
! The new contour levels are:
!  -0.168342 0.168342 0.336684 0.673368 1.34674 2.69347 5.38694 10.7739 21.5478 43.0955 86.1911
print "clev=",int(3*image_rms*10000)/10000
! clev= 0.0015 
print "peak=",int(1000*peak_flux)/1000
! peak= 0.894 
mapcolor none
! Mapplot colormap: none, contrast: 1 brightness: 0.5.
mapplot cln
! restore: Substituting estimate of restoring beam from last 'invert'.
! Restoring with beam: 2.509 x 5.619 at -2.531 degrees (North through East)
! Clean map  min=-0.0029169  max=0.89463 Jy/beam
mapcolor color, 0.9
! Mapplot colormap: rainbow, contrast: 0.9 brightness: 0.5.
device "J1504+1029_S_2001_04_09_pus\_map.gif/vgif"
! Attempting to open device: 'J1504+1029_S_2001_04_09_pus_map.gif/vgif'
mapplot cln
quit
! Quitting program
! Log file J1504+1029_S_2001_04_09_pus_uvs.log closed on Fri Oct  5 16:08:43 2007