3
Example of spike detection method. Requires binary files
4
"current.npy" and "rawtrace.npy".
6
Rossant et al., "A calibration-free electrode compensation method"
13
from brian.library.electrophysiology import *
15
working_dir = os.path.dirname(__file__)
19
current = np.load(os.path.join(working_dir, "current.npy")) # 10000-long vector, 1s duration
20
rawtrace = np.load(os.path.join(working_dir, "trace.npy")) # 10000-long vector, 1s duration
21
t = linspace(0., 1., len(current))
23
# find spikes and compute score
24
spikes, scores = find_spikes(rawtrace, dt=dt, check_quality=True)
26
# plot trace and spikes
27
plot(t, rawtrace, 'k')
28
plot(t[spikes], rawtrace[spikes], 'or')