Closed songhat closed 2 years ago
can anyone help me? really appreciate !
there is data congestive-heart-failure-rr-interval-database-1.0.0.zip
@1358467720 , have you attempted to use the WFDB toolbox? In the Python version of the toolbox you can read this annotation file directly from the PhysioNet servers with:
import wfdb
ann = wfdb.rdann('chf202', 'ecg', pn_dir='chf2db')
@briangow really thank your help! but in this data, I want to read the data with code:
import wfdb
record = wfdb.rdrecord('chf202', pn_dir='chf2db')
print(record.record_name)
I get a error here:
Traceback (most recent call last):
File "D:\all_codes\EEG\数据分析\mse\mse.py", line 9, in <module>
record = wfdb.rdrecord('chf202', pn_dir='chf2db')
File "C:\Users\songHat\miniconda3\envs\EEG\lib\site-packages\wfdb\io\record.py", line 2039, in rdrecord
record.check_read_inputs(
File "C:\Users\songHat\miniconda3\envs\EEG\lib\site-packages\wfdb\io\record.py", line 620, in check_read_inputs
raise ValueError("sampto must be greater than sampfrom")
ValueError: sampto must be greater than sampfrom
Process finished with exit code 1
how to fix it? thank you!
@1358467720 my understanding from the project description for chf2db
(https://physionet.org/content/chf2db/1.0.0/) is that the ECG waveform samples are not available - only the annotations are available. As mentioned in the project description you might want to take a look at this project if you need the waveforms + annotations: https://physionet.org/content/chfdb/1.0.0/ .
@briangow really appreciate you, but I find the two data is different. I am confused and don't konw why.
@1358467720 , yes, these appear to be two independent projects. If you need waveform signals + annotations you will have to use the https://physionet.org/content/chfdb/1.0.0/ project.
thank you again. But other data is not suitable for me
there is my code:
there is error: