Skip to content
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

Real Number FFT #10

Closed
harrisosserman opened this issue Mar 21, 2019 · 4 comments
Closed

Real Number FFT #10

harrisosserman opened this issue Mar 21, 2019 · 4 comments

Comments

@harrisosserman
Copy link
Contributor

My input data has all real numbers and I am trying to do a realTransform on the input. The docs have an inconsistency, and I'm not sure which part of the output array to look at to get the real value output.

  1. In the Usage section, the docs say "realTransform fills just the left half of the out"
  2. In the realTransform section, the docs say "perform FFT transformation on it, filling the left half of the output with complex values "

If I only want to look at the real (non-imaginary) output values, do I look at the left half or the right half of the output array?

Thank you!

@indutny
Copy link
Owner

indutny commented Mar 21, 2019

Hello!

This is a great question, and I'm sorry for confusion. The output is always an array of complex numbers. For the realTransform, only left half of it will be filled and each complex number in that half would have zero imaginary part.

Does this explanation make more sense?

Thanks again!

@harrisosserman
Copy link
Contributor Author

@indutny that makes a lot of sense! I'll look at only the left half of the output array and treat those as the real part of the Fourier Transform output.

Really appreciate your quick response :)

@indutny
Copy link
Owner

indutny commented Mar 21, 2019

You're very welcome!

If you feel like the description of this method in the README could be improved, please do not hesitate to open a PR 😉

@harrisosserman
Copy link
Contributor Author

@indutny my pleasure: #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants