Giter VIP home page Giter VIP logo

bme590hrm's Introduction

bme590hrm

MIT License

Copyright (c) 2017 Daniel Wu, Samuel Li, Brianna Loomis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Primary functionality in hrm.py
Main calls associated subfunctions: peak detection, bradycardia/ tachycardia detection, and instantaneous/average heartrate detection.
hrm.py main creates and writes to a file "testfile.txt", added calculated values for instantaneous heartrate, average heartrate, and whether anomalies were detected.

Run instructions: Call hrm.py with single .csv file and specified values for time range for average heartrate, bradycardia thresholds, and tachycardia thresholds. Default values exist.

Notes: "times" and "voltages" must be specified in the first two rows of the header for the csv. Outputs for the averages and instantaneous heartrates are given in bpm. For brady and tachy, the outputs are given in seconds.

bme590hrm's People

Contributors

dooonuts avatar cshackerpro avatar syiyuli avatar

Watchers

Suyash Kumar avatar Arjun Desai avatar  avatar

bme590hrm's Issues

ECG function

Create an ECG function that reads a csv file, gives instantaneous heartbeat values, gives an average heartbeat over a specified time, and detects whether the heart has any anomalies.

nit: rename ecg_data

Here you may want to consider renaming this variable to indicate that this is a data filename, perhaps to something like input_data_file or ecg_data_file.

Generally with naming variables, it's a common heuristic in industry to try to have the code be as "self-documenting" as possible--if someone is skimming the code and sees a variable called ecg_data they may in this case think it's a structure containing the actual data as opposed to a filename until they read your docstring (which is okay, but again it's always nice to try and write self-documenting code)

(FYI "nit" means nitpick comment)

This came up when I was trying to test for pep8 syntax. What does this mean?

C:\Users\Brianna\AppData\Local\Programs\Python\Python36-32\lib\runpy.py:125: RuntimeWarning: 'py.test' found in sys.modules after import of package 'py', but prior to execution of 'py.test'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
C:\Users\Brianna\AppData\Local\Programs\Python\Python36-32\python.exe: loader for pytest cannot handle py.test

need to remove __pycache__ from git history

__pycache__ contains OS-specific runtime files that will cause conflicts for other developers/users, especially on other systems. Should ignore this directory in .gitignore in addition to removing it.

PEP8 Errors

  • need to install pytest-pep8
  • see errors when you run py.test -v --pep8

Questions for Palmeri and TAs

  1. What will be the timescale for how long the ECG file will last
  2. How long should the Brady and Tachy last in order for it to be reported?

unit tests fail

It appears that part of your package depends on PyQt... that is not specified in your repo configuration, making the tests fail locally for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.