## Finely tuned imaging and deconvolution

           1 lut rainbow3
           2 read uv 1mm
           3 uv_show
           4 uv_stat weight
           5 input uv_map
           6 let weight_mode UN
           7 let uv_cell 7.5 1
           8 uv_map
           9 show beam
          10 show dirty
          11 input clean
          12 let niter 1000
          13 hogbom /flux 0 0.6
          14 show residual
          15 let niter 2000
          16 hogbom /flux 0 0.6
          17 show residual
          18 let niter 4000
          19 hogbom /flux 0 0.6
          20 show residual
          21 show clean
          22 support
          23 hogbom /flux 0 0.6
          24 show residual
          25 show clean
          26 write beam 1mm
          27 write dirty 1mm
          28 write clean 1mm
          29 write residual 1mm
          30 write cct 1mm
          31 exit

Comments:

Step 1
  Select a color lookup table which nicely displays the features of the studied source.
Step 2
  Read data from the 1mm.uvt file to an internal MAPPING buffer.
Step 3
  Displays the scatter plot of the amplitude vs spatial frequency of the visibilities. This commands is similar to the GO UVALL command (see previous section), except that it works only on the data previously loaded in the internal buffer.
Step 4
  Predicts the synthesized beam, expected noise level, and recommended pixel size for different values of the robust weighting threshold. This helps the user to select the threshold used in the imaging steps (2nd parameter of the uv_cell variable).
Steps 5-10
  Compute a tailored dirty beam and dirty image. Step 5 displays the SIC variables that customizes the behavior of the UV_MAP command. Step 6 and 7 selects robust weighting (instead of the default natural weighting) and the associated threshold. Step 8 actually computes the results which are stored in internal buffers and visualized in steps 9 and 10.
Steps 11-14
  First deconvolution on internal buffers. Resulting clean residuals, clean image and clean component tables are also stored in internal buffers. Step 11 displays the SIC variables that customizes the behavior of all the clean deconvolution algorithms. Steps 12 select the stopping criterion by enabling a maximum of 1000 clean components. Step 13 launches the deconvolution using the simplest CLEAN algorithm with simultaneous plot of the cumulative flux as a function of the number of found clean components. Step 14 displays the residuals, i.e. remaining undeconvolved signal.
Steps 15-24
  Successive tries of the deconvolution to ensure deep enough cleaning, just by changing the stopping criterion (here the total number of clean components).
Step 25
  Displays the resulting clean image.
Steps 26-30
  Write the results (dirty beam, dirty image, clean image, clean residuals and clean component table) on disk files for use in future sessions.