ECG_Class module

class ECG_Class.ECG_Class(filename, avemins=1, outName='_output.txt', lowerThresh=60, upperThresh=100)[source]

Bases: object

This class treats a file containing ECG data as an object

It has many associated methods that process and display this data

Parameters:
  • filename (string) – the name of the csv file with the ECG data
  • avemins (double or int) – number of minutes to compute the average heart rate
  • outName (string) – name of output file
  • lowerThresh (double or int) – lower threshold for bradycardia
  • upperThresh (double or int) – upper threshold for tachycardia
avg()[source]
Returns:average heart rate (
brady()[source]
output()[source]

Creates a file containing the output of these functions

Parameters:
  • mins – (int) Number of minutes to take HR over
  • filename – (str) optional name of file if you don’t want
Returns:

An ndarray of average heart rate at each time point

tachy()[source]