-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add support of Frequencies on non-0 Nyquist Band to fftfreq? #41
Comments
Since neither numpy nor matlab provide this option, it's not clear how much demand is there for this option? Once you have signals whose bandwidth lies in some other range, I suspect we'll have to leave it up to the user to make their axis what they want — after all, the bandwidth does not even need to be contiguous. |
As fftfreq is used for fft outputs, if the signal was sampled under Nyquist Law, the appropriate frequency axis should be [fc-0.5fs,fc+0.5fs). Anyway, we could use DUC/DDC to make fc equals to 0, and the option seems non-essential. But I thought it might be more “elegant”? |
(There is also a multi-band version of Nyquist's law. Basically it just boils down to the bandwidth(s) not overlapping due to aliasing.) I think that in the vast majority of cases where FFTs are used for sampled signals, the bandwidth has already been shifted to center it on zero. The |
In fact, there no official fftfreq in matlab, only a fileexchange inspired by numpy. I add this issue because I need a struct like Frequencies to contraint a function's input, but Frequencies only support fc = 0. Maybe i should define it myself. |
Now
fftfreq
only return the frequency axis on the 0th Nyquist Band by default.Maybe we could add a argument, i.e. fc, to determine where the axis is, like:
The text was updated successfully, but these errors were encountered: