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

Nyquist not included? #2

Open
jamiebullock opened this issue Jun 19, 2012 · 1 comment
Open

Nyquist not included? #2

jamiebullock opened this issue Jun 19, 2012 · 1 comment

Comments

@jamiebullock
Copy link

Hi,

I know now consider iPhoneFFT to be irrelevant due to Apple's Accelerator framework, but it looks like there is a slight error in the iPhoneFFT README, which says "Why is the highest frequency computed equal to half the sampling rate?". It looks to me like your code isn't actually including the Nyquist, which according to the Ooura documentation is stored in the 1st element of the output array:

              output data
                            a[2*k] = R[k], 0<=k<n/2
                            a[2*k+1] = I[k], 0<k<n/2
                            a[1] = R[n/2]

Instead, your code includes the DC component, which like the Nyquist is real-only, and stored in the zero'th element of the output array. It's quite common to discard the DC component and include the Nyquist, but I don't think that's what your code is doing.

Please correct me if I'm wrong, as I'm using Ooura in my own code based on this understanding.

@alexbw
Copy link
Owner

alexbw commented Jun 19, 2012

Should be "right under half the sampling rate".. DC and Nyquist are equally useless in the kind of stuff I was using this codebase for. Thanks for the catch. If it matters to you, can you edit the README and make a pull request?

Best,
Alex

On Jun 19, 2012, at 11:50 AM, Jamie Bullock wrote:

Hi,

I know now consider iPhoneFFT to be irrelevant due to Apple's Accelerator framework, but it looks like there is a slight error in the iPhoneFFT README, which says "Why is the highest frequency computed equal to half the sampling rate?". It looks to me like your code isn't actually including the Nyquist, which according to the Ooura documentation is stored in the 1st element of the output array:

             output data
                           a[2*k] = R[k], 0<=k<n/2
                           a[2*k+1] = I[k], 0<k<n/2
                           a[1] = R[n/2]

Instead, your code includes the DC component, which like the Nyquist is real-only, and stored in the zero'th element of the output array. It's quite common to discard the DC component and include the Nyquist, but I don't think that's what your code is doing.

Please correct me if I'm wrong, as I'm using Ooura in my own code based on this understanding.


Reply to this email directly or view it on GitHub:
#2

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