New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
magnitude of fft showing negative values #100
Comments
Yeah - that doesn't seem right. I will take a look. |
OK - got it. This is because S_original.spectrum_fourier returns the complex spectrum and when it is plotted, we only get the real part, not the absolute value. So - there are a few possible ways to go about this: one would be that the analyzer would return the absolute value, to be consistent with the other spectral analysis methods. But that would mean throwing away the phase information. The other option is for the code in the example to take the absolute value before plotting. I favor the latter, but I am open to suggestions. What do you think? |
two thoughts. without having looked into the code and from my understanding of welch, i suspect the others are really returning the power spectral density (dB/Hz) whereas the fft is returning the complex spectrum. for the code example i think it would be prudent simply to plot the magnitude of the complex value. |
This is closed by that commit |
in the following example:
http://nipy.sourceforge.net/nitime/examples/filtering_fmri.html
the first figure shows the FFT as having negative power.
The text was updated successfully, but these errors were encountered: