AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 13, 2008 12:01PM
That isn't a dumb question at all. I just try to keep a habit
of reminding everyone of the search feature. And this example
has particularly good "keywords" for a search. :)

----

Yes, the truncation has always been there.

It is necessary when converting floating point values to short
integers. Not only do shorts have only half the number of bits,
but in order to store real values (say 3.17 using shorts), they
need to be scaled. And the only reasonable way to do that is by
scaling at least an entire volume at a time (NIfTI does the
whole dataset, making it almost unusable for scaled shorts of
multiple volumes).

So the magnitude of one voxel (the max) determines the scaling of
the entire volume. With floats, each magnitude is independent
(having 23 bits of accuracy (6-7 digits)). So the big problem
becomes computational round-off (pushing computation to doubles
instead of floats), not bits of accuracy.

----

The average misfit is taken over all non-zero voxels. This is
the mean percent difference from each float value.

Note that this truncation isn't necessarily such a killer. The
voxels that inflate the mean are those close to 0, but not equal
to it. Those are the voxels that are often of least interest.

For example, if you do not mask the brain in a 3dDeconvolve
computation, there will be a lot of "noise" voxels outside
the brain. Those will probably have low stat values, and
so high "misfit" values, leading to a larger reported misfit
average.

The clear case where this could hurt is with a few really
large voxel values, but where the "cutoff" in values of
interest is much lower.

----

Note that there are places where this had been dealt with
already. For example, the output statistics in 3dDeconvolve
are limited to a max of 1000 for this reason. That gives
you at least 1 decimal place of reliable accuracy.

Another example is afni_proc.py. During the 'scaling' step
(where each value is converted to its "percent of the mean"),
values are limited to 200 (at least by default). That is for
the same reason.

- rick

Subject Author Posted

scale to shorts misfit - OSX 64bit?

nick oosterhof December 12, 2008 05:49PM

Re: scale to shorts misfit - OSX 64bit?

rick reynolds December 12, 2008 06:09PM

Re: scale to shorts misfit - OSX 64bit?

Nick Oosterhof December 13, 2008 09:09AM

Re: scale to shorts misfit - OSX 64bit?

rick reynolds December 13, 2008 12:01PM

Re: scale to shorts misfit - OSX 64bit?

Nick Oosterhof December 15, 2008 01:23PM

Re: scale to shorts misfit - OSX 64bit?

rick reynolds December 15, 2008 02:20PM