-
Notifications
You must be signed in to change notification settings - Fork 43
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
FFTphase function #58
Comments
Hi @aquilesr, can you clarify the feature request? Linking to another library that does something similar, or a web page demonstrating this type of analysis would be very helpful. Thanks! |
Note that you can create your own array of complex numbers, apply the FFT, then read the result. My understanding is that the imaginary component of the resulting data represents phase. https://github.com/swharden/FftSharp#fft-using-complex-numbers |
Hi Scott,
Sorry for my bad English, it's not my native language.
Waves have 3 characteristics, magnitude, frequency and phase.
You did the FFTmagnitude and FFTfreq function. However I think you are missing FFTphase, which I don't think is the imaginary component, but the FFT=a+bi => phase=tag-1(b/a) and some other considerations.
I congratulate you for your great work which has been very useful to me.
|
Thank you for clarifying! I better understand the request now, and I agree this would be a great feature to add. |
Took a while to get to it, but I'm adding this feature in now. Note that one can measure phase like this: double[] values = /* your data */
Complex[] fft = FftSharp.Transform.FFT(values);
double[] phases = fft.Select(x=>Math.Atan2(x.Imaginary, x.Real)).ToArray(); |
This would be a very useful function to be able to recreate the shape of a wave
The text was updated successfully, but these errors were encountered: