I have very little experience working with AFNI and among others I can not fully understand its high-pass filter. Why is the default cutoff frequency so low? I see in the help:

** For pnum > 2, this type of baseline detrending
is roughly equivalent to a highpass filter
with a cutoff of (p-2)/D Hz, where 'D' is the
duration of the imaging run: D = N*TR
** If you use 'A' for pnum, the program will
automatically choose a value based on the
time duration D of the longest run:
pnum = 1 + int(D/150)

So if I have 160 time points and a TR=2s, D=320s, pnum=1+int(320/150)=1+2=3 and the cutoff will be (3-2)/320=1/320 Hz, so it will not filter out any low-frequency drift! Is there something I miss?

It seems to me that 1/320 Hz would be indeed be the
main low frequency drift, modeling one complete cycle
over the course of a run. What seems odd about that?

So this applies to 3dDeconvolve, is that right? Note
that 3dDeconvolve is not directly intending to do band
pass filtering, at least not on its own. This comment
is talking about polynomial trend fitting, and how it
approximately relates to high pass filtering.

Actually, I might wonder if the formula would be more
accurate as (p-1)/(2D) Hz, which is 1/D at p=3, and is
2/D at p=5.

So modeling 1/D Hz (1/320 Hz in your example) handles
one complete cycle over the duration of the data. In
3dDeconvolve, this applies to modeling with a cubic
polynomial (which can look like a sine wave, say, though
its shape is allowed to vary). For p=5, a fifth degree
polynomial completes 2 “cycles” over the duration.
Hence it might be akin to a 2/D high pass filter.

But again, this is not supposed to be identical to a
Fourier filter. If you want that, tell afni_proc.py
to use it via -regress_bandpass.

Thanks a lot for your response! Removing only drift at 1/320 Hz might be sensitivity-inefficient. It might be expected that low frequency drifts are either related to the scanner or to the task-unrelated physiology and thus they should be removed. Otherwise, the low frequency drifts decrease the sensitivity for task-fMRI analyses. In FSL and SPM by default all low-frequency drifts below 1/100 and 1/128 are removed, and I usually see more significant activation when I make this cutoff frequency higher.

The polort function is from 3dDeconvolve, sorry for not clarifying that in my original post!

So my current understanding is that for an ordinary single-subject fMRI analysis, afni_proc.py will by default remove the very, very low frequency drift using polort (even if I do not directly call polort), and if I want to remove other low-frequency drifts I should use regress_bandpass. Am I correct?

However, AFNI help for regress-bandpass says:

-regress_bandpass lowf highf : bandpass the frequency range
e.g. -regress_bandpass 0.01 0.1
This option is intended for use in resting state analysis.

and so it suggests it is not for task-based data. How to interpret it?

Yes, your interpretation seems correct. If you wish to add high pass
filtering on top of polorts (maybe change it to 2 then), feel free to do so.
That is not something we tend to suggest, though it would probably not
be many additional terms, and so would not be a concern.

Thanks again for your response! Switching pnum to 2 effectively switches polort off, does it not? What are the reasons you do not suggest removing signal corresponding to low frequencies, e.g. <1/100 Hz? Sorry for so many questions!

Using -polort 2 is modeling a quadratic trend. Assuming one
is also using a high pass filter, nothing more than quadratic
may be needed.

But the typical usage for us is not to use sinusoid trend
modeling, but polynomials, in which case the -polort degree
depends on the duration of each run (the longer the duration,
the higher the trend degree). Polynomial trend removal is
akin to that of low frequencies, so it is not quite accurate
to say we do not suggest it, it is just not using stationary
sinusoids.

rick

The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.