-------------------------------------------
function: smooth_val $steps
-------------------------------------------
keyboard equivalent: none

The "val" radio button (lower right) causes the
"SMOOTH" button to operate on overlaid data
values (.val and possibly .stat).

Left-click

If real-valued data, a nearest neighbor smoothing
is performed on the .val field (vertex[i].val).

If complex-valued data ($complexvalflag is 1),
nearest neighbor smoothing is performed on both
.val and .val2 fields (vertex[i].val and
vertex[i].val2).

If stat mask field is loaded (and "mask"
checked), the stat field (vertex[i].stat)
is also smoothed.

Here are tcl script commands for 10 steps (~3 mm
FWHM) of surface-smoothing of already-read-in
complex data and stat mask:

  swap_val_val2
  smooth_val 10
  swap_val_val2
  smooth_val 10
  swap_stat_val
  smooth_val 10
  swap_stat_val

Here is the equivalent operation for real-valued
data:

  smooth_val 10
  swap_stat_val
  smooth_val 10
  swap_stat_val

Both of the above can also be done more simply
using the tcl wrapper function, smooth, as
follows:

  smooth <steps> <type>
  smooth 10 val


Middle-click (alternate)

A middle-click on the "val" button is a shortcut
to the "cr" smoothing function available on the
larger F3 panel:

  smooth_complexang_realamp 10

This does nearest neighbor complex-valued
smoothing to generate angles, but then inserts
real-valued smoothing of complex amplitude for
amplitudes.  There is less reduction in amplitude
for a given number of smoothing steps because
local phase angle differences are ignored, and do
not reduce amplitude.
