PeakWatch is a project to demonstrate, evaluate, and validate the functionality of the PeakSwift package, which implements algorithms for cleaning up electrocardiogram (ECG) signals, detecting R-peaks, and evaluating signal quality. The associated application PeakWatch takes advantage of all the features PeakSwift has to offer and presents this content in a visually appealing way. Calculations are performed using Apple's HKElectrocardiogram on the device. The results, including electrocardiogram signals, detected R-peaks, transit time, and signal quality, can be exported as a JSON file for further analysis. A Jupyter notebook is provided for analysis of the data to provide insight into runtime, consistency of signal quality assessment, and accuracy of detected peaks compared to the established NeuroKit library.
- Demonstrates the functionality of PeakSwift's ECG signal processing and R-peak detection algorithms.
- Displays ECG data in an intuitive and visually appealing format.
- Utilizes Apple's HealthKit for on-device ECG signal analysis.
- Allows exporting of results, including ECG signals, detected R-peaks, runtime, and signal quality, as a JSON file.
- Includes a Jupyter notebook for in-depth data analysis and comparison with the NeuroKit library.
To install PeakWatch:
- Clone this repository:
git clone https://github.com/CardioKit/PeakWatch.git
- Navigate to
src
- Open the project in Xcode.
- Build and run on a simulator or device.
Follow these steps to use PeakWatch:
- Launch the app on your iOS device.
- Provide necessary permissions for accessing HealthKit data.
- Explore the ECG data, detected R-peaks, and signal quality presented by the app.
- Export results as a JSON file for further analysis.
Use the provided Jupyter notebook to perform detailed data analysis:
- Navigate to the
analysis
folder. - Open the Jupyter notebook file.
- Follow the instructions within the notebook to analyze runtime, signal quality assessment consistency, and peak detection accuracy.
PeakWatch relies on the following libraries:
We welcome contributions to enhance PeakWatch:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Create a pull request.
This project is licensed under the Apache License 2.0.