I think I've found the problem. The data range in the dataset you gave me is
quite limited -- most values are between -10 and 10. And the dataset is stored
as shorts -- an integer type. So when averaged, a lot of values are going to be
nearly zero -- and then get truncated to zero when converted back to shorts.
The solution is to convert the file to floats first, as in
3dcalc -a odbl_cat_TR_40+orig -datum float -expr a -prefix fff
then do the '3dmerge -1blur_fwhm' and '3dFWHM' stuff on the fff+orig file,
which will all be done in floats now. You should probably do this regularly
as part of your overall script, deleting the fff+orig dataset when you don't
need it anymore.
Hope this helps. It isn't a wraparound problem as I thought, since I see that
the blurring code correctly expands the FFT length to avoid this problem.