Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bug in klusters data provider: the number of spikes is now extr…

…acted from the cluster file.
  • Loading branch information...
commit acc95619b2a744333ae2b0474b382e2fa21a61b1 1 parent 796aeb2
Cyrille Rossant authored
Showing with 4 additions and 2 deletions.
  1. +1 −0  experimental/test.py
  2. +3 −2 spiky/dataio.py
View
1  experimental/test.py
@@ -6,6 +6,7 @@
class TestSpiky(SpikyMainWindow):
def initialize_data(self):
filename = "data/test"
+ # filename = "data/subset41test"
provider = KlustersDataProvider()
self.dh = provider.load(filename)
View
5 spiky/dataio.py
@@ -321,11 +321,12 @@ class KlustersDataProvider(DataProvider):
def load(self, filename):
# klusters tests
nchannels = 32
- nspikes = 10000
+ # nspikes = 10000
nsamples = 20
try:
clusters = load_text(filename + ".clu.1", np.int32)
+ nspikes = len(clusters) - 1
except Exception as e:
log_warn("CLU file '%s' not found" % filename)
clusters = np.zeros(nspikes + 1, dtype=np.int32)
@@ -348,7 +349,7 @@ def load(self, filename):
try:
waveforms = load_binary(filename + ".spk.1")
waveforms = waveforms.reshape((nspikes, nsamples, nchannels))
- except Exception as e:
+ except IOError as e:
log_warn("SPK file '%s' not found" % filename)
waveforms = np.zeros((nspikes, nsamples, nchannels))
Please sign in to comment.
Something went wrong with that request. Please try again.