User Tools

Site Tools


visual3d:documentation:reports:computing_a_time_normalized_average_event

This is an old revision of the document!


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]].\\ \\ [[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 ====== 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 2: calculate the average time toe off occurs from a normal databse ==== option 1: explicit ==== explicitly define the value: <code> evaluate_expression /expression=40 ! /signal_types= ! /signal_folder=original ! /signal_names= /result_types=p2d /result_folders=norm_events /result_name=global::lto ! /apply_as_suffix_to_signal_name=false ; </code> ==== option 2: calculate from 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)]] - 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> select_active_file /file_name=each_cmo_workspace /query= ; metric_time_between_events /result_metric_name=lstance /result_metric_folder=events /event_sequence=lhs+lto /exclude_events= ! /generate_mean_and_stddev=true ! /append_to_existing_values=false ; metric_time_between_events /result_metric_name=lgaitcycle /result_metric_folder=events /event_sequence=lhs+lhs /exclude_events= ! /generate_mean_and_stddev=true ! /append_to_existing_values=false ; evaluate_expression /expression=100*global::metric::events::lstance_mean/global::metric::events::lgaitcycle_mean /result_name=global::lto /result_type=p2d /result_folder=norm_events ; </code> ==== save p2d file ==== |you can then export the p2d data as a normal database (normal_data_events.vnd) | annotation_exportp2d.png| ====== plot event stored in p2d ====== ==== getting started ==== [[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| ==== load the p2d data ==== loads the p2d file which contains the average events: - **file -> open** - select the **normal_data_events.vnd** file ==== 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| ==== option 2: pipeline graph event ==== <code> add_graph_annotation /page_number=1 /column_number=1 /row_number=1 /draw_order=2 /annotation_event=global::p2d::norm_events::lto /annotation_style=vertical line /annotation_color=black ! /annotation_size=normal /annotation_global=false /annotation_average_event=true ; </code> ==== final ==== |if everything is correct, you should see a black vertical line. | p2d_annotation_2dgraphfinal.png| }}}}}}

visual3d/documentation/reports/computing_a_time_normalized_average_event.1718804351.txt.gz · Last modified: 2024/06/19 13:39 by sgranger