How does 3dFourier remove mean and linear trend?

Dear AFNI experts,

I’m using 3dFourier to conduct the temporal filtering procedure. According to the program help, this program removes any mean and linear trend before filtering. Could you please provide details about how the mean and linear trend was removed?

Details could include:

  1. Which algorithm was used to fit the linear trend?
  2. Was detrending performed in the FFT space?

Thank you very much in advance!

Best regards,
Yun Lin

Hi Yun Lin,

I am not an expert with these programs, but I believe 3dBandpass is a more robust program, or perhaps even the newer 3dTproject. Consider using one of them, instead.

Taking a quick look at 3dFourier, the linear trend removal does seem a bit questionable. It wants the endpoints to be zero, and seems to be tilting the data more than detrending it. I do not think the resulting mean or slope will be zero, though perhaps I am missing something, such as it being handled better in the called FFT library function.

That reinforces the notion that you should consider moving on to 3dTproject, if possible (or 3dBandpass, if there is something 3dTproject does not do).

  • rick