forked from hundlab/LongQt-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
measurewave.h
68 lines (55 loc) · 2 KB
/
measurewave.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//################################################
// This header file
// declares Measure class used to track properties
// (e.g. peak, min, duration) of specified state variable.
//
// Copyright (C) 2015 Thomas J. Hund.
// Updated 07/2015
// Email [email protected]
//#################################################
#ifndef MEASUREWAVE_H
#define MEASUREWAVE_H
#include <string>
#include <map>
#include <set>
#include <limits>
#include "measure.h"
using namespace std;
class MeasureWave: public Measure
{
public:
MeasureWave(std::set<std::string> selected = {}, double percrepol = 50);
MeasureWave(const MeasureWave& toCopy);
MeasureWave(MeasureWave&& toCopy);
virtual ~MeasureWave() = default;
MeasureWave& operator=(const MeasureWave& toCopy) = delete;
void reset(); //resets params to init vals
// string varname;
set<string> variables();
map<string,double> variablesMap();
void percrepol(double val);
double percrepol() const;
protected:
virtual void calcMeasure(double time,double var); //measures props related to var; returns 1 when ready for output.
double vartakeoff = NAN; //var value at point of max deflection.
double durtime1 = NAN;
double amp = NAN;
double ddr = NAN; //diastolic depol. rate
// double maxderiv1;
// double maxderiv2;
double derivt1 = NAN; // time of prev. cycle max deriv.
double deriv2ndt = NAN; // time of max 2nd deriv.
double maxderiv2nd = 0;
double cl = 0;
double dur = NAN; //duration
double __percrepol = 50; //specify percent repolarization
double repol = -25; // repol var val for duration measure.
bool minflag = false;
bool maxflag = false;
bool durflag = false; //1 while measuring duration.
bool ampflag = false;
bool ddrflag = false;
private:
void copy(const MeasureWave& toCopy);
};
#endif