Here, we used 2*abs(fft(x))^2/N to calculate the power spectrum, the result is the same as matlab's PSD program, however, it's N times the results of matlab's periodogram program.
In our program, the ALFF calculated by sqrt(2*abs(fft(x))^2/N) is sqrt(2/N) times of the real amplitude.
In fALFF program, the factor sqrt(2/N) will be removed because fALFF is ALFF(interested)/ALFF(total).
In ALFF program, the ALFF normalized by the global mean (i.e., mALFF) is mostly used, then the factor sqrt(2/N) will be also removed.
As Xiao-Wei said, he wrote the original codes with some history reasons. I did not revised this part and I think the factor sqrt(2/N) have not so bad influence (in most cases, it will be removed). I will talk to Professor Zang about this issue to check if we need to revise this part in the future.
restbrain
Tue, 07/05/2011 - 22:55
Permalink
Both issues are somewhat
Both issues are somewhat related to constant-scaled ALFF. It should not matter the whole brain map (particularly the normalized version), NO?
YAN Chao-Gan
Wed, 07/06/2011 - 16:50
Permalink
Re
Hi!
I agree with Dr. Zuo.
By the way, I post the following email here in case your are intrerested.
Dear Zhiguo,
If you want to calculate the amplitude by using MATLAB's fft, you need to use 2*abs(fft(x))/N, because MATLAB does not scale the output of fft by the length of the input. seth/2009/01/30/mathworks- conversations-and-the-fft/)
(see: http://blogs.mathworks.com/
Here, we used 2*abs(fft(x))^2/N to calculate the power spectrum, the result is the same as matlab's PSD program, however, it's N times the results of matlab's periodogram program.
In our program, the ALFF calculated by sqrt(2*abs(fft(x))^2/N) is sqrt(2/N) times of the real amplitude.
In fALFF program, the factor sqrt(2/N) will be removed because fALFF is ALFF(interested)/ALFF(total).
In ALFF program, the ALFF normalized by the global mean (i.e., mALFF) is mostly used, then the factor sqrt(2/N) will be also removed.
As Xiao-Wei said, he wrote the original codes with some history reasons. I did not revised this part and I think the factor sqrt(2/N) have not so bad influence (in most cases, it will be removed). I will talk to Professor Zang about this issue to check if we need to revise this part in the future.
Best wishes!
Chao-Gan