Created
July 11, 2017 05:36
-
-
Save MarvinT/c37cd01f55c07adaa6a2ad51b785c18b to your computer and use it in GitHub Desktop.
Revisions
-
MarvinT created this gist
Jul 11, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ def filtered_response(spk_times, tau = .01): spk_times = spk_times.reshape((-1, 1)) norm_factor = tau * np.sqrt(2. * np.pi) return lambda t: np.sum(np.exp(-(spk_times - t.reshape((1,-1))) ** 2 / (2 * tau * tau)), 0) / norm_factor