ECG Database curation through Physionet Repository
Physionet is a repository of freely-available medical research data, managed by the MIT Laboratory for Computational Physiology. The aim of phyio-ecg-tools is to allow access for ECG related research and applications in various institutions by easy access, retrieval, and conversion of all ECG databases available on Physionet. Through the use of WFDB package, we were able to access the Physionet Repository and extract all the databases containing any type of ECG data. Different files in this repository are created for different functions, which are explained further.
Put the following command in your terminal/cmd after traversing to the designated folder
git clone https://github.com/Onaga08/physio-ecg-tools.git
This repository uses several Python libraries and dependencies. Install all requirements through the command below.
pip install -r requirements.txt
Now we are ready to run the code!
Used for extracting the ECG related databases from the Physionet Repository. Works by opening the urls of each database, extracting the first paragraph of the description or abstract (in case the description is not found) and looks for the term 'ECG' or 'Electrocardiogram'.
Returns a csv file containing the name and description of the databases of interest.
Traverses through the csv created by main to access the records of each databases. Useful in appending the number of datapoints recorded in each database of interest.
Used to download the database required.
Used to plot every .dat or .edf included in the directory given as argument. Creates a subfolder of .png files.
Final Runnable. Useful in extracting signal amplitudes of all the signals present in each .dat or .edf file in the database. Creates a subdirectory of the .csv files.
For example usage, go to Tests
Pull Requests are welcome. For major changes, please discuss in issues first.