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))