Skip to content

Commit

Permalink
Merge pull request #391 from jhillairet/time_gate
Browse files Browse the repository at this point in the history
change ifft to fft in gate frequency domain calculation
  • Loading branch information
jhillairet committed Sep 25, 2020
2 parents 20b36cc + 60a3794 commit a4bba28
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit a4bba28

Please sign in to comment.