Skip to content

Instantly share code, notes, and snippets.

@btel
Created October 9, 2012 01:34
Show Gist options
  • Save btel/3856053 to your computer and use it in GitHub Desktop.
Save btel/3856053 to your computer and use it in GitHub Desktop.
"Four" lines
#get cluster labels
labels = clusters.labels
# get spike times
sp_times = events.sp_times['data']
# get spikes of class 1
sp_times_cl1 = sp_times[labels==1]
# get peak-to-peak amplitude
n_channels = 2
feature_arr = features.features['data']
feature_names = list(features.features['names'])
p2p = np.zeros((n_channels, len(sp_times)))
for i in range(n_channels):
l = "Ch%d:P2P" % i
f_idx = feature_names.index(l)
p2p[i,:] = feature_arr[:, f_idx]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment