User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_signal_value_at_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:pipeline:metric_commands:metric_signal_value_at_event [2024/06/19 12:51] sgrangervisual3d:documentation:pipeline:metric_commands:metric_signal_value_at_event [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
-{{===== legacy command =====+====== Metric Signal Value At Event ======
  
-**metric_signal_at_event** replaced the command **signal_value_at_event**+==== Legacy Command ====
  
-===== description =====+**Metric_Signal_At_Event** replaced the command **Signal_Value_At_Event**
  
-the value of the specified signal at the specified frame of data is stored as a metric.+==== Description ====
  
-  * all components of the specified signal will be stored in the metric signal. +The value of the specified signal at the specified frame of data is stored as a metric.
-    * **since version 5:** the user has the option to select an individual component +
-  * if there are multiple occurrences of an event, there will be multiple entries in the metric that is created. +
-  * there is an option to calculate the mean and standard deviation for metrics that have multiple values.+
  
-metricsignalvalueatevent.png+  * All components of the specified signal will be stored in the metric signal. 
 +    * **Since version 5:** the user has the option to select an individual component 
 +  * If there are multiple occurrences of an EVENT, there will be multiple entries in the metric that is created. 
 +  * There is an option to calculate the mean and standard deviation for metrics that have multiple values.
  
-|**metric_signal_value_at_event**                                                                                                                                                                                                                                 | +{{:MetricSignalValueAtEvent.png}}
-|**/result_metric_name=**                                                                 |the name of the resulting signal.                                                                                                                                        | +
-|**/result_metric_folder=**                                                               |the folder that will contain the resulting signal                                                                                                                        | +
-|**/[[visual3d:documentation:pipeline:general_information:signal_types|signal_types]]=**  |the type of signal to be evaluated                                                                                                                                       | +
-|**/[[visual3d:documentation:pipeline:general_information:signal_names|signal_names]]=**  |the names of the signals to be evaluated                                                                                                                                 | +
-|**/[[visual3d:documentation:pipeline:general_information:signal_folder|signal_folder]]=**|the name of the signal folder                                                                                                                                            | +
-|**/event_name=**                                                                         |the name of the event label.                                                                                                                                             | +
-|**/generate_mean_and_stddev=**                                                           |if there are multiple occurences of the event, the metric will contain multiple values.if selecte the mean and standard deviation for the metric values will be computed.| +
-|**/append_to_existing_values=**                                                          |(true or false) if the metric exists, the new values will be appended to the metric, retaining all of the previous values.                                               | +
-|**/generate_metric_length_metric=**                                                      |(true or false) if the metric is a vector quantity (e.g. has 3 components), compute the magnitude of the vector.                                                         | +
-|**/retain_no_data_values=**                                                              |(true or false) if the result is no_data, retain the value                                                                                                             |+
  
-===== example value of a target =====+|**Metric_Signal_Value_At_Event**                                                                                                                                                                                                                                 | 
 +|**/Result_Metric_Name=**                                                                 |The name of the resulting signal.                                                                                                                                        | 
 +|**/Result_Metric_Folder=**                                                               |The folder that will contain the resulting signal                                                                                                                        | 
 +|**/[[Visual3D:Documentation:Pipeline:General_Information:Signal_Types|Signal_Types]]=**  |The type of signal to be evaluated                                                                                                                                       | 
 +|**/[[Visual3D:Documentation:Pipeline:General_Information:Signal_Names|Signal_Names]]=**  |The names of the signals to be evaluated                                                                                                                                 | 
 +|**/[[Visual3D:Documentation:Pipeline:General_Information:Signal_Folder|Signal_Folder]]=**|The name of the signal folder                                                                                                                                            | 
 +|**/Event_Name=**                                                                         |The name of the event Label.                                                                                                                                             | 
 +|**/Generate_Mean_And_Stddev=**                                                           |If there are multiple occurences of the Event, the metric will contain multiple values.If Selecte the mean and standard deviation for the metric values will be computed.| 
 +|**/Append_To_Existing_Values=**                                                          |(True or False) If the metric exists, the new values will be appended to the metric, retaining all of the previous values.                                               | 
 +|**/Generate_Metric_Length_Metric=**                                                      |(True or False) If the metric is a vector quantity (e.g. has 3 components), compute the magnitude of the vector.                                                         | 
 +|**/Retain_No_Data_Values=**                                                              |(True or False) If the result is no_data, retain the value.                                                                                                              |
  
-this example calculates the value of the target **rft1** at the event_label **ron**+==== Example Value of a Target ====
  
-**metric_signal_value_at_event** +This example calculates the value of the TARGET **RFT1** at the Event_Label **RON** 
-/result_metric_name=rft1_on + 
-/result_metric_folder=processed +**Metric_Signal_Value_At_Event** 
-/signal_types=target +/Result_Metric_Name=RFT1_ON 
-/signal_names=rft1 +/Result_Metric_Folder=PROCESSED 
-/signal_folder=original +/Signal_Types=TARGET 
-/event_name=ron +/Signal_Names=RFT1 
-/generate_mean_and_stddev=false +/Signal_Folder=ORIGINAL 
-/append_to_existing_values=false +/Event_Name=RON 
-/generate_metric_length_metric=false +/Generate_Mean_And_Stddev=FALSE 
-/retain_no_data_values=true+/Append_To_Existing_Values=FALSE 
 +/Generate_Metric_Length_Metric=FALSE 
 +/Retain_No_Data_Values=TRUE
 **;** **;**
-**note:** in cases where there is **no_data** at an event, you need to specify the parameter **/retain_no_data_values=true** should you want this included in the resulting signal.+**Note:** In cases where there is **NO_DATA** at an event, you need to specify the parameter **/Retain_No_Data_Values=TRUE** should you want this included in the resulting signal.
  
-===== example time at an event =====+==== Example Time at an Event ====
  
-this example calculates the time of the event_label **ron**+This example calculates the time of the Event_Label **RON**
  
-**metric_signal_value_at_event** +**Metric_Signal_Value_At_Event** 
-/result_metric_name=ron_time +/Result_Metric_Name=RON_TIME 
-/result_metric_folder=processed +/Result_Metric_Folder=PROCESSED 
-/signal_types=frame_numbers +/Signal_Types=FRAME_NUMBERS 
-/signal_names=time +/Signal_Names=TIME 
-/signal_folder=original +/Signal_Folder=ORIGINAL 
-/event_name=ron +/Event_Name=RON 
-/generate_mean_and_stddev=false +/Generate_Mean_And_Stddev=FALSE 
-/append_to_existing_values=false +/Append_To_Existing_Values=FALSE 
-/generate_metric_length_metric=false +/Generate_Metric_Length_Metric=FALSE 
-/retain_no_data_values=false+/Retain_No_Data_Values=FALSE
 **;** **;**
-===== component workaround =====+==== Component Workaround ====
  
-since metric_signal_value_at_event outputs all three components, here is a workaround of the previous example that will output one component. evaluate_expression is used to create a signal with one component, the z component for **rft1**. then the metric_signal_value_at_event will calculate the value of the target **rft1** at the event_label **ron**.+Since Metric_Signal_Value_At_Event outputs all three components, here is a workaround of the previous example that will output one component. Evaluate_Expression is used to create a signal with one component, the z component for **RFT1**. Then the Metric_Signal_Value_At_Event will calculate the value of the TARGET **RFT1** at the Event_Label **RON**.
  
 <code> <code>
-rft1 z component +RFT1 Z component 
-evaluate_expression  +Evaluate_Expression  
-/expression=target::original::rft1::z +/Expression=TARGET::ORIGINAL::RFT1::Z 
-/result_name=rft1_z +/Result_Name=RFT1_Z 
-/result_type=derived +/Result_Type=DERIVED 
-/result_folder=original+/Result_Folder=ORIGINAL
  
  
-metric_signal_value_at_event +Metric_Signal_Value_At_Event 
-/result_metric_name=rft1_on  +/Result_Metric_Name=RFT1_ON  
-/result_metric_folder=processed +/Result_Metric_Folder=PROCESSED 
-/signal_types=derived +/Signal_Types=DERIVED 
-/signal_names=rft1_z +/Signal_Names=RFT1_Z 
-/signal_folder=original +/Signal_Folder=ORIGINAL 
-/event_name=ron +/Event_Name=RON 
-/generate_mean_and_stddev=false +/Generate_Mean_And_Stddev=FALSE 
-/append_to_existing_values=false +/Append_To_Existing_Values=FALSE 
-/generate_metric_length_metric=false +/Generate_Metric_Length_Metric=FALSE 
-/retain_no_data_values=true+/Retain_No_Data_Values=TRUE
 ; ;
 </code> </code>
  
-===== p2d signals =====+==== P2D Signals ====
  
-consider p2d signal created using [[visual3d:documentation:pipeline:signal_commands:global_normalized_signal_mean|global_normalized_signal_mean]]. +Consider P2D signal created using [[Visual3D:Documentation:Pipeline:Signal_Commands:Global_Normalized_Signal_Mean|Global_Normalized_Signal_Mean]]. 
-the resulting signal has three components, an index, a mean signals, and a standard deviation signal +The resulting signal has three components, an index, a mean signals, and a standard deviation signal 
-it is possible to compute the maximum value of the 3 components using [[visual3d:documentation:pipeline:metric_commands:metric_maximum|metric_maximum]] +It is possible to compute the maximum value of the 3 components using [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Maximum|Metric_Maximum]] 
-it isn't possible to directly identify the standard deviation at that index because it isn't possible to define an event for a time normalized signal (e.g.it has no frame rate or time. +It isn't possible to directly identify the standard deviation at that index because it isn't possible to define an Event for a time normalized signal (e.g.it has no frame rate or time. 
-without having an event you cannot get the value of a signal at that event using metric_signal_value_at_event +Without having an event you cannot get the value of a signal at that event using Metric_Signal_Value_At_Event 
-one solution, albeit a non-intuitive solution is to [[visual3d:documentation:pipeline:expressions:overview#signal_functions|sort]] (descending) the p2d signal by the second component (eg. the mean). +One solution, albeit a non-intuitive solution is to [[Visual3D:Documentation:Pipeline:Expressions:Expressions_Overview#Signal_Functions|SORT]] (descending) the p2D signal by the second component (eg. the MEAN). 
-**evaluate_expression** +**Evaluate_Expression** 
-/expression=sort(p2d::test::lhip_angle, -1.0, 2) +/EXPRESSION=SORT(P2D::TEST::LHIP_ANGLE, -1.0, 2) 
-! /signal_types+! /SIGNAL_TYPES
-! /signal_folder=original +! /SIGNAL_FOLDER=ORIGINAL 
-! /signal_names+! /SIGNAL_NAMES
-/result_types=p2d +/RESULT_TYPES=P2D 
-/result_folders=test_sorted +/RESULT_FOLDERS=TEST_SORTED 
-/result_name=lhip_angle_sorted +/RESULT_NAME=LHIP_ANGLE_SORTED 
-!/apply_as_suffix_to_signal_name=false+!/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 '//;// '//;//
-for the resulting signal, the maximum value and the associated standard deviation will be in the first frame+For the resulting signal, the maximum value and the associated standard deviation will be in the first frame 
  
-}} 
visual3d/documentation/pipeline/metric_commands/metric_signal_value_at_event.1718801486.txt.gz · Last modified: 2024/06/19 12:51 by sgranger