swharden/FftSharp

FftShift

Closed this issue · 1 comments

Spillover from research related to @MV10's question in #68, I think FftSharp would benefit from a FftShift helper function. Same goes for a function that generates negative frequencies to facilitate plotting.

image

Resources

import scipy.fft
import numpy as np

odd number

values = np.arange(7)
print(values)
print(scipy.fft.fftshift(values))
[0 1 2 3 4 5 6]
[4 5 6 0 1 2 3]

even number

values = np.arange(8)
print(values)
print(scipy.fft.fftshift(values))
[0 1 2 3 4 5 6 7]
[4 5 6 7 0 1 2 3]