PIA-Group / BioSPPy

Biosignal Processing in Python
Other
573 stars 274 forks source link

biosppy.signals.ecg #44

Closed SIHHUA closed 5 years ago

SIHHUA commented 5 years ago

Hello,I have some question,and need your help I wanted to use Neuropython but it's still failed I ran the code,and it made error

error module 'biosppy.signals.ecg' has no attribute 'correct_rpeaks'

I checked the file 'biosppy.signals.ecg', there has function'correct_rpeaks',and already has attribute Is file "bio_ecg_preprocessing" wrong or file "biosppy.signals.ecg"?

code

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

df = pd.read_csv("C:/Users/User/Desktop/CH1.csv") df.plot()

bio = nk.ecg_process(ecg=df["ECG1"], rsp=None, sampling_rate=250, filter_type='FIR', filter_band='bandpass', filter_frequency=[3, 45], segmenter='hamilton', quality_model='default', hrv_features=['time', 'frequency'], age=None, sex=None, position=None)

nk.z_score(bio["df"]).plot()

DominiqueMakowski commented 5 years ago

NeuroKit maintainer here :) could you tell us the versions of the biosppy and neurokit packages? You can do so by running, for instance, nk.__version__

SIHHUA commented 5 years ago

NeuroKit version is 0.1.0

capcarr commented 5 years ago

Hi @SIHHUA How did you install NeuroKit and BioSPPy? With pip?

DominiqueMakowski commented 5 years ago

@SIHHUA try upgrading neurokit pip install https://github.com/neuropsychology/NeuroKit.py/zipball/master

SIHHUA commented 5 years ago

Hi @capcarr I referred this website https://neurokit.readthedocs.io/en/latest/tutorials/Python.html I tried Hard step,and file Winython Zero has NeuroKit and BioSPPy

SIHHUA commented 5 years ago

Hi @DominiqueMakowski I tried to upgrade neurokit by your method but it has error Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-j3oj0gb4-build\ What can i do?

DominiqueMakowski commented 5 years ago

@SIHHUA First of all make sure to open a terminal (for instance, WinPython Command Prompt.exe and not python). Then run pip uninstall neurokit and uninstall the old version. Then run again pip install https://github.com/neuropsychology/NeuroKit.py/zipball/master.

If that doesn't work, please re-open an issue in NeuroKit's repo as it is probably related to an outdated installation rather than something wrong with Biosppy

SIHHUA commented 5 years ago

Hi,@DominiqueMakowski It didn't work :( Can I do something for outdated installation?

capcarr commented 5 years ago

@SIHHUA Since the problem seems related to NeuroKit, I'll close this issue here.