by: Justin Ellis
def wavelet(t, f, t0, Q, phi):
return np.exp(-(t-t0)**2/2/Q**2) * np.cos(2*np.pi*(t-t0)*f+phi)
t = np.linspace(0, 10, 1000)
wvlt = wavelet(t, 0.6, 6.0, 1.8, 0.0)
signal = wvlt + np.random.randn(1000) * 0.3
plt.plot(t, signal, '.')
plt.plot(t, wvlt, lw=3)
plt.xlabel('Time')
plt.ylabel('Signal')
<matplotlib.text.Text at 0x106008250>