1

I'm trying to plot the phase graph of an impulse response with python, but the phase looks rather distorted.

How can I add a delay to my code, so that the phase graph looks better, like in this example?

I know that a have to add a delay of 1024 samples / 21.333ms, but don't know how

import matplotlib.pyplot as plt
import numpy as np

fs = 48000
taps = [...]
n = len(taps)//2+1
x=np.linspace(0, fs/2, n, endpoint=True)
h = np.fft.fft(taps)
plt.semilogx(X, np.angle(h[:n], deg=True))
joa77
  • 85
  • 1
  • 9
  • Have a look at [`numpy.unwrap`](https://numpy.org/doc/stable/reference/generated/numpy.unwrap.html#numpy-unwrap) – gboffi Jun 16 '20 at 13:11

0 Answers0