Created
August 19, 2020 00:31
-
-
Save jeakwon/602e982257d3dbb3b4f03270bd767719 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
t = np.arange(1000) | |
v = np.zeros(1000) | |
v[10]=1 | |
v[200]=5 | |
v[240]=2 | |
def psc(t, tau1, tau2): | |
assert tau1<tau2 | |
y = ( -np.exp(-t/tau1) + np.exp(-t/tau2) ) | |
A_ = (tau2/tau1)**(tau1/(tau1-tau2)) | |
ret = np.convolve(v, y/A_, 'full') | |
return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment