Comments (8)
@jaros1024 That's weird indeed, I'll look at it :)
Could you tell me what is your version of NeuroKit and Biosppy?
from neurokit.py.
I just noticed that I had NeuroKit version 0.2.0 installed, but just updated to 0.2.7 and the problem is still the same. Biosppy is 0.6.1 - so I haven't changed anything.
from neurokit.py.
Great, could you provide a sample of data and a reproducible code snippet so that I can reproduce it and dig into it? Thanks!
from neurokit.py.
Sure! See the attached file. It's just a pickle dump, so you can open it like:
import pickle
def open_file(in_file):
with open(in_file, 'rb') as fp:
itemlist = pickle.load(fp)
return itemlist
from neurokit.py.
It works for me with this code:
import pickle
import neurokit as nk
import pandas as pd
def open_file(in_file):
with open(in_file, 'rb') as fp:
itemlist = pickle.load(fp)
return itemlist
data = open_file("sample.dat")
data = pd.DataFrame({"EDA" : data}) # Convert to dataframe
data.plot() # Check signal
results = nk.eda_process(data["EDA"], sampling_rate=100)
# Plot standardized data (visually more clear) wiht SCR peaks markers
nk.plot_events_in_signal(nk.z_score(results["df"]), results["EDA"]["SCR_Peaks_Indexes"])
However, make sure to adjust correctly your sampling_rate (I set to 100 for illustrative purposes)
from neurokit.py.
Thanks! Do you think the error might be caused by wrong sampling_rate? To be honest, my data is so poorly documented that I won't be surprised if the sampling rate in documentation is wrong :)
from neurokit.py.
Just copied and pasted your code. I got an another error:
NeuroKit Warning: eda_process(): Error in cvxEDA algorithm, couldn't extract phasic and tonic components. Using raw signal.
Traceback (most recent call last):
File "C:/Users/Jarek/PycharmProjects/emotion-predictor/test.py", line 22, in <module>
nk.plot_events_in_signal(nk.z_score(results["df"]), results["EDA"]["SCR_Peaks_Indexes"])
File "C:\Users\Jarek\PycharmProjects\emotion-predictor\venv\lib\site-packages\neurokit\signal\events.py", line 271, in plot_events_in_signal
len(events_onsets[0])
IndexError: index 0 is out of bounds for axis 0 with size 0
So it looks like something is wrong with my configuration. What cvxopt version do you use? Mine is 1.2.1.
// never mind, downgraded to Python 3.6 and looks like it works.
from neurokit.py.
@jaros1024 Ok it's good that it works, but I'll try to understand what was wrong with 3.7 and fix it :) thanks for reporting!
from neurokit.py.
Related Issues (20)
- preprocessing ecg recorded in fMRI setting
- AttributeError: module 'sklearn.externals' HOT 8
- Not understanding ecg_wave_detector and plot_events_in_signal?
- Neurokit tutorial producing dissimilar results HOT 1
- Bio_process error with sampling rate of 2000 HOT 3
- How to compute QRS duration interval?? HOT 1
- How to solve this error?? HOT 1
- Computing HRV indices with missing data HOT 1
- Issue put on other part, since this is not currently active one..!_read_xdf error with Shimmer3 recording data HOT 1
- ecg_process(): Sequence too short to compute heart rate - optimising for short signal HOT 1
- python 2 compatibility: make bio_eda compatible HOT 2
- Allow custom markers in nk.plot_events_in_signal function HOT 5
- Strange filter order expected by ecg_preprocess HOT 6
- Bug in eda_scr using slow method
- Peaks information in cardiac cycles HOT 2
- Python 2.7: TypeError: unbound method materials() must be called with Path instance as first argument (got nothing instead) HOT 2
- PPG compatibility HOT 1
- TypeError: 'str' object is not callable HOT 3
- I can't see my trigger channel on Neurokit HOT 5
- eda_process: band, order, and frequency are hardcoded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neurokit.py.