import matplotlib.pyplot as plt
import numpy as np
import skued

times = np.linspace(-5, 15, 256)
data = skued.exponential(times, 0, 1, 3)

@skued.with_irf(4) # IRF is larger than expected time-constant
def exponential_with_irf(time, *args, **kwargs):
    return skued.exponential(time, *args, **kwargs)
conv = exponential_with_irf(times, 0, 1, 3)

plt.figure()
plt.plot(times, data, ".k", label='No IRF')
plt.plot(times, conv, "-r", label='With IRF')
plt.legend()
plt.show()