PIA-Group/BioSPPy

biosppy.signals.ecg

SIHHUA opened this issue · 9 comments

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()

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__

NeuroKit version is 0.1.0

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

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

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

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?

@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

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

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