User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_event_count

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_event_count [2024/06/19 12:51] sgrangervisual3d:documentation:pipeline:metric_commands:metric_event_count [2025/05/12 20:43] (current) – Cleaned up page with section headers. wikisysop
Line 1: Line 1:
-{{creates a metric containing the number of events that occur in an event sequence or time interval.+====== Metric Event Count ======
  
-**metric_event_count** +This command creates a [[visual3d:documentation:visual3d_signal_types:metric_data_type|metric]] containing the number of [[visual3d:documentation:c3d_signal_types:event_label_data_type|events]] that occur during a specified time interval or [[visual3d:documentation:pipeline:event_commands:event_define_event_sequence|event sequence]].
-/result_metric_name= +
-/result_metric_folder=processed +
-/event_name= +
-/time_interval= +
-/event_sequence= +
-/exclude_events= +
-/generate_count_total_in_global=true +
-**;** +
-===== prior to version 5.00.29 =====+
  
-the user could select "either" an **event_sequence/exclude sequence** or a **time_interval** +<code> 
-if **event_sequence/exclude sequence** +Metric_Event_Count 
-the count of the specified event includes all sequences in the file +/RESULT_METRIC_NAME= 
-if **time_interval** (specified as a number) +/RESULT_METRIC_FOLDER=PROCESSED 
-a count of events within each time interval (starting from time=0) is specified as a separate frame. +/EVENT_NAME= 
-for example, if there were three ranges defined by the time sequence, there would be 3 frames of data in the resulting metric. +/TIME_INTERVAL= 
-===== starting in version 5.00.29 =====+/EVENT_SEQUENCE
 +/EXCLUDE_EVENTS= 
 +/GENERATE_COUNT_TOTAL_IN_GLOBAL=TRUE 
 +
 +</code>
  
-the user can select both an **event_sequence/exclude sequence** and a **time_interval** but only the first event_sequence is used. +{{:MetricEventCountDialog.png}}
-if the **time_interval** is empty the command behaves as before. +
-if the **time_interval** is populated (a number or expression) the start time is the first event in the event_sequence. +
-\\ +
-as of visual3dv5.00.29 this command must be edited manually.+
  
-===== user dialog starting in version 5.01.14 =====+==== Parameters ====
  
-|in visual3d v5.01.14 the user dialog was introduced. the command works the same as described in v5.00.29, however the user may now modify the command using the gui interface.  |  metriceventcountdialog.png|+If the user specifies an **Event_Sequence/Exclude Sequence** then the count of the specified event includes all sequences in the file.
  
-===== example_1 =====+If **Time_Interval**, specified as a number, then a count of events within each time interval starting from time 0 is specified as a separate frame. For example, if there were three ranges defined by the time sequence, there would be 3 frames of data in the resulting metric.
  
-**select_active_file** +As of Visual3D v5.00.29, the user can select both an **Event_Sequence/Exclude Sequence** and a **Time_Interval** but only the first Event_Sequence is used. If the **Time_Interval** is populated (a number or expression) the start time is the first event in the event_sequence.
-**/file_name=** all_files +
-**! /query=** +
-**;** +
-**metric_event_count** +
-**/result_metric_folder=**processed +
-**/result_metric_name=**lon_count +
-**/event_name=**lon +
-**/time_interval=** +
-**/event_sequence=** +
-**/exclude_events=** +
-**/generate_count_total_in_global=** true +
-**;** +
-\\+
  
 +===== Example 1: Basic Metric Event Count =====
  
-==== result ====+<code> 
 +Select_Active_File 
 +/FILE_NAMEALL_FILES 
 +! /QUERY= 
 +;
  
-lon_count will count all events in the file and a metric value lon_count will be created in the metric::processed folder.+Metric_Event_Count 
 +/RESULT_METRIC_FOLDER=PROCESSED 
 +/RESULT_METRIC_NAME=LON_COUNT 
 +/EVENT_NAME=LON 
 +/TIME_INTERVAL= 
 +/EVENT_SEQUENCE= 
 +/EXCLUDE_EVENTS= 
 +/GENERATE_COUNT_TOTAL_IN_GLOBAL= TRUE 
 +
 +</code>
  
-"since generate_count_total_in_global is set to true, the total number of lon events in the workspace will be created.+This command will count all events in the file and a metric value LON_COUNT will be created in the METRIC::PROCESSED folder. Since GENERATE_COUNT_TOTAL_IN_GLOBAL is set to TRUE, the total number of LON events in the workspace will be created as well. To see this value set the [[visual3d:documentation:definitions:active_files|Active File]] to [[visual3d:documentation:definitions:global_workspace|GLOBAL]] and a metric value LON_COUNT will be created in the METRIC::PROCESSED folder.
  
-to see this value set the active file to global and a metric value lon_count will be created in the metric::processed folder. +===== Example 2: Multiple Files =====
-===== example_2 =====+
  
-**this example shows ways the metric_event_count command can be used.**+This example shows three ways the Metric_Event_Count command can be used. All three consider a set of 5 files containing the following event LHS.**
  
-**consider a set of 5 files containing the following event lhs.**+^ File ^ LHS Event Times ^ 
 +| mvc004.c3d | 0.960000 | 
 +| | 2.240000 | 
 +| | 3.500000 | 
 +| mvc003.c3d | 0.980000 | 
 +| | 2.260000 | 
 +| | 3.560000 | 
 +| mvc002.c3d | 1.000000 | 
 +| | 2.260000 | 
 +| | 3.600000 | 
 +| mvc005.c3d | 0.920000 | 
 +| | 2.140000 | 
 +| | 3.360000 |
  
-event lhs +==== Example 2A: Count events across entire file ====
-mvc004.c3d +
-0.960000 +
-2.240000 +
-3.500000 +
-mvc003.c3d +
-0.980000 +
-2.260000 +
-3.560000 +
-mvc002.c3d +
-1.000000 +
-2.260000 +
-3.600000 +
-mvc005.c3d +
-0.920000 +
-2.140000 +
-3.360000 +
-==== count events across entire file ====+
  
-**count across the entire file** +This example counts events on a per-file basis. 
-**metric_event_count** + 
-/result_metric_name=lhs_count +<code> 
-/result_metric_folder=processed +Metric_Event_Count 
-/event_name=lhs +/RESULT_METRIC_NAME=LHS_COUNT 
-/time_interval+/RESULT_METRIC_FOLDER=PROCESSED 
-/event_sequence+/EVENT_NAME=LHS 
-/exclude_events+/TIME_INTERVAL
-/generate_count_total_in_global=true +/EVENT_SEQUENCE
-**;** +/EXCLUDE_EVENTS
-**result**+/GENERATE_COUNT_TOTAL_IN_GLOBAL=TRUE 
 +
 +</code> 
 + 
 +The result of this command will be: 
 + 
 +<code>
 mvc005.c3d mvc005.c3d
-event_count= 3+Event_Count= 3
 mvc002.c3d mvc002.c3d
-event_count= 3+Event_Count= 3
 mvc003.c3d mvc003.c3d
-event_count= 3+Event_Count= 3
 mvc004.c3d mvc004.c3d
-event_count= 3 +Event_Count= 3 
-global_event_count= 12 +Global_Event_Count= 12 
-==== count events across entire file in time intervals ====+</code>
  
-**count across the entire file at 1 second intervals** +==== Example 2B: Count events across entire file in time intervals ==== 
-**metric_event_count** + 
-/result_metric_name=lhs_count +This example counts events according to time intervals over entire files and also calculates global counts. 
-/result_metric_folder=processed + 
-/event_name=lhs +<code> 
-/time_interval=1 +Metric_Event_Count 
-/event_sequence+/RESULT_METRIC_NAME=LHS_COUNT 
-/exclude_events+/RESULT_METRIC_FOLDER=PROCESSED 
-/generate_count_total_in_global=true +/EVENT_NAME=LHS 
-**;** +/TIME_INTERVAL=1 
-**result**+/EVENT_SEQUENCE
 +/EXCLUDE_EVENTS
 +/GENERATE_COUNT_TOTAL_IN_GLOBAL=TRUE 
 +
 +</code> 
 + 
 +The result of this command will be: 
 + 
 +<code>
 mvc005.c3d mvc005.c3d
-interval= 0.000000 to 1.000000 event_count= 1 +Interval= 0.000000 to 1.000000 Event_Count= 1 
-interval= 1.000000 to 2.000000 event_count= 0 +Interval= 1.000000 to 2.000000 Event_Count= 0 
-interval= 2.000000 to 3.000000 event_count= 1 +Interval= 2.000000 to 3.000000 Event_Count= 1 
-interval= 3.000000 to 4.000000 event_count= 1 +Interval= 3.000000 to 4.000000 Event_Count= 1 
-interval= 4.000000 to 4.200000 event_count= 0+Interval= 4.000000 to 4.200000 Event_Count= 0
 mvc002.c3d mvc002.c3d
-interval= 0.000000 to 1.000000 event_count= 0 +Interval= 0.000000 to 1.000000 Event_Count= 0 
-interval= 1.000000 to 2.000000 event_count= 1 +Interval= 1.000000 to 2.000000 Event_Count= 1 
-interval= 2.000000 to 3.000000 event_count= 1 +Interval= 2.000000 to 3.000000 Event_Count= 1 
-interval= 3.000000 to 4.000000 event_count= 1 +Interval= 3.000000 to 4.000000 Event_Count= 1 
-interval= 4.000000 to 4.580000 event_count= 0+Interval= 4.000000 to 4.580000 Event_Count= 0
 mvc003.c3d mvc003.c3d
-interval= 0.000000 to 1.000000 event_count= 1 +Interval= 0.000000 to 1.000000 Event_Count= 1 
-interval= 1.000000 to 2.000000 event_count= 0 +Interval= 1.000000 to 2.000000 Event_Count= 0 
-interval= 2.000000 to 3.000000 event_count= 1 +Interval= 2.000000 to 3.000000 Event_Count= 1 
-interval= 3.000000 to 4.000000 event_count= 1 +Interval= 3.000000 to 4.000000 Event_Count= 1 
-interval= 4.000000 to 4.600000 event_count= 0+Interval= 4.000000 to 4.600000 Event_Count= 0
 mvc004.c3d mvc004.c3d
-interval= 0.000000 to 1.000000 event_count= 1 +Interval= 0.000000 to 1.000000 Event_Count= 1 
-interval= 1.000000 to 2.000000 event_count= 0 +Interval= 1.000000 to 2.000000 Event_Count= 0 
-interval= 2.000000 to 3.000000 event_count= 1 +Interval= 2.000000 to 3.000000 Event_Count= 1 
-interval= 3.000000 to 4.000000 event_count= 1 +Interval= 3.000000 to 4.000000 Event_Count= 1 
-interval= 4.000000 to 4.380000 event_count= 0 +Interval= 4.000000 to 4.380000 Event_Count= 0 
-global_event_counts +Global_Event_Counts 
-global_event_count= 3 +Global_Event_Count= 3 
-global_event_count= 1 +Global_Event_Count= 1 
-global_event_count= 4 +Global_Event_Count= 4 
-global_event_count= 4 +Global_Event_Count= 4 
-global_event_count= 0 +Global_Event_Count= 0 
-==== count events in a set number of intervals across entire file ====+</code>
  
-**count over 5 intervals from the event_sequence start+end** +==== Example 2C: Count events in a set number of intervals across entire file ==== 
-**** + 
-**where start=1.0 and end=4.0 for all files** +This example counts events over 5 intervals from the event_sequence START+END, where START=1.0 and END=4.0 for all files. 
-**metric_event_count** + 
-/result_metric_name=lhs_count +<code> 
-/result_metric_folder=processed +Metric_Event_Count 
-/event_name=lhs +/RESULT_METRIC_NAME=LHS_COUNT 
-/time_interval=(event_label::original::end-event_label::original::start)/5 +/RESULT_METRIC_FOLDER=PROCESSED 
-/event_sequence=start+end +/EVENT_NAME=LHS 
-/exclude_events+/TIME_INTERVAL=(EVENT_LABEL::ORIGINAL::END-EVENT_LABEL::ORIGINAL::START)/5 
-/generate_count_total_in_global=true +/EVENT_SEQUENCE=START+END 
-**;** +/EXCLUDE_EVENTS
-**result**+/GENERATE_COUNT_TOTAL_IN_GLOBAL=TRUE 
 +
 +</code> 
 + 
 +The result for this command will be: 
 + 
 +<code>
 mvc005.c3d mvc005.c3d
-interval= 1.000000 to 1.600000 event_count= 0 +Interval= 1.000000 to 1.600000 Event_Count= 0 
-interval= 1.600000 to 2.200000 event_count= 1 +Interval= 1.600000 to 2.200000 Event_Count= 1 
-interval= 2.200000 to 2.800000 event_count= 0 +Interval= 2.200000 to 2.800000 Event_Count= 0 
-interval= 2.800000 to 3.400000 event_count= 1 +Interval= 2.800000 to 3.400000 Event_Count= 1 
-interval= 3.400000 to 4.000000 event_count= 0+Interval= 3.400000 to 4.000000 Event_Count= 0
 mvc002.c3d mvc002.c3d
-interval= 1.000000 to 1.600000 event_count= 1 +Interval= 1.000000 to 1.600000 Event_Count= 1 
-interval= 1.600000 to 2.200000 event_count= 0 +Interval= 1.600000 to 2.200000 Event_Count= 0 
-interval= 2.200000 to 2.800000 event_count= 1 +Interval= 2.200000 to 2.800000 Event_Count= 1 
-interval= 2.800000 to 3.400000 event_count= 0 +Interval= 2.800000 to 3.400000 Event_Count= 0 
-interval= 3.400000 to 4.000000 event_count= 1+Interval= 3.400000 to 4.000000 Event_Count= 1
 mvc003.c3d mvc003.c3d
-interval= 1.000000 to 1.600000 event_count= 0 +Interval= 1.000000 to 1.600000 Event_Count= 0 
-interval= 1.600000 to 2.200000 event_count= 0 +Interval= 1.600000 to 2.200000 Event_Count= 0 
-interval= 2.200000 to 2.800000 event_count= 1 +Interval= 2.200000 to 2.800000 Event_Count= 1 
-interval= 2.800000 to 3.400000 event_count= 0 +Interval= 2.800000 to 3.400000 Event_Count= 0 
-interval= 3.400000 to 4.000000 event_count= 1+Interval= 3.400000 to 4.000000 Event_Count= 1
 mvc004.c3d mvc004.c3d
-interval= 1.000000 to 1.600000 event_count= 0 +Interval= 1.000000 to 1.600000 Event_Count= 0 
-interval= 1.600000 to 2.200000 event_count= 0 +Interval= 1.600000 to 2.200000 Event_Count= 0 
-interval= 2.200000 to 2.800000 event_count= 1 +Interval= 2.200000 to 2.800000 Event_Count= 1 
-interval= 2.800000 to 3.400000 event_count= 0 +Interval= 2.800000 to 3.400000 Event_Count= 0 
-interval= 3.400000 to 4.000000 event_count= 1 +Interval= 3.400000 to 4.000000 Event_Count= 1 
-global_event_counts +Global_Event_Counts 
-global_event_count= 1 +Global_Event_Count= 1 
-global_event_count= 1 +Global_Event_Count= 1 
-global_event_count= 3 +Global_Event_Count= 3 
-global_event_count= 1 +Global_Event_Count= 1 
-global_event_count= 3 +Global_Event_Count= 3 
- +</code>
-}}+
visual3d/documentation/pipeline/metric_commands/metric_event_count.1718801478.txt.gz · Last modified: 2024/06/19 12:51 by sgranger