SSWarper Misfit Error

Hi experts,

I’m running a resting state analysis closely following example 11 from the help page. My pipeline consists of running SSwarper, Reconall, and The following is my SSwarper command:

\@SSwarper -input ${base_dir}/rawdata/${sid}/anat/*T1w.nii.gz \
	-base MNI152_2009_template_SSW.nii.gz			\
	-subid ${sid}						\
	-odir ${out_dir}/${sid}

After running SSwarper, I get the following warning in a majority of my participants:

^[[7m*+ WARNING:^[[0m olapch_0_cp_ulay.nii[0] scale to shorts mean misfit error = 31.8% -- **** Red Alert ****
 + a) Numerical precision has been lost when truncating results
       from 32-bit floating point to 16-bit integers (shorts).
 + b) Consider writing datasets out in float format.
       In most AFNI programs, use the '-float' option.
 + c) This warning is a new message, but is an old issue
       that arises when storing results in an integer format.
 + d) Don't panic! These messages likely originate in peripheral
       or unimportant voxels. They mean that you must examine your output.
       "Assess the situation and keep a calm head about you,
        because it doesn't do anybody any good to panic."

This misfit error ranges from around 30-75% across participants. A majority of these cases are flagged as “Purple Alert” but some as “Red Alert”. Is this a cause for concern? I saw that this topic was previously discussed (,79033,79033) but the links in the discussion bring you back to the main discussion board. Any help would be greatly appreciated. Is there something you would recommend I do to the data prior to input to SSwarper?

AFNI version = Precompiled binary linux_openmp_64: Jul 28 2021 (Version AFNI_21.2.04 ‘Nerva’)
@SSwarper version = 2.51


Hi Jenna,

The message board has moved a couple of times over the years, causing messages to be renumbered. So some links that are more than 12 years old (perhaps) are no longer accessible via the numbers in the link. Sorry for that.

There is one useful message available in that thread:

These alerts are not such a big deal, actually. They are warnings when truncating float values by the conversion to scaled shorts causes large fractional change to the values. But the major cause of this will be where values close to zero get truncated to exactly zero (though that isn’t the only possibility). In most instances, the voxels that lead to this warning are ones that you probably do not care about at all (e.g. in this case, residual blur from a warp leaving some voxels near zero).

That message can arise in many instances, and in most it is not a cause for concern. But there are cases where it might be (e.g. do not store actual p-values as shorts :).

Does that seem reasonable?

  • rick

Hi, Jenna-

Re. the outputs themselves: how does the skullstripping and alignment look, e.g., using the generated QC images?


Hi Rick and Paul,

Thank you for your responses. All of the skull stripping and alignment look good, only small adjustments need to be made to <10% of the data. Does this suggest that the misfit errors are occurring in voxels outside of the brain? Would you suggest that I formally check this?

Thank you!

Hi, Jenna-

As Rick pointed out, this warning-behavior is most likely where values are veeeery small, which might be ventricles and/or outside the brain. So, likely it isn’t a meaningful issue at all.

One primary point of @SSwarper is the “warper” part: calculating the warp to standard space, which can then be applied in, e.g., I doubt the above affects this at all. This can be verified by checking the QC of the warping—if that looks good, then you should be all set on that front.

The other main part of the program is the “SS” part—skullstripping. You could try substracting the output anatSS image from the original input, and see where differences are large, but by default the output anatSS volume is unifized, to make the brightness levels more uniform across the volume and within tissues. So, actually, unless you have turned unifizing off, this kind of test isn’t possible. And in general, I don’t see why turning off unifizing would be so useful, because often that helps with EPI-anatomical alignment. So, if there aren’t any visual oddities in the anatSS image, I would assume things are fine.


Hi Paul,

Ok, that makes sense. The warps/ss look fine for most participants. I only found one visual oddity in the warp/SS images. Around the midline, there is missing data (voxel values = 0), which is not present in the raw data or the unifized volumes. Could this be due to the misfit error? Thank you for your help.


Screen Shot 2021-08-12 at 2.39.58 PM.png

Oddity? What oddity?

Ooooh, you mean the giant whole in the head? We can’t call that a “feature”?

I am not sure—I will send you a link to share the dataset+script, if that is OK.