Skip to content

Instantly share code, notes, and snippets.

@MarvinT
Created July 11, 2017 05:36
Show Gist options
  • Save MarvinT/c37cd01f55c07adaa6a2ad51b785c18b to your computer and use it in GitHub Desktop.
Save MarvinT/c37cd01f55c07adaa6a2ad51b785c18b to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment