kwikteam / klusta

Automatic spike sorting up to 64 channels
BSD 3-Clause "New" or "Revised" License
54 stars 40 forks source link

Extract waveform bug. #22

Open shabnamkadir opened 8 years ago

shabnamkadir commented 8 years ago

Extracting waveforms : 77%|#######7 | 3398/4404 [22:34<07:05, 2.37it/s]/home/smgxsk1/miniconda3/envs/klusta/lib/python2.7/site-packages/klusta/traces/waveform.py:134: RuntimeWarning: i nvalid value encountered in double_scalars s_aligned = np.sum(wave_n_p * u) / np.sum(wave_n_p) + s_min

I've encountered this new bug.

rossant commented 8 years ago

looks like a division by 0 error, not sure what causes it. Having a tiny snippet of raw data that reproduce it would help

atugrulozdemir commented 8 years ago

Hi, Regarding this issue, please feel free to take a look at the files in my drive folder: https://drive.google.com/open?id=0B6gQN5nsE0f1SmwzZTBLS1R4LTQ Just for your information I tried differen durations to see if I get this value error. It works for 6 and 10 sec of recording, but not for 15 although it looks fine in the raw data. Shanks 3 and 6 work, Shanks 2 and 5 do not. Best, Tugrul

nippoo commented 8 years ago

Hey there,

For some reason I can't reproduce this.

I'm just launching klusta --detect-only Tugrul5.prm and boom, it works.

Maybe try a longer section of data?

atugrulozdemir commented 8 years ago

Interesting.. I tried it again, and it does not work when I run klusta Tugrul5.prm or klusta --detect-only Tugrul5.prm for 15sec.dat

I uploaded 30sec.dat now. I tried it on both linux and mac. What am I doing wrong, I don't get it. https://drive.google.com/open?id=0B6gQN5nsE0f1SmwzZTBLS1R4LTQ

Thanks alot

2016-06-16 14:36 GMT+01:00 Max Hunter notifications@github.com:

Hey there,

For some reason I can't reproduce this.

I'm just launching klusta --detect-only Tugrul5.prm and boom, it works.

Maybe try a longer section of data?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kwikteam/klusta/issues/22#issuecomment-226486660, or mute the thread https://github.com/notifications/unsubscribe/AL0r4Lvg7E4zPQSi2kMnk1AvTAo0S5_pks5qMVFEgaJpZM4IgRGe .

nippoo commented 8 years ago

What version of numpy do you have?

nippoo commented 8 years ago

Actually can you give me the output of pip list and conda list (when you're in the right venv)?

Just tried the 30sec and works fine on all Tugrul*s that I tried... spike detection completes quickly and successfully!

atugrulozdemir commented 8 years ago

(newklusta)ip149-148-240-84:10122014 atugrulozdemir$ pip list appnope (0.1.0) backports-abc (0.4) backports.shutil-get-terminal-size (1.0.0) backports.ssl-match-hostname (3.5.0.1) certifi (2016.2.28) click (6.6) cookies (2.2.1) Cython (0.24) decorator (4.0.9) funcsigs (1.0.2) galry (0.3.1) h5py (2.2.1) ipykernel (4.3.1) ipython (4.2.0) ipython-genutils (0.1.0) joblib (0.9.4) jupyter-client (4.2.2) jupyter-core (4.1.0) klusta (3.0.9) klustakwik2 (0.2.4) klustaviewa (0.4.3) kwiklib (0.3.4) matplotlib (1.2.1) mock (2.0.0) nose (1.3.7) numexpr (2.2.2) numpy (1.8.2) pandas (0.12.0) path.py (0.0.0) pbr (1.10.0) pexpect (4.0.1) phy (1.0.4) phycontrib (1.0.12) pickleshare (0.5) pip (8.1.2) ptyprocess (0.5) py (1.4.31) Pygments (2.1.3) PyOpenGL (3.1.0) pyparsing (2.0.1) pytest (2.9.2) python-dateutil (2.4.1) pytz (2016.4) pyzmq (15.2.0) qtconsole (4.2.1) qtools (0.1.2) requests (2.10.0) responses (0.5.1) scipy (0.13.2) setuptools (21.2.1) simplegeneric (0.8.1) singledispatch (3.4.0.3) six (1.10.0) tables (3.0.0) tornado (4.3) tqdm (4.7.2) traitlets (4.2.1) vispy (0.4.0) wheel (0.29.0)

(newklusta)ip149-148-240-84:10122014 atugrulozdemir$ conda list

packages in environment at /Users/atugrulozdemir/miniconda/envs/newklusta:

# appnope 0.1.0 py27_0 defaults backports 1.0 py27_0 defaults backports-abc 0.4 backports.shutil-get-terminal-size 1.0.0 backports.ssl-match-hostname 3.5.0.1 certifi 2016.2.28 click 6.6 cookies 2.2.1 cython 0.24 py27_0 defaults dateutil 2.4.1 py27_0 defaults decorator 4.0.9 py27_0 defaults freetype 2.4.10 1 http://repo.continuum.io/pkgs/free/osx-64/freetype-2.4.10-1.tar.bz2 funcsigs 1.0.2 galry 0.3.1 get_terminal_size 1.0.0 py27_0 defaults h5py 2.2.1 np17py27_0 defaults hdf5 1.8.9 2 http://repo.continuum.io/pkgs/free/osx-64/hdf5-1.8.9-2.tar.bz2 ipykernel 4.3.1 ipython 4.2.0 py27_1 defaults ipython-genutils 0.1.0 ipython_genutils 0.1.0 py27_0 defaults joblib 0.9.4 jupyter-client 4.2.2 jupyter-core 4.1.0 klusta 3.0.9 klustakwik2 0.2.4 nppy27_0 kwikteam klustaviewa 0.4.3 kwiklib 0.3.4 libpng 1.5.13 1 http://repo.continuum.io/pkgs/free/osx-64/libpng-1.5.13-1.tar.bz2 matplotlib 1.2.1 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/matplotlib-1.2.1-np17py27_1.tar.bz2 mock 2.0.0 nose 1.3.7 py27_1 defaults numexpr 2.2.2 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/numexpr-2.2.2-np17py27_1.tar.bz2 numpy 1.8.2 py27_0 http://repo.continuum.io/pkgs/free/osx-64/numpy-1.8.2-py27_0.tar.bz2 openssl 1.0.2h 1 http://repo.continuum.io/pkgs/free/osx-64/openssl-1.0.2h-1.tar.bz2 pandas 0.12.0 np17py27_0 http://repo.continuum.io/pkgs/free/osx-64/pandas-0.12.0-np17py27_0.tar.bz2 path.py 8.2.1 py27_0 defaults pbr 1.10.0 pexpect 4.0.1 py27_0 defaults phy 1.0.4 phycontrib 1.0.12 pickleshare 0.5 py27_0 defaults pip 8.1.1 py27_1 http://repo.continuum.io/pkgs/free/osx-64/pip-8.1.1-py27_1.tar.bz2 ptyprocess 0.5 py27_0 defaults py 1.4.31 pygments 2.1.3 pyopengl 3.1.0 pyparsing 2.0.1 py27_0 defaults pyqt 4.10.4 py27_0 http://repo.continuum.io/pkgs/free/osx-64/pyqt-4.10.4-py27_0.tar.bz2 pytables 3.0.0 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/pytables-3.0.0-np17py27_1.tar.bz2 pytest 2.9.2 python 2.7.11 0 http://repo.continuum.io/pkgs/free/osx-64/python-2.7.11-0.tar.bz2 python-dateutil 2.4.1 python.app 1.2 py27_4 defaults pytz 2016.4 py27_0 defaults pyzmq 15.2.0 qt 4.8.5 3 http://repo.continuum.io/pkgs/free/osx-64/qt-4.8.5-3.tar.bz2 qtconsole 4.2.1 qtools 0.1.2 readline 6.2 2 requests 2.10.0 responses 0.5.1 scipy 0.13.2 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/scipy-0.13.2-np17py27_1.tar.bz2 setuptools 21.2.1 py27_0 http://repo.continuum.io/pkgs/free/osx-64/setuptools-21.2.1-py27_0.tar.bz2 simplegeneric 0.8.1 py27_0 defaults singledispatch 3.4.0.3 sip 4.16.9 py27_0 defaults six 1.10.0 py27_0 defaults sqlite 3.13.0 0 http://repo.continuum.io/pkgs/free/osx-64/sqlite-3.13.0-0.tar.bz2 tables 3.0.0 tk 8.5.18 0 http://repo.continuum.io/pkgs/free/osx-64/tk-8.5.18-0.tar.bz2 tornado 4.3 tqdm 4.7.2 traitlets 4.2.1 py27_0 defaults vispy 0.4.0 wheel 0.29.0 py27_0 http://repo.continuum.io/pkgs/free/osx-64/wheel-0.29.0-py27_0.tar.bz2 zlib 1.2.8 3 http://repo.continuum.io/pkgs/free/osx-64/zlib-1.2.8-3.tar.bz2 (newklusta)ip149-148-240-84:10122014 atugrulozdemir$

2016-06-16 15:00 GMT+01:00 Max Hunter notifications@github.com:

Actually can you give me the output of pip list and conda list (when you're in the right venv)?

Just tried the 30sec and works fine on all Tugrul*s that I tried... spike detection completes quickly!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kwikteam/klusta/issues/22#issuecomment-226493598, or mute the thread https://github.com/notifications/unsubscribe/AL0r4BIpt0oAeLtTVa2zVBmVy-Vp7mGBks5qMVb5gaJpZM4IgRGe .

atugrulozdemir commented 8 years ago

Hi Max,

Did you have time to take a look at the list? Tugrul

2016-06-16 15:02 GMT+01:00 Ahmet Tugrul Ozdemir ozdemirtug@gmail.com:

(newklusta)ip149-148-240-84:10122014 atugrulozdemir$ pip list appnope (0.1.0) backports-abc (0.4) backports.shutil-get-terminal-size (1.0.0) backports.ssl-match-hostname (3.5.0.1) certifi (2016.2.28) click (6.6) cookies (2.2.1) Cython (0.24) decorator (4.0.9) funcsigs (1.0.2) galry (0.3.1) h5py (2.2.1) ipykernel (4.3.1) ipython (4.2.0) ipython-genutils (0.1.0) joblib (0.9.4) jupyter-client (4.2.2) jupyter-core (4.1.0) klusta (3.0.9) klustakwik2 (0.2.4) klustaviewa (0.4.3) kwiklib (0.3.4) matplotlib (1.2.1) mock (2.0.0) nose (1.3.7) numexpr (2.2.2) numpy (1.8.2) pandas (0.12.0) path.py (0.0.0) pbr (1.10.0) pexpect (4.0.1) phy (1.0.4) phycontrib (1.0.12) pickleshare (0.5) pip (8.1.2) ptyprocess (0.5) py (1.4.31) Pygments (2.1.3) PyOpenGL (3.1.0) pyparsing (2.0.1) pytest (2.9.2) python-dateutil (2.4.1) pytz (2016.4) pyzmq (15.2.0) qtconsole (4.2.1) qtools (0.1.2) requests (2.10.0) responses (0.5.1) scipy (0.13.2) setuptools (21.2.1) simplegeneric (0.8.1) singledispatch (3.4.0.3) six (1.10.0) tables (3.0.0) tornado (4.3) tqdm (4.7.2) traitlets (4.2.1) vispy (0.4.0) wheel (0.29.0)

(newklusta)ip149-148-240-84:10122014 atugrulozdemir$ conda list

packages in environment at

/Users/atugrulozdemir/miniconda/envs/newklusta: # appnope 0.1.0 py27_0 defaults backports 1.0 py27_0 defaults backports-abc 0.4 backports.shutil-get-terminal-size 1.0.0 backports.ssl-match-hostname 3.5.0.1 certifi 2016.2.28 click 6.6 cookies 2.2.1 cython 0.24 py27_0 defaults dateutil 2.4.1 py27_0 defaults decorator 4.0.9 py27_0 defaults freetype 2.4.10 1 http://repo.continuum.io/pkgs/free/osx-64/freetype-2.4.10-1.tar.bz2 funcsigs 1.0.2 galry 0.3.1 get_terminal_size 1.0.0 py27_0 defaults h5py 2.2.1 np17py27_0 defaults hdf5 1.8.9 2 http://repo.continuum.io/pkgs/free/osx-64/hdf5-1.8.9-2.tar.bz2 ipykernel 4.3.1 ipython 4.2.0 py27_1 defaults ipython-genutils 0.1.0 ipython_genutils 0.1.0 py27_0 defaults joblib 0.9.4 jupyter-client 4.2.2 jupyter-core 4.1.0 klusta 3.0.9 klustakwik2 0.2.4 nppy27_0 kwikteam klustaviewa 0.4.3 kwiklib 0.3.4 libpng 1.5.13 1 http://repo.continuum.io/pkgs/free/osx-64/libpng-1.5.13-1.tar.bz2 matplotlib 1.2.1 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/matplotlib-1.2.1-np17py27_1.tar.bz2 mock 2.0.0 nose 1.3.7 py27_1 defaults numexpr 2.2.2 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/numexpr-2.2.2-np17py27_1.tar.bz2 numpy 1.8.2 py27_0 http://repo.continuum.io/pkgs/free/osx-64/numpy-1.8.2-py27_0.tar.bz2 openssl 1.0.2h 1 http://repo.continuum.io/pkgs/free/osx-64/openssl-1.0.2h-1.tar.bz2 pandas 0.12.0 np17py27_0 http://repo.continuum.io/pkgs/free/osx-64/pandas-0.12.0-np17py27_0.tar.bz2 path.py 8.2.1 py27_0 defaults pbr 1.10.0 pexpect 4.0.1 py27_0 defaults phy 1.0.4 phycontrib 1.0.12 pickleshare 0.5 py27_0 defaults pip 8.1.1 py27_1 http://repo.continuum.io/pkgs/free/osx-64/pip-8.1.1-py27_1.tar.bz2 ptyprocess 0.5 py27_0 defaults py 1.4.31 pygments 2.1.3 pyopengl 3.1.0 pyparsing 2.0.1 py27_0 defaults pyqt 4.10.4 py27_0 http://repo.continuum.io/pkgs/free/osx-64/pyqt-4.10.4-py27_0.tar.bz2 pytables 3.0.0 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/pytables-3.0.0-np17py27_1.tar.bz2 pytest 2.9.2 python 2.7.11 0 http://repo.continuum.io/pkgs/free/osx-64/python-2.7.11-0.tar.bz2 python-dateutil 2.4.1 python.app 1.2 py27_4 defaults pytz 2016.4 py27_0 defaults pyzmq 15.2.0 qt 4.8.5 3 http://repo.continuum.io/pkgs/free/osx-64/qt-4.8.5-3.tar.bz2 qtconsole 4.2.1 qtools 0.1.2 readline 6.2 2 requests 2.10.0 responses 0.5.1 scipy 0.13.2 np17py27_1 http://repo.continuum.io/pkgs/free/osx-64/scipy-0.13.2-np17py27_1.tar.bz2 setuptools 21.2.1 py27_0 http://repo.continuum.io/pkgs/free/osx-64/setuptools-21.2.1-py27_0.tar.bz2 simplegeneric 0.8.1 py27_0 defaults singledispatch 3.4.0.3 sip 4.16.9 py27_0 defaults six 1.10.0 py27_0 defaults sqlite 3.13.0 0 http://repo.continuum.io/pkgs/free/osx-64/sqlite-3.13.0-0.tar.bz2 tables 3.0.0 tk 8.5.18 0 http://repo.continuum.io/pkgs/free/osx-64/tk-8.5.18-0.tar.bz2 tornado 4.3 tqdm 4.7.2 traitlets 4.2.1 py27_0 defaults vispy 0.4.0 wheel 0.29.0 py27_0 http://repo.continuum.io/pkgs/free/osx-64/wheel-0.29.0-py27_0.tar.bz2 zlib 1.2.8 3 http://repo.continuum.io/pkgs/free/osx-64/zlib-1.2.8-3.tar.bz2 (newklusta)ip149-148-240-84:10122014 atugrulozdemir$

2016-06-16 15:00 GMT+01:00 Max Hunter notifications@github.com:

Actually can you give me the output of pip list and conda list (when you're in the right venv)?

Just tried the 30sec and works fine on all Tugrul*s that I tried... spike detection completes quickly!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kwikteam/klusta/issues/22#issuecomment-226493598, or mute the thread https://github.com/notifications/unsubscribe/AL0r4BIpt0oAeLtTVa2zVBmVy-Vp7mGBks5qMVb5gaJpZM4IgRGe .

ferchaure commented 6 years ago

I know that is an old post, but it could be useful for someone. I had the same problem, It's related to the position of the spike in the chunk, sometimes you can fix it using a bigger value of spikedetekt = {'chunk_size_seconds'