User Tools

Site Tools


visual3d:documentation:pipeline:event_commands:event_save_tpr_signal

This is an old revision of the document!


Event Save TPR Signal

Overview

The 'Event_Save_TPR_Signal' command is used to create and save a Target Pattern Recognition (TPR) file. This file captures the shape of a signal surrounding a specific event and is later used in pattern-matching commands like 'Event_TPR_Signal' or 'Event_TPR_File'.

  • Works by taking a window frames around an event and saving that signal segment as a template than can be used for event detection in other tirals.

Requirements:

  • A well-defined event must already exist in the file, and the signal around the event must be clearly identifiable and stable.
  • The radius (number of frames before/after) should capture the full motion feature.

Pipeline Command

The pipeline command is shown below as seen in the Visual3D application:

Event_Save_TPR_Signal
! /FILE_NAME=
! /PATTERN_FILE=
/SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
/SIGNAL_NAMES=
/PATTERN_EVENT_NAME=
! /PATTERN_EVENT_INSTANCE=1
! /TPR_RADIUS=7
;

Command Parameters

The following table shows the command parameters and descriptions:

Parameter Description
/FILE_NAME= The name of the `.tpr` file to be created (e.g., `HeelStrikePattern.tpr`).
/PATTERN_FILE= (Optional) Used internally to chain patterns — leave blank when saving a new pattern.
/SIGNAL_TYPES= Type of signal (e.g., `ANALOG`, `LINK_MODEL_BASED`, or `TARGET`).
/SIGNAL_FOLDER= Folder containing the signal data (`FILTERED`, `ORIGINAL`, etc.).
/SIGNAL_NAMES= Name of the signal to extract the pattern from (e.g., `Right_Ankle_Accel`).
/PATTERN_EVENT_NAME= Name of the event at the center of the pattern (e.g., `EMG_Onset`, `LHS`).
/PATTERN_EVENT_INSTANCE= Which instance of the event to use (1 = first, 2 = second, etc.).
/TPR_RADIUS= Number of frames before and after the event to include. A value of 10 creates a 21-frame pattern.

Dialog

The command can be edited in a text editor or in a dialog form. To edit in the dialog pop up form either click on the Edit button in the pipeline workshop or double-click on the pipeline command. The dialog is shown below.

These options are reflected in the parameters table.

Examples

The following example shows the use of Event_Save_TPR_Signal command in the Visual3D application.

Example 1: Saving file for matching opposite-side Gait Events

On the Event_TPR_Signal command page, the example goes through applying the TPR signal to a certain pattern file to apply to another trial.

This command, Event_Save_TPR_Signal provides a way save that pattern file to serve as a template (e.g. you need to apply the command to multiple files to generate opposite side events).

In the case of this example, the TPR signal used LHS events to determine RHS events from the opposite foot. So the process would be that you select a file with LHS Events, select a specific trial and fill in the other parameters the same way as the Event_TPR_Signal command.

Event_Save_TPR_Signal
/FILE_NAME=C:/.../HeelStrikePattern.tpr
/PATTERN_FILE=
/SIGNAL_TYPES=LINK_MODEL_BASED
! /SIGNAL_FOLDER=ORIGINAL
/SIGNAL_NAMES=L Hip Angle
/PATTERN_EVENT_NAME=LHS
! /PATTERN_EVENT_INSTANCE=1
! /TPR_RADIUS=7
;

This can now be used as the pattern file when looking to specify right side events or apply LHS events to a file that does not have any yet. This file can be used via the Event_TPR_File command.

visual3d/documentation/pipeline/event_commands/event_save_tpr_signal.1745865021.txt.gz · Last modified: 2025/04/28 18:30 by wikisysop