=====Event TPR File===== =====Overview===== The Event_TPR_File command is used to match a pre-saved signal pattern to a signal in the current selected trial. When the shape of the signal matches the pattern, an event is created at that frame. * It is typically used to validate and test pattern recognition templates when build TPR files for broader use across multiple trials. * The signal that the pattern is being matched to must exist in the trial. =====Pipeline Command===== The command below is as seen on the Visual3D application, it has many parameters as there are many options to manipulate this command: Event_TPR_File ! /SIGNAL_TYPES= ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /EVENT_NAME= ! /SELECT_X=FALSE ! /SELECT_Y=FALSE ! /SELECT_Z=FALSE /FILE_NAME= ! /TOLERANCE=20.0 ; =====Command Parameters===== The following table shows the command parameters and descriptions: |**Parameter** |**Description**| |**/SIGNAL_TYPES=** | Type of signal being evaluated (e.g., `LINK_MODEL_BASED`, `ANALOG`). | |**!/SIGNAL_FOLDER=** | Folder where the signal is located (`ORIGINAL`, `FILTERED`, etc.). | |**/SIGNAL_NAMES=** | Name of the signal to be evaluated (e.g., `Right_Ankle_Accel`). | |**/EVENT_NAME=** | Name of the new event that will be created when a match is found. | |**!/SELECT_X=FALSE** | Use the X-component of the signal (set to `TRUE` if relevant). | |**!/SELECT_Y=FALSE** | Use the Y-component (e.g., for vertical acceleration). | |**!/SELECT_Z=FALSE** | Use the Z-component (e.g., for forward/backward motion). | |**/FILE_NAME=** | Full name of the `.tpr` file containing the pattern template. | |**!/TOLERANCE=20.0** | The matching threshold. Lower values = stricter match (e.g., 10.0 = tight match). | =====Dialog===== The dialog for this command simplifies pattern-based event creation: {{:visual3d:documentation:pipeline:event_commands:event_tpr_file_dlg.png?400|}} Interface elements: * **TPR File**: A browse option to load in the pattern file. * **Event Name**: Define the event label to be generated. * **Pattern Components to Match**: Select X, Y, and/or Z direction. * **Tolerance**: Controls how strictly the signal must match the pattern. Smaller values mean tighter matching. =====Examples===== The following example will go through the use of the Event_TPR_File command within the Visual3D application. ====Example 1: Assigning Events to Event-less Trial based on TPR==== This command is not as intuitive for use as the Event_TPR_Signal when it comes to performing TPR on and placing events on specified signals. * It is more useful for assigning events to the whole file if you have already generated a .tps file (target pattern signal) or you could also simply use events from another .c3d, like Event_TPR_Signal. * An important thing to note is that this command is dependent on what is saved in the TPR file - which must be done properly using **Event_TPR_Signal** or **Event_Save_TPR_Signal** The following steps can be taken for this example: **1.** Make sure that you have a valid TPR file with the events and make sure that the same signal also exists in the current .c3d which has no events. **2.** In this example, a .c3d file will be used which has ALL automatically detected gait events. **3.** The following information can be entered, this is transferring the LHS events from the user selected file to the signal which was selected to be L Hip Angle. |{{:visual3d:documentation:pipeline:event_commands:event_tpr_exdlg.png?400|}}| Event_TPR_File /SIGNAL_TYPES=LINK_MODEL_BASED ! /SIGNAL_FOLDER=ORIGINAL /SIGNAL_NAMES=L Hip Angle /EVENT_NAME=LHS /SELECT_X=TRUE ! /SELECT_Y=FALSE ! /SELECT_Z=FALSE /FILE_NAME=[USER SELECTION] ! /TOLERANCE=20.0 ; | After running this pipeline command, the **LHS** Event should show up in the workspace. ----