Package: ecg-gudb-database
This is an API which provides transparent online access to the ECG GUDBhttp://researchdata.gla.ac.uk/716/without the need of downloading it.DOI: 10.5525/gla.researchdata.716It contains ECGs from 25 subjects. Each subject was recorded performing 5 different tasks for two minutes:sittinga maths test on a tabletwalking on a treadmillrunning on a treadmillusing a hand bikeThe following channels were recorded with two Attys (https://www.attys.tech/) running synchronously:Einthoven II and III with standard cables and the amplifier worn around the waistExercise cheststrap ECG which resembles approximtely V2-V1 with the ECG amplifier directly mounted on the strapAcceleration in X/Y/Z whith the sensor mounted directly on the chest strapThe cheststrap ECG allowed R peak detection even while jogging at a
very high precision (+/- one sample). The sampling rate was 250Hz at a
resolution of 24 bits. The database contains the unfiltered,
DC-coupled signals as originally recorded. In order to be able to link
the ECG artefacts to the behaviour of the subject all but one subject
gave permission to be filmed and the videos are also part of the
database.InstallationSimply install via pip or pip3:pip install ecg_gudb_database
pip3 install ecg_gudb_databaseUsageCheck outusage_example.pyon github which plots the ECG and the heartrate of one subject.ModuleThe module is calledecg_gudb_database:from ecg_gudb_database import GUDbThe constructor loads the ECG data of one subject/experiment from github:ecg_class = GUDb(subject_number, experiment)wheresubject_numberis from 0..24 andexperimentis ‘sitting’, ‘maths’, ‘walking’, ‘hand_bike’ or ‘jogging’.
The arrayecg_class.experimentsis an array of all experiments so that one can loop through the different experiments.Optionally, in case you decide later to download the whole dataset fromhttp://researchdata.gla.ac.uk/716/then
specify the absolute path to the dataset with the optional parameter url without the “file:” specifier:ecg_class = GUDb(subject_number, experiment, url = "/home/bp1/dataset_dataset_716/experiment_data/")Retrieve the ECG dataThe data is available as numpy arrays. The sampling rate is 250Hz for all experiments (ecg_class.fs).
We have recorded Einthoven and from a chest strap.Einthoven:ecg_class.einthoven_I, ecg_class.einthoven_I_filt
ecg_class.einthoven_II, ecg_class.einthoven_II_filt
ecg_class.einthoven_III, ecg_class.einthoven_III_filtChest strap:ecg_class.cs_V2_V1, ecg_class.cs_V2_V1_filtwhere the filtered versions have 50Hz mains and DC removed.R peak annotationsThe two boolean variablesecg_class.anno_cs_existsandecg_class.anno_cables_existstell the user if annotations exist. If yes they can be obtained:if ecg_class.anno_cs_exists:
    chest_strap_anno = ecg_class.anno_cs
else:
    print('No chest strap annotations')
if ecg_class.anno_cables_exists:
    cables_anno = ecg_class.anno_cables
else:
    print("No cables annotations")Accelerometer dataThe accelerometer was worn on a standard belt around the subject’s waist:ecg_class.acc_x
ecg_class.acc_y
ecg_class.acc_zVideos and full dataset for offline useWhere the participant has consented, there is a video for each of the tasks. Here is an example:https://berndporr.github.io/ECG-GUDB/The video and ECG data have been synchronised so they start and end at the same time. The full dataset with the
videos can be requested here:http://researchdata.gla.ac.uk/716/