neuropsychology / NeuroKit.py

A Python Toolbox for Statistics and Neurophysiological Signal Processing (EEG, EDA, ECG, EMG...).
http://neurokit.rtfd.io
MIT License
365 stars 102 forks source link

AttributeError: module 'neurokit' has no attribute 'bio_process' #72

Closed ghost closed 5 years ago

ghost commented 6 years ago

I just wanted to try the features of your neurokit. I´m using Anaconda installed on Windows 10. The pip install of neurokit was successful. Then I copied your following sample code into a Spyder window:

Import packages

import neurokit as nk import pandas as pd import numpy as np import seaborn as sns

Download data

df = pd.read_csv("https://raw.githubusercontent.com/neuropsychology/NeuroKit.py/master/examples/Bio/bio_100Hz.csv")

Plot it

df.plot()

Process the signals

bio = nk.bio_process(ecg=df["ECG"], rsp=df["RSP"], eda=df["EDA"], add=df["Photosensor"], sampling_rate=100)

Plot the processed dataframe, normalizing all variables for viewing purpose

nk.z_score(bio["df"]).plot() pd.DataFrame(bio["ECG"]["Cardiac_Cycles"]).plot(legend=False)

The first part imcuding the first plot runs well until nk.bio_process where I get this error message: bio = nk.bio_process(ecg=df["ECG"], rsp=df["RSP"], eda=df["EDA"], add=df["Photosensor"], sampling_rate=100) AttributeError: module 'neurokit' has no attribute 'bio_process'

What went wrong ?

DominiqueMakowski commented 6 years ago

@ursusaquarius Sorry for the delay, I've been away.

This error is indeed weird, as it suggests that 1) neurokit is detected (otherwise it would throw an "there is no module called neurokit" but 2) there neurokit's functions are not available.

Could you run the following to check the version:

import neurokit as nk
nk.__version__

thanks

ghost commented 6 years ago

Hi Dominique,

running these lines created the following output in the console window:

import neurokit as nk nk.version Out[1]: '0.2.5'

Hope this helps to solve this issue I had.

Best regards Reinhold

On Mon, Jul 9, 2018 at 9:42 AM, Dominique Makowski <notifications@github.com

wrote:

@ursusaquarius https://github.com/ursusaquarius Sorry for the delay, I've been away.

This error is indeed weird, as it suggests that 1) neurokit is detected (otherwise it would throw an "there is no module called neurokit" but 2) there neurokit's functions are not available.

Could you run the following to check the version:

import neurokit as nk nk.version

thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neuropsychology/NeuroKit.py/issues/72#issuecomment-403389223, or mute the thread https://github.com/notifications/unsubscribe-auth/Am8wHx9NWDE8aR_84bGsLOmT0YV-J3F2ks5uEwmDgaJpZM4VDDmw .

DominiqueMakowski commented 6 years ago

@ursusaquarius Ok.

Could you try running another function of the package? After you loaded the data, instead of running the bio_process function, try:

bio = nk.ecg_process(ecg=df["ECG"], rsp=df["RSP"], sampling_rate=100)

ghost commented 6 years ago

now I ran this and also again the bio_process function without any error and could also plot the results. The only change I did meanwhile was updating Spyder ... Funny and I don´t really understand ... Any idea what happened from your side ?

On Wed, Jul 11, 2018 at 4:52 PM, Dominique Makowski < notifications@github.com> wrote:

@ursusaquarius https://github.com/ursusaquarius Ok.

Could you try running another function of the package? After you loaded the data, instead of running the bio_process function, try:

bio = nk.ecg_process(ecg=df["ECG"], rsp=df["RSP"], sampling_rate=100)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neuropsychology/NeuroKit.py/issues/72#issuecomment-404198446, or mute the thread https://github.com/notifications/unsubscribe-auth/Am8wH24EmmSDeOBqAo65Si37au_05YUPks5uFhEagaJpZM4VDDmw .

DominiqueMakowski commented 6 years ago

No idea... But glad it works now :)

ghost commented 6 years ago

my project is mainly about ECG and what information could be extracted, starting with raw data received from an ADC. Would you know if Python could handle this fast enough eg on a ESP32 ? Best regards

Outlook für iOShttps://aka.ms/o0ukef beziehen


Von: Dominique Makowski notifications@github.com Gesendet: Mittwoch, Juli 11, 2018 17:23 An: neuropsychology/NeuroKit.py Cc: ursusaquarius; Mention Betreff: Re: [neuropsychology/NeuroKit.py] AttributeError: module 'neurokit' has no attribute 'bio_process' (#72)

No idea... But glad it works now :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/neuropsychology/NeuroKit.py/issues/72#issuecomment-404209848, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Am8wHwnzzZ3L8UMcmPJcdxCS7uSgIsS-ks5uFhh2gaJpZM4VDDmw.

DominiqueMakowski commented 6 years ago

@ursusaquarius Sorry, I've no experience with that kind of stuff 😕

hantekno commented 5 years ago

I get same issue while using it in spyder (based on anaconda, in windows 10), module neurokit has no attribute bio_process. Even im trying to check its version, it still getting the same notification (no atribute version). Can you provide the solution for this issue? thanks dominique

DominiqueMakowski commented 5 years ago

@hantekno, could you confirm that the command import neurokit as nk works?

hantekno commented 5 years ago

@DominiqueMakowski yup, the command work, but still the attribute doesnt work. Actually, i tried it on jupyter notebook, and its work. If you're not busy, can i ask you some question via email? i'm a student, totally new in python and ecg, but i want to learn it, thank you so much

DominiqueMakowski commented 5 years ago

@hantekno If your questions are not confidential, I would prefer you to open a new issue so it can help others 😉