User Tools

Site Tools


visual3d:documentation:pipeline:event_commands:event_save_tpr_signal

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:event_commands:event_save_tpr_signal [2025/04/11 18:23] wikisysopvisual3d:documentation:pipeline:event_commands:event_save_tpr_signal [2025/04/29 14:02] (current) – [Dialog] wikisysop
Line 1: Line 1:
-=====Event TPR Signal======+=====Event Save TPR Signal=====
  
-====Overview====+=====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:
  
-====Pipeline Command==== 
 <code> <code>
 +Event_Save_TPR_Signal
 +! /FILE_NAME=
 +! /PATTERN_FILE=
 /SIGNAL_TYPES= /SIGNAL_TYPES=
 ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_FOLDER=ORIGINAL
 /SIGNAL_NAMES= /SIGNAL_NAMES=
-! /PATTERN_FILE= 
-! /PATTERN_TYPE= 
-! /PATTER_FOLDER=ORIGINAL 
-! /PATTERN_SIGNAL= 
 /PATTERN_EVENT_NAME= /PATTERN_EVENT_NAME=
 ! /PATTERN_EVENT_INSTANCE=1 ! /PATTERN_EVENT_INSTANCE=1
-! /SELECT_X=FALSE +! /TPR_RADIUS=7
-! /SELECT_Y=FALSE +
-! /SELECT_Z=FALSE +
-! /SELECT_Z=FALSE +
-! /TPR_WINDOW=7 +
-! /TOLERANCE=20.0 +
-/EVENT_NAME=+
 ; ;
 </code> </code>
 +
 +
 +=====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.
 +
 +{{:visual3d:documentation:pipeline:event_commands:tpr_signal_save_dlg.png?400|}}
 +
 +  * **File Name**: The name of the output where the TPR signal will be saved.
 +  * **Pattern File**: File with applied TPR used to generate events in new signal.
 +  * **Display Short Filenames**: If checked, shows abbreviated versions of file names in dropdowns.
 +  * **Pattern Type**: The type of signal which the TPR algorithm is applied to (ANALOG, LINK_MODEL_BASED, etc.)
 +  * **Pattern Folder**: Folder name where the pattern signal is stored.
 +  * **Pattern Signal Name**: Name of signal which has the TPR algorithm applied to it.
 +  * **Pattern Event**: Event which TPR algorithm bases off of.
 +  * **Event Instance**: Specifies which instance of the event to label.
 +  * **Radius Samples**: Defines the width of the matching window around the event in samples.
 +=====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 [[visual3d:documentation:pipeline:event_commands:event_tpr_signal|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 [[visual3d:documentation:pipeline:event_commands:event_tpr_signal|Event_TPR_Signal]] command.
 +
 +<code>
 +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
 +;
 +</code>
 +
 +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 [[visual3d:documentation:pipeline:event_commands:event_tpr_file|Event_TPR_File]] command.
 +
 +
  
visual3d/documentation/pipeline/event_commands/event_save_tpr_signal.1744395798.txt.gz · Last modified: 2025/04/11 18:23 by wikisysop