paradigma 1.0.3__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
paradigma/constants.py CHANGED
@@ -2,40 +2,46 @@ from dataclasses import dataclass
2
2
 
3
3
 
4
4
  @dataclass(frozen=True)
5
- class DataColumns():
5
+ class DataColumns:
6
6
  """
7
7
  Class containing the data channels in `tsdf`.
8
8
  """
9
- ACCELEROMETER_X : str = "accelerometer_x"
10
- ACCELEROMETER_Y : str = "accelerometer_y"
11
- ACCELEROMETER_Z : str = "accelerometer_z"
12
- GYROSCOPE_X : str = "gyroscope_x"
13
- GYROSCOPE_Y : str = "gyroscope_y"
14
- GYROSCOPE_Z : str = "gyroscope_z"
15
- PPG : str = "green"
16
- TIME : str = "time"
17
- SEGMENT_NR : str = "segment_nr"
9
+
10
+ ACCELEROMETER_X: str = "accelerometer_x"
11
+ ACCELEROMETER_Y: str = "accelerometer_y"
12
+ ACCELEROMETER_Z: str = "accelerometer_z"
13
+ GYROSCOPE_X: str = "gyroscope_x"
14
+ GYROSCOPE_Y: str = "gyroscope_y"
15
+ GYROSCOPE_Z: str = "gyroscope_z"
16
+ PPG: str = "green"
17
+ TIME: str = "time"
18
+ GAIT_SEGMENT_NR: str = "gait_segment_nr"
19
+ SEGMENT_NR: str = "gait_segment_nr" # Deprecated: Use GAIT_SEGMENT_NR instead
20
+ DATA_SEGMENT_NR: str = "data_segment_nr"
18
21
  SEGMENT_CAT: str = "segment_category"
19
22
 
20
- # Gait
21
- GRAV_ACCELEROMETER_X : str = "accelerometer_x_grav"
22
- GRAV_ACCELEROMETER_Y : str = "accelerometer_y_grav"
23
- GRAV_ACCELEROMETER_Z : str = "accelerometer_z_grav"
23
+ # Gait
24
+ GRAV_ACCELEROMETER_X: str = "accelerometer_x_grav"
25
+ GRAV_ACCELEROMETER_Y: str = "accelerometer_y_grav"
26
+ GRAV_ACCELEROMETER_Z: str = "accelerometer_z_grav"
24
27
  PRED_GAIT_PROBA: str = "pred_gait_proba"
25
- PRED_GAIT : str = "pred_gait"
28
+ PRED_GAIT: str = "pred_gait"
26
29
  PRED_NO_OTHER_ARM_ACTIVITY_PROBA: str = "pred_no_other_arm_activity_proba"
27
- PRED_NO_OTHER_ARM_ACTIVITY : str = "pred_no_other_arm_activity"
28
- ANGLE : str = "angle"
29
- VELOCITY : str = "velocity"
30
+ PRED_NO_OTHER_ARM_ACTIVITY: str = "pred_no_other_arm_activity"
31
+ ANGLE: str = "angle"
32
+ VELOCITY: str = "velocity"
30
33
  DOMINANT_FREQUENCY: str = "dominant_frequency"
31
34
  RANGE_OF_MOTION: str = "range_of_motion"
32
35
  PEAK_VELOCITY: str = "peak_velocity"
33
36
 
34
37
  # The following are used in tremor analysis
35
38
  PRED_TREMOR_PROBA: str = "pred_tremor_proba"
36
- PRED_TREMOR_LOGREG : str = "pred_tremor_logreg"
37
- PRED_TREMOR_CHECKED : str = "pred_tremor_checked"
39
+ PRED_TREMOR_LOGREG: str = "pred_tremor_logreg"
40
+ PRED_TREMOR_CHECKED: str = "pred_tremor_checked"
38
41
  PRED_ARM_AT_REST: str = "pred_arm_at_rest"
42
+ TREMOR_POWER: str = "tremor_power"
43
+ BELOW_TREMOR_POWER: str = "below_tremor_power"
44
+ FREQ_PEAK: str = "freq_peak"
39
45
 
40
46
  # Constants for PPG features
41
47
  VARIANCE: str = "variance"
@@ -60,47 +66,54 @@ class DataColumns():
60
66
 
61
67
  # Constants for pulse rate
62
68
  PULSE_RATE: str = "pulse_rate"
63
-
69
+
70
+
64
71
  @dataclass(frozen=True)
65
- class DataUnits():
72
+ class DataUnits:
66
73
  """
67
74
  Class containing the data channel unit types in `tsdf`.
68
75
  """
76
+
69
77
  ACCELERATION: str = "m/s^2"
70
78
  """ The acceleration is in m/s^2. """
71
-
79
+
72
80
  ROTATION: str = "deg/s"
73
81
  """ The rotation is in degrees per second. """
74
-
82
+
75
83
  GRAVITY: str = "g"
76
84
  """ The acceleration due to gravity is in g. """
77
-
78
- POWER_SPECTRAL_DENSITY: str = "g^2/Hz"
85
+
86
+ POWER_SPECTRAL_DENSITY_ACC: str = "g^2/Hz"
79
87
  """ The power spectral density is in g^2/Hz. """
80
-
88
+
89
+ POWER_ROTATION: str = "(deg/s)^2"
90
+ """ The power is in "(deg/s)^2. """
91
+
81
92
  FREQUENCY: str = "Hz"
82
93
  """ The frequency is in Hz. """
83
94
 
84
95
  NONE: str = "none"
85
96
  """ The data channel has no unit. """
86
-
97
+
87
98
 
88
99
  @dataclass(frozen=True)
89
- class TimeUnit():
100
+ class TimeUnit:
90
101
  """
91
102
  Class containing the `time` channel unit types in `tsdf`.
92
103
  """
93
- RELATIVE_MS : str = "relative_ms"
104
+
105
+ RELATIVE_MS: str = "relative_ms"
94
106
  """ The time is relative to the start time in milliseconds. """
95
- RELATIVE_S : str = "relative_s"
107
+ RELATIVE_S: str = "relative_s"
96
108
  """ The time is relative to the start time in seconds. """
97
- ABSOLUTE_MS : str = "absolute_ms"
109
+ ABSOLUTE_MS: str = "absolute_ms"
98
110
  """ The time is absolute in milliseconds. """
99
- ABSOLUTE_S : str = "absolute_s"
111
+ ABSOLUTE_S: str = "absolute_s"
100
112
  """ The time is absolute in seconds. """
101
- DIFFERENCE_MS : str = "difference_ms"
113
+ DIFFERENCE_MS: str = "difference_ms"
102
114
  """ The time is the difference between consecutive samples in milliseconds. """
103
- DIFFERENCE_S : str = "difference_s"
115
+ DIFFERENCE_S: str = "difference_s"
104
116
  """ The time is the difference between consecutive samples in seconds. """
105
117
 
118
+
106
119
  UNIX_TICKS_MS: int = 1000