User Tools

Site Tools


visual3d:documentation:reports:computing_a_time_normalized_average_event

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:reports:computing_a_time_normalized_average_event [2024/06/19 12:53] sgrangervisual3d:documentation:reports:computing_a_time_normalized_average_event [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
-{{{{{{{{====== introduction ======+====== Computing a Time Normalized Average Event ====== 
 + 
 +===== Introduction =====
  
 \\ \\
-customer wanted to add an annotation to the normative graph at the location of the corresponding **normative** event label. this would be equivalent to the option to [[visual3d:documentation:reports:report_2d_graph#annotations|annotate a graph comprised of time based signals]]. rather than leave the customer with no options, we explored the following "kludgy workaround".\\+customer wanted to add an annotation to the normative graph at the location of the corresponding **normative** event label. This would be equivalent to the option to [[Visual3D:Documentation:Reports:Report_2D_Graph#Annotations|annotate a graph comprised of time based signals]]. Rather than leave the customer with no options, we explored the following "kludgy workaround".\\
 \\ \\
-this example allows you to specify the normative event from the datatable (i.e. you can calculate the time of the normative event). [[visual3d:documentation:reports:adding_an_annotation_at_60%_along_the_x-axis|this example shows you another method which lets you explicitly define when the annotation should be created]].\\+This example allows you to specify the normative event from the datatable (i.e. you can calculate the time of the normative event). [[Visual3D:Documentation:Reports:Adding_an_annotation_at_60%_along_the_x-axis|This example shows you another method which lets you explicitly define when the annotation should be created]].\\
 \\ \\
-[[https://www.has-motion.com/download/examples/reporting/annotation_from_p2d.zip|you can download the sample files for this tutorial here]].+[[https://www.has-motion.com/download/examples/Reporting/Annotation_From_P2D.zip|You can download the sample files for this tutorial here]].
  
-====== create event stored in p2d ======+===== Create Event stored in P2D =====
  
-the first step is to store the value we want to create the annotation at. in this tutorial, the value is going to be stored global::p2d::norm_events::lto.+The first step is to store the value we want to create the annotation at. In this tutorial, the value is going to be stored GLOBAL::P2D::NORM_EVENTS::LTO.
  
-  * option 1: explicitly specify this value as 40% of the gait cycle (running data) +  * Option 1: Explicitly specify this value as 40% of the gait cycle (running data) 
-  * option 2: calculate the average time toe off occurs from a normal databse+  * Option 2: Calculate the average time toe off occurs from a normal databse
  
-==== option 1: explicit ====+=== Option 1: Explicit ===
  
-explicitly define the value:+Explicitly define the value:
  
 <code> <code>
-evaluate_expression +Evaluate_Expression 
-/expression=40 +/EXPRESSION=40 
-! /signal_types+! /SIGNAL_TYPES
-! /signal_folder=original +! /SIGNAL_FOLDER=ORIGINAL 
-! /signal_names+! /SIGNAL_NAMES
-/result_types=p2d +/RESULT_TYPES=P2D 
-/result_folders=norm_events +/RESULT_FOLDERS=NORM_EVENTS 
-/result_name=global::lto +/RESULT_NAME=GLOBAL::LTO 
-! /apply_as_suffix_to_signal_name=false+! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 ; ;
 </code> </code>
  
-==== option 2: calculate from database ====+=== Option 2: Calculate from database ===
  
-calculate the average value from the normal database:+Calculate the average value from the normal database:
  
-  - [[visual3d:documentation:reports:normative_data_from_cmo_library#step_1:_organize_.26_catalog_the_cmo_files|load the database (step 1)]] +  - [[Visual3D:Documentation:Reports:Normative_Data_From_CMO_Library#Step_1:_Organize_.26_Catalog_the_CMO_files|Load the database (Step 1)]] 
-    - run a script to calculate the % the event occurs during the gait cycle (example, when toe off occurs during the gait cycle). an example script is provided below:+    - Run a script to calculate the % the event occurs during the gait cycle (example, when toe off occurs during the gait cycle). An example script is provided below:
  
 <code> <code>
-select_active_file +Select_Active_File 
-/file_name=each_cmo_workspace +/FILE_NAME=EACH_CMO_WORKSPACE 
-/query=+/QUERY=
 ; ;
  
-metric_time_between_events +Metric_Time_Between_Events 
-/result_metric_name=lstance +/RESULT_METRIC_NAME=LStance 
-/result_metric_folder=events +/RESULT_METRIC_FOLDER=EVENTS 
-/event_sequence=lhs+lto +/EVENT_SEQUENCE=LHS+LTO 
-/exclude_events+/EXCLUDE_EVENTS
-! /generate_mean_and_stddev=true +! /GENERATE_MEAN_AND_STDDEV=TRUE 
-! /append_to_existing_values=false+! /APPEND_TO_EXISTING_VALUES=FALSE
 ; ;
  
-metric_time_between_events +Metric_Time_Between_Events 
-/result_metric_name=lgaitcycle +/RESULT_METRIC_NAME=LGaitCycle 
-/result_metric_folder=events +/RESULT_METRIC_FOLDER=EVENTS 
-/event_sequence=lhs+lhs +/EVENT_SEQUENCE=LHS+LHS 
-/exclude_events+/EXCLUDE_EVENTS
-! /generate_mean_and_stddev=true +! /GENERATE_MEAN_AND_STDDEV=TRUE 
-! /append_to_existing_values=false+! /APPEND_TO_EXISTING_VALUES=FALSE
  
  
-evaluate_expression +Evaluate_Expression 
-/expression=100*global::metric::events::lstance_mean/global::metric::events::lgaitcycle_mean +/EXPRESSION=100*GLOBAL::METRIC::EVENTS::LStance_MEAN/GLOBAL::METRIC::EVENTS::LGaitCycle_MEAN 
-/result_name=global::lto +/RESULT_NAME=GLOBAL::LTO 
-/result_type=p2d +/RESULT_TYPE=P2D 
-/result_folder=norm_events+/RESULT_FOLDER=NORM_EVENTS
 ; ;
 </code> </code>
  
-==== save p2d file ====+=== Save P2D File ===
  
-|you can then export the p2d data as a normal database (normal_data_events.vnd)  |  annotation_exportp2d.png|+|You can then export the P2D data as a Normal Database (Normal_Data_Events.vnd)  |  {{:Annotation_ExportP2D.png}}|
  
-====== plot event stored in p2d ======+===== Plot Event stored in P2D =====
  
-==== getting started ====+=== Getting Started ===
  
-[[visual3d:documentation:reports:plotting_p2d_data#plot_p2d_data|it's assumed that you have followed the steps described here]].+[[Visual3D:Documentation:Reports:Plotting_P2D_Data#Plot_P2D_Data|It's assumed that you have followed the steps described here]].
  
-|if you followed the steps correctly, you would be starting with a graph that looks like this.  |  p2d_2dgraph.png|+|If you followed the steps correctly, you would be starting with a graph that looks like this.  |  {{:P2D_2DGraph.png}}|
  
-==== load the p2d data ====+=== Load the P2D Data ===
  
-loads the p2d file which contains the average events:+Loads the P2D file which contains the average events:
  
-  - **file -> open** +  - **File -> Open** 
-    - select the **normal_data_events.vnd** file+    - Select the **Normal_Data_Events.vnd** file
  
-==== option 1: manually graph event ====+=== Option 1: Manually Graph Event ===
  
-|* annotation style: **vertical line**\\ * color: **black**\\ * size: **normal**\\ * event name or numeric value: **global::p2d::norm_events::lto**\\ * check **"average event or numeric value"**  |  p2d_annotation_define.png|+|* Annotation Style: **Vertical Line**\\ * Color: **Black**\\ * Size: **Normal**\\ * Event Name or Numeric Value: **GLOBAL::P2D::NORM_EVENTS::LTO**\\ * Check **"Average Event or Numeric Value"**  |  {{:P2D_Annotation_Define.png}}|
  
-==== option 2: pipeline graph event ====+=== Option 2: Pipeline Graph Event ===
  
 <code> <code>
-add_graph_annotation +Add_Graph_Annotation 
-/page_number=1 +/PAGE_NUMBER=1 
-/column_number=1 +/COLUMN_NUMBER=1 
-/row_number=1 +/ROW_NUMBER=1 
-/draw_order=2 +/DRAW_ORDER=2 
-/annotation_event=global::p2d::norm_events::lto +/ANNOTATION_EVENT=GLOBAL::P2D::NORM_EVENTS::LTO 
-/annotation_style=vertical line +/ANNOTATION_STYLE=Vertical Line 
-/annotation_color=black +/ANNOTATION_COLOR=Black 
-! /annotation_size=normal +! /ANNOTATION_SIZE=Normal 
-/annotation_global=false +/ANNOTATION_GLOBAL=FALSE 
-/annotation_average_event=true+/ANNOTATION_AVERAGE_EVENT=TRUE
 ; ;
 </code> </code>
  
-==== final ====+=== Final === 
 + 
 +|If everything is correct, you should see a black vertical line.  |  {{:P2D_Annotation_2DGraphFinal.png}}|
  
-|if everything is correct, you should see a black vertical line.  |  p2d_annotation_2dgraphfinal.png| 
  
  
-}}}}}}}} 
visual3d/documentation/reports/computing_a_time_normalized_average_event.1718801612.txt.gz · Last modified: 2024/06/19 12:53 by sgranger