项目作者: TinaHaitongWang

项目描述 :
Heart rate monitor project
高级语言: Python
项目地址: git://github.com/TinaHaitongWang/bme590hrm.git
创建时间: 2018-10-16T00:35:58Z
项目社区:https://github.com/TinaHaitongWang/bme590hrm

开源协议:MIT License

下载


BME 590 Heart Rate Monitor Project

Build Status

Author: Haitong Wang (Tina)
Date: Oct 20, 2018

This is a project for BME 590 Medical Device Development class. The goal of this
project is to analyze an unknown electrocardiography to understand heart’s activity
over a period of time. We compute mean heart rate BPM, maximum and minimum
lead voltage, duration of ECG, number of beats, and the time when a beat takes place.
Besides the technical analysis, this project also emphasizes on git control and unit
testing.


1.1 Content

Folders and Files Required to Run the Applications

bme590hrm

  1. |___function_files
  2. |___test_data
  3. |___test_files
  4. |___.travis.yml
  5. |___README.md
  6. |___requirement.txt

Following table contains all functional files for this application

Function name Unit test
main_function.py test_json_output.py
dataValidation.py test_dataValidation.py
filter_data.py test_filterdata.py
peak_detection.py test_peak_detection.py
metrics_dictionary.py test_json_output.py
calculateMean_hr_bpm.py test_calculate_mean_hr_bpm.py
calculate_beats_number_and_beats.py test_voltage_extreme_and_duration.py
plot_data.py

1.2 Instruction for use the program

  1. 1.2.1 Download all requirement files including function_files, test_files and test_data
  2. and requirement files
  3. 1.2.2 Install all requirement package
  4. 1.2.3 Run main_function.py in the function_files folder (if you want to run the function
  5. using data provided, otherwise please update the file name and file path in the
  6. main_function.py )
  7. 1.2.4 Resultant json files should be stored under the same path in the folder called
  8. Metrics_test_data in the orginial .csv file name
  9. 1.2.5 for pytest, please use the following code to avoid subdirectory problem
  10. python -m pytest test_files -v --pep8
  11. Note: for calculating mean bpm, user can specify the length of data to calculate bpm.
  12. Default setting has not input on that part.

1.3 Schematic
1.1 Import data

  1. 1.2 Data verification
  2. 1.3 Data Processing
  3. 1.3.1 mean_hr_bpm: estimated average heart rate over a user-specified number of minutes (can choose a default interval)
  4. 1.3.2 Unit testing for mean_hr_bpm
  5. 1.3.3 voltage_extremes: tuple containing minimum and maximum lead voltages
  6. 1.3.4 Unit testing for voltage_extremes
  7. 1.3.5 duration: time duration of the ECG strip
  8. 1.3.6 Unit testing for duration
  9. 1.3.7 num_beats: number of detected beats in the strip
  10. 1.3.8 Unit testing for num_beats
  11. 1.3.9 beats: numpy array of times when a beat occurred
  12. 1.3.10 Unit testing for beats
  13. 1.5 Generate Output, metrics dics ---> JSON file