-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When computing ftt1d and ifft1d using Datalab algorithms with shift=False, the x axis of the reverse fourier transform is erroneous. Indeed the reconstruction algorithm present in ifft1d function suppose the frequency array, x, to be sorted. This is not the case if the fft1d was calculated with the parameter shift=False. In addition, in not-shifted fft, fist and last element of the frequency vector has the same module but opposite sign.
The result is that the denominator of the following fraction is zero:
dt = 1.0 / (x[-1] - x[0] + (x[1] - x[0]))
To reproduce
Execute the fourier transform and its reverse on a signal, with shift=False
Proposed Fix
The solution I propose is to sort x before computing dt in ifft1d.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working