Convolve/apply an HRF to a 1D regressor file?

Dear AFNI Gurus-

I am asking the following for a friend:

Can any of the AFNI 1d-tools be used to apply (convolve) an HRF to a 1D regressor file?
(3dDeconvolve seems to do that only for stimulus times.)


Hey Paul,

I think the aptly-named and easy-to-find “waver” function can be used with -GAM and a few other options.
But the help text by Mr. Afni himself recommends using 3dDeconvolve instead somehow.
Since you are also an expert in Python, you may find scipy.ndimage.convolve1d() equally easy to use?

Cheers, Hendrik

Hi, Hendrik-

Thanks for providing a pretty comprehensive answer. I will pass those solutions along!


It seems like this refers to “waver -FILE”, where one can pass an arbitrary basis function in 1D format to be convolved with another 1D event file.

That is the one use of waver that I do not believe is duplicated elsewhere. Of course, it could be tossed into easily enough…

  • rick