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

change ifft to fft in gate frequency domain calculation #391

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions skrf/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def time_gate(ntwk, start=None, stop=None, center=None, span=None,
window,
npy.zeros(len(t) - stop_idx)]

#IFFT the gate, so we have it's frequency response, aka kernel
kernel=fft.fftshift(fft.ifft(fft.ifftshift(gate, axes=0), axis=0))
#FFT the gate, so we have it's frequency response, aka kernel
kernel=fft.ifftshift(fft.fft(fft.fftshift(gate, axes=0), axis=0))
kernel =abs(kernel).flatten() # take mag and flatten
kernel=kernel/sum(kernel) # normalize kernel

Expand Down