You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to read .ecg files from these 2 databases:
normal sinus rhythm RR interval database
congestive heart failure RR interval database
I've searched the Internet for a while and the only answer I got was to use the pyECG packages to read these .ecg files. But when I tried this code down below, from pyecg import ECGRecord ecg_path = "C:\\Users\\vince\\Desktop\\ECG database\\normal-sinus-rhythm-rr-interval-database-1.0.0\\nsr001.ecg" record = ECGRecord.from_ishine(ecg_path)
error messages popped up! Traceback (most recent call last): File "<pyshell#16>", line 1, in <module> record = ECGRecord.from_ishine(ecg_path) File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\ecg.py", line 168, in from_ishine return loader.load(ecg_file) File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\importers\ishine.py", line 68, in load record = Holter(ecg_file, check_valid=False) File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 65, in __init__ self.load_header() File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 123, in load_header self.var_block = get_val(filename, 522, 'a'+str(self.var_block_size)).split(b'\x00')[0] File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 20, in get_val val = val[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
By the way, the ecg file was download from the physionet database : Normal Sinus Rhythm RR Interval Database
I don't know what was going on when I got this error message. Can someone help me out?
Or is there any other package that I can use for the same purpose?
The text was updated successfully, but these errors were encountered:
vic22981106
changed the title
Error messages when read .ecg file using PyECG packages
Error messages when reading .ecg file using PyECG packages
Jul 15, 2020
I was trying to read .ecg files from these 2 databases:
normal sinus rhythm RR interval database
congestive heart failure RR interval database
I've searched the Internet for a while and the only answer I got was to use the pyECG packages to read these .ecg files. But when I tried this code down below,
from pyecg import ECGRecord
ecg_path = "C:\\Users\\vince\\Desktop\\ECG database\\normal-sinus-rhythm-rr-interval-database-1.0.0\\nsr001.ecg"
record = ECGRecord.from_ishine(ecg_path)
error messages popped up!
Traceback (most recent call last):
File "<pyshell#16>", line 1, in <module>
record = ECGRecord.from_ishine(ecg_path)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\ecg.py", line 168, in from_ishine return loader.load(ecg_file)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\importers\ishine.py", line 68, in load record = Holter(ecg_file, check_valid=False)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 65, in __init__ self.load_header()
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 123, in load_header self.var_block = get_val(filename, 522, 'a'+str(self.var_block_size)).split(b'\x00')[0]
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 20, in get_val val = val[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
By the way, the ecg file was download from the physionet database : Normal Sinus Rhythm RR Interval Database
I don't know what was going on when I got this error message. Can someone help me out?
Or is there any other package that I can use for the same purpose?
The text was updated successfully, but these errors were encountered: