fixed float errors

Hi everyone,
I have a question regarding an warning related to 3dmaskave.

My script and Warning Message with 3dmaskave:

3dmaskave -mask rFFA+tlrc -quiet lqj_sigpc+tlrc
++ 3dmaskave: AFNI version=AFNI_2011_12_21_1014(Jun 26 2015) [64-bit]
+++38 voxels survive the mask
*+ Warning: file ./lqj_sigpc+tlrc.BRIK: fixed 1166880 float errors.

Thank you so much for your assistance!


I think the float errors come from NaN’s (not a number), usually generated in Matlab. We filter these to change those values to zero in AFNI with AFNI_FLOATSCAN set to YES. This is the entry that describes that AFNI environment variable in README.environment.

Variable: AFNI_FLOATSCAN (editable)

If this YES/NO variable is set to YES, then floating point bricks
are checked for illegal values (NaN and Infinity) when they are
read into an AFNI program – illegal values will be replaced by
zeros. If a dataset brick contains such illegal values that go
undetected, AFNI programs will probably fail miserably, and have
been known to go into nearly-infinite loops.

Setting this variable implies setting AFNI_NOMMAP to YES, since
only in-memory bricks can be altered (mmap-ed bricks are readonly).

The command line program ‘float_scan’ can be used to check and
patch floating point files.

[14 Sep 1999] The program to3d will scan input float and complex
files for illegal values, and patch illegal input numbers with
zeros in the output dataset. If this behavior is not desired for
some bizarre reason, the ‘-nofloatscan’ command line option to
to3d must be used.

Hello Daniel,
Thank you very much for your quick response.

I ran below (with the command lines) before 3dmaskave, then it did work (no warning).

float_scan -fix cl_sigpc+tlrc.BRIK > cl_psc+tlrc.BRIK
rm -f cl_sigpc+tlrc.BRIK
mv cl_psc+tlrc.BRIK cl_sigpc+tlrc.BRIK

And I have another question about how to use 3dsynthesize.
The warning message I keep getting is(all sub-briks):
*+WARNING: clexp_int+tlrc[0] scale to shorts mean misfit error =12.4% – *caution
*+WARNING: clexp_int+tlrc[1] scale to shorts mean misfit error =10.6% – *caution

My script is:
3dsynthesize -matrix X.xmat.1D -cbucket all_betas.clexp+tlrc -select baseline -prefix stuffNo
3dcalc -a all_runs.clexp+tlrc -b stuffNo+tlrc -expr ‘a-b’ -prefix clexp_int
3dcalc -a all_betas.clexp+tlrc’[0]’ -b clexp_int+tlrc’[0-169]’ -expr ‘a+b’ -prefix clexp_all1
3dcalc -a all_betas.clexp+tlrc’[4]’ -b clexp_int+tlrc’[170-339]’ -expr ‘a+b’ -prefix clexp_all2
Thank you very much again!