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 [2025/05/21 17:36] (current) – Cleaned up page for a customer. Still needs to be put into Pipeline project format. wikisysop
Line 1: Line 1:
-{{===== legacy command =====+====== Metric Signal Value At Event ======
  
-**metric_signal_at_event** replaced the command **signal_value_at_event**+The Metric_Signal_Value_At_Event command provides the value of the specified signal at the specified frame of data is stored as a metric.
  
-===== description =====+Notes: 
 +  * All components of the specified signal will be stored in the metric signal. The user also 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. 
 +  * 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. 
 +  * **Metric_Signal_At_Event** replaced the legacy command **Signal_Value_At_Event**
  
-the value of the specified signal at the specified frame of data is stored as a metric.+{{:MetricSignalValueAtEvent.png}}
  
-  * all components of the specified signal will be stored in the metric signal. +===== Parameters =====
-    * **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+^ Parameter ^ Description ^ 
 +|**/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.                                                                                                              |
  
-|**metric_signal_value_at_event**                                                                                                                                                                                                                                 | +===== ExampleFind Value of a Target =====
-|**/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 =====+This example calculates the value of the TARGET **RFT1** at the Event_Label **RON**
  
-this example calculates the value of the target **rft1** at the event_label **ron**+<code> 
 +Metric_Signal_Value_At_Event 
 +/Result_Metric_Name=RFT1_ON 
 +/Result_Metric_Folder=PROCESSED 
 +/Signal_Types=TARGET 
 +/Signal_Names=RFT1 
 +/Signal_Folder=ORIGINAL 
 +/Event_Name=RON 
 +/Generate_Mean_And_Stddev=FALSE 
 +/Append_To_Existing_Values=FALSE 
 +/Generate_Metric_Length_Metric=FALSE 
 +/Retain_No_Data_Values=TRUE 
 +
 +</code>
  
-**metric_signal_value_at_event** +==== For a single Component ====
-/result_metric_name=rft1_on +
-/result_metric_folder=processed +
-/signal_types=target +
-/signal_names=rft1 +
-/signal_folder=original +
-/event_name=ron +
-/generate_mean_and_stddev=false +
-/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.+
  
-===== example time at an event =====+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**.
  
-this example calculates the time of the event_label **ron**+<code> 
 +! RFT1 Z component 
 +Evaluate_Expression  
 +/Expression=TARGET::ORIGINAL::RFT1::
 +/Result_Name=RFT1_Z 
 +/Result_Type=DERIVED 
 +/Result_Folder=ORIGINAL 
 +
  
-**metric_signal_value_at_event** +Metric_Signal_Value_At_Event 
-/result_metric_name=ron_time +/Result_Metric_Name=RFT1_ON  
-/result_metric_folder=processed +/Result_Metric_Folder=PROCESSED 
-/signal_types=frame_numbers +/Signal_Types=DERIVED 
-/signal_names=time +/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=false +/Retain_No_Data_Values=TRUE 
-**;** +
-===== component workaround =====+</code>
  
-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**.+===== Example: Calculate the Time of an Event =====
  
-<code> +This example calculates the time of the Event_Label **RON**
-! rft1 z component +
-evaluate_expression  +
-/expression=target::original::rft1::+
-/result_name=rft1_z +
-/result_type=derived +
-/result_folder=original +
-+
  
-metric_signal_value_at_event +<code> 
-/result_metric_name=rft1_on  +Metric_Signal_Value_At_Event 
-/result_metric_folder=processed +/Result_Metric_Name=RON_TIME 
-/signal_types=derived +/Result_Metric_Folder=PROCESSED 
-/signal_names=rft1_z +/Signal_Types=FRAME_NUMBERS 
-/signal_folder=original +/Signal_Names=TIME 
-/event_name=ron +/Signal_Folder=ORIGINAL 
-/generate_mean_and_stddev=false +/Event_Name=RON 
-/append_to_existing_values=false +/Generate_Mean_And_Stddev=FALSE 
-/generate_metric_length_metric=false +/Append_To_Existing_Values=FALSE 
-/retain_no_data_values=true+/Generate_Metric_Length_Metric=FALSE 
 +/Retain_No_Data_Values=FALSE
 ; ;
 </code> </code>
  
-===== p2d signals =====+===== P2D Signals ===== 
 + 
 +Consider a [[visual3d:documentation:definitions:file_formats:p2d_format|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. It is possible to compute the maximum value of the 3 components using [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Maximum|Metric_Maximum]] but 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. 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). 
 + 
 +<code> 
 +Evaluate_Expression 
 +/EXPRESSION=SORT(P2D::TEST::LHIP_ANGLE, -1.0, 2) 
 +! /SIGNAL_TYPES= 
 +! /SIGNAL_FOLDER=ORIGINAL 
 +! /SIGNAL_NAMES= 
 +/RESULT_TYPES=P2D 
 +/RESULT_FOLDERS=TEST_SORTED 
 +/RESULT_NAME=LHIP_ANGLE_SORTED 
 +!/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +
 +</code>
  
-consider a p2d signal created using [[visual3d:documentation:pipeline:signal_commands:global_normalized_signal_mean|global_normalized_signal_mean]]. +For the resulting signal, the maximum value and the associated standard deviation will be in the first frame.
-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 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 +
-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). +
-**evaluate_expression** +
-/expression=sort(p2d::test::lhip_angle, -1.0, 2) +
-! /signal_types= +
-! /signal_folder=original +
-! /signal_names= +
-/result_types=p2d +
-/result_folders=test_sorted +
-/result_name=lhip_angle_sorted +
-!/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+
  
-}} 
visual3d/documentation/pipeline/metric_commands/metric_signal_value_at_event.1718801486.txt.gz · Last modified: 2024/06/19 12:51 by sgranger