Author: Paul Savoca
Email: ps365@g.ucla.edu
Twitter: @pw_savoca....
Lab: Brain and Body Lab, UCLA
This application is intended for manual editing of ECG data from .Acq files. The GUI allows for manual checking and editting of R-peaks which are initially detected using the Neurokit2 (Makowski et al., 2020).
As of May 2024, you can also edit ECG data stored as a time-series in a .Csv file. The data must be stored as a single column with no header. The application will prompt you to manually enter the sampling rate of your data.
The application generates 2 output files:
- the filtered ECG signal
- the finalized set of R-peaks
These files can then be used for ECG-based analyses (e.g., IBI, HRV, ect.)
- Download 'nk_ecg_gui.py'
- Sample Physiology Data (acquired at 2kHz) is also available: NK_ECG_GUI/Sample_Data/Sample_Physio_2kHz.acq
- Install necessary dependencies:
- 'pip install numpy neurokit2 PySimpleGUI matplotlib mpl_point_clicker bioread'
- To start application -- From command line: 'python nk_ecg_gui.py'
After selecting the .acq file you want to clean, select the channel containing your ECG data and the notch filter you wish to use:
You can then visualize your ECG Data. Zoom and Scroll through data using toolbar:
You can manually added missing peaks using the "Add Peak" function and then clicking where you would like to add the r-peak. It will automatically "snap" to nearest peak:
Alternatively, you can use the "Remove Peak" to identify peaks that were erronously detected, and you wish to be removed from analyses: