3dDespike questions


I was wondering when should despiking be performed when analyzing resting-state data. Should it be done at the end of preprocessing or right at the beginning? I also wonder how 3dDespike relates to the wavelet algorithm proposed by Patel et. al (2014). In their paper they say “This is in contrast to the Time Despike, and other sinusoidal curve fitting or tanh functions (such as AFNI’s 3dDespike) for despiking time series, which will only be effective at isolating high frequency events, and will interpolate spikes with a value calculated form the surrounding time points or from a fitted curve. Additionally, these interpolating algorithms may not always correctly identify movement artifacts…”. Are these limitations still true in the current version of 3dDespike?


The typical use of 3dDespike does not interpolate.
It may fit each time series with a modestly smooth
one, but that is only used to determine the relative
magnitude of a spike. Individual time points are
“corrected” if they are too man median absolute
deviations from the trend.

There is no way for the program to know whether a
spike is due to motion. In fact, it was written to
deal with spikes from the scanner, not for motion.
But it turns out that it is useful for motion, too.

One basic point is that a spike will still be a
spike, just a smaller one.

We prefer applying 3dDespike at the beginning, if
it is applied.

  • rick

Hi Rick,
Thank you very much for your answer, it was very helpful.
Are there any default settings that you recommend changing, for example should I use the default, the -NEW or the -NEW25 parameter, and should I change the default -dilate 4?
I also noticed that we can save a 3D+time dataset with the spikiness measure. In what context might this information be useful?