From 9773198c9304777dd8ee391ca3af1994d55c0caa Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Wed, 21 Feb 2024 15:14:41 -0800 Subject: [PATCH] adding info --- gait_analysis/function/handler.py | 9 +++++++++ treadmill_gait_analysis/function/handler.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/gait_analysis/function/handler.py b/gait_analysis/function/handler.py index 026555c..b84cb2d 100644 --- a/gait_analysis/function/handler.py +++ b/gait_analysis/function/handler.py @@ -111,6 +111,14 @@ def handler(event, context): gait_scalars[key]['multiplier'] = 1 gait_scalars['step_width']['multiplier'] = 100 # cm + + # %% Info about metrics. + gait_scalars['gait_speed']['info'] = "Gait speed is computed by dividing the displacement of the center of mass by the time it takes to move that distance. A speed larger than 1.12 m/s is considered good." + gait_scalars['step_width']['info'] = "Step width is computed as the average distance between the ankle joint centers in the mediolateral direction during 40-60% of the stance phase. A step width between 4.3 and 7.4 times the subject's height is considered good." + gait_scalars['stride_length']['info'] = "Stride length is computed as the distance between the calcaneus positions at the beginning and end of the gait cycle. A stride length larger than 0.45 times the subject's height is considered good." + gait_scalars['cadence']['decinfoimal'] = "Cadence is computed as the number of gait cycles (left and right) per minute. A cadence larger than 100 is considered good." + gait_scalars['double_support_time']['info'] = "Double support time is computed as the duration when both feet are in contact with the ground. A double support time smaller than 35% of the gait cycle is considered good." + gait_scalars['step_length_symmetry']['info'] = "Step length symmetry is computed as the ratio between the right and left step lengths. A step length symmetry between 90 and 110 is considered good." # %% Thresholds. metadataPath = os.path.join(sessionDir, 'sessionMetadata.yaml') @@ -155,6 +163,7 @@ def handler(event, context): gait_scalars[scalar_name]['decimal']) metrics_out[scalar_name]['label'] = scalar_labels[scalar_name] metrics_out[scalar_name]['value'] = vertical_values + metrics_out[scalar_name]['info'] = gait_scalars[scalar_name]['info'] if scalar_name in scalar_reverse_colors: # Margin zone (orange) is 10% above threshold. metrics_out[scalar_name]['colors'] = ["green", "yellow", "red"] diff --git a/treadmill_gait_analysis/function/handler.py b/treadmill_gait_analysis/function/handler.py index 83521eb..23013d0 100644 --- a/treadmill_gait_analysis/function/handler.py +++ b/treadmill_gait_analysis/function/handler.py @@ -110,6 +110,14 @@ def handler(event, context): gait_scalars[key]['multiplier'] = 1 gait_scalars['step_width']['multiplier'] = 100 # cm + + # %% Info about metrics. + gait_scalars['gait_speed']['info'] = "Gait speed is computed by dividing the displacement of the center of mass by the time it takes to move that distance. A speed larger than 1.12 m/s is considered good." + gait_scalars['step_width']['info'] = "Step width is computed as the average distance between the ankle joint centers in the mediolateral direction during 40-60% of the stance phase. A step width between 4.3 and 7.4 times the subject's height is considered good." + gait_scalars['stride_length']['info'] = "Stride length is computed as the distance between the calcaneus positions at the beginning and end of the gait cycle. A stride length larger than 0.45 times the subject's height is considered good." + gait_scalars['cadence']['decinfoimal'] = "Cadence is computed as the number of gait cycles (left and right) per minute. A cadence larger than 100 is considered good." + gait_scalars['double_support_time']['info'] = "Double support time is computed as the duration when both feet are in contact with the ground. A double support time smaller than 35% of the gait cycle is considered good." + gait_scalars['step_length_symmetry']['info'] = "Step length symmetry is computed as the ratio between the right and left step lengths. A step length symmetry between 90 and 110 is considered good." # %% Thresholds. metadataPath = os.path.join(sessionDir, 'sessionMetadata.yaml') @@ -154,6 +162,7 @@ def handler(event, context): gait_scalars[scalar_name]['decimal']) metrics_out[scalar_name]['label'] = scalar_labels[scalar_name] metrics_out[scalar_name]['value'] = vertical_values + metrics_out[scalar_name]['info'] = gait_scalars[scalar_name]['info'] if scalar_name in scalar_reverse_colors: # Margin zone (orange) is 10% above threshold. metrics_out[scalar_name]['colors'] = ["green", "yellow", "red"]