would be cleaner to take it from scipy.signal