-
Notifications
You must be signed in to change notification settings - Fork 0
/
definitions.py
110 lines (88 loc) · 2.97 KB
/
definitions.py
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
from enum import Enum
from app import variables
FILE_IDENTIFIER = 'resurfemg_paramfile'
class ProcessTypology(Enum):
CUT = '0'
BAND_PASS = '1'
HIGH_PASS = '2'
LOW_PASS = '3'
ECG_REMOVAL = '4'
ENVELOPE = '5'
class EcgRemovalMethods(Enum):
ICA = '1'
GATING = '2'
NONE = '3'
class EnvelopeMethod(Enum):
RMS = '1'
FILTERING = '2'
NONE = '3'
class GatingMethod(Enum):
ZERO_FILL = '0'
INTERPOLATE = '1'
AVERAGE_PRIOR_SEGMENT = '2'
RUNNING_AVERAGE_RMS = '3'
class BreathSelectionMethod(Enum):
VARIABILITY = '1'
SHANNON_ENTROPY = '2'
SAMPLE_ENTROPY = '3'
LOG_REMAPPING = '4'
# default values for preprocessing
sampling_freq = variables.get_emg_freq()
default_bandpass_low = 3
default_bandpass_high = 450
default_first_cut_percentage = 3
default_first_cut_tolerance = 5
default_envelope_cut_frequency = 150
default_ecg_removal_value = EcgRemovalMethods.ICA
default_envelope_value = EnvelopeMethod.FILTERING
# default values for features extraction
default_breath_method = BreathSelectionMethod.VARIABILITY
class ComputedFeatures:
BREATHS_COUNT = 'BREATHS COUNT'
MAX_AMPLITUDE = 'MAX AMPLITUDE'
BASELINE_AMPLITUDE = 'BASELINE AMPLITUDE'
TONIC_AMPLITUDE = 'TONIC AMPLITUDE'
AUC = 'AUC'
RISE_TIME = 'RISE TIME [ms]'
ACTIVITY_DURATION = 'ACTIVITY DURATION [ms]'
PEAK_POSITION = 'PEAK POSITION [%]'
# list of computed features
features_list = [BREATHS_COUNT,
MAX_AMPLITUDE,
AUC,
RISE_TIME,
ACTIVITY_DURATION,
PEAK_POSITION]
# IDs for graphical elements
# DATA UPLOAD PAGE
CONFIRM_CENTERED = 'confirm-centered'
CWD = 'cwd'
CWD_FILES = 'cwd-files'
EMG_FILE_UPDATED = 'emg-file-updated'
EMG_FREQUENCY_DIV = 'emg-frequency-div'
EMG_OPEN_CENTERED = 'open-centered-emg'
EMG_SAMPLING_FREQUENCY = 'emg-sample-freq'
FILE_PATH_INPUT = 'file-path-input'
LISTED_FILES = 'listed_file'
MODAL_CENTERED = 'modal-centered'
PARENT_DIR = 'parent-dir'
PATH_BTN = 'path-button'
STORED_CWD = 'stored-cwd'
VENT_FILE_UPDATED = 'ventilator-file-updated'
VENT_FREQUENCY_DIV = 'ventilator-frequency-div'
VENT_OPEN_CENTERED = 'open-centered-vent'
VENT_SAMPLING_FREQUENCY = 'ventilator-sample-freq'
# FEATURES PAGE
EMG_FILENAME_FEATURES = 'emg-filename-features'
LOAD_FEATURES_DIV = 'load-features-div'
FEATURES_COMPUTE_BTN = 'features-compute-btn'
FEATURES_COMPUTE_TOOLTIP = 'features-compute-tooltip'
FEATURES_DOWNLOAD_BTN = 'features-download-btn'
FEATURES_DOWNLOAD_DCC = 'features-download-dcc'
FEATURES_DOWNLOAD_TOOLTIP = 'features-download-tooltip'
FEATURES_EMG_GRAPH = 'features-emg-graph'
FEATURES_EMG_GRAPH_DIV = 'features-emg-graph-div'
FEATURES_LOADING = 'features-loading'
FEATURES_SELECT_LEAD = 'features-select-lead'
FEATURES_SELECT_COMPUTATION = 'features-select-computation'
FEATURES_TABLE = 'features-table'