Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I read a .dat file together with a .hea file?

I'm trying to read the files from this physionet dataset (https://physionet.org/content/cebsdb/1.0.0/) but I can't figure out how to join the information of the .hea file together with .dat file.

I know how to read them separately and I know I should use the wfdb library, but still I have issues in figuring out from the documentation. I'm using Python 3.x and I'd like to use wfdb together with numpy and pandas.

Any help is appreciated!

Thanks!

like image 687
Riccardo D Avatar asked Dec 20 '25 09:12

Riccardo D


1 Answers

Just read the files without any extension using the 'wfdb' library in Python. You can use 'rdsamp' or 'rdrecord'.

In MATLAB, just read the header file (.hea) using 'rdsamp' from wfdb toolbox. But the corresponding .dat file also needs to be present for extraction.

wfdb Python Library: https://pypi.org/project/wfdb/

like image 100
Sakib Mahmud Avatar answered Dec 22 '25 00:12

Sakib Mahmud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!