User Tools

Site Tools


visual3d:documentation:pipeline:signal_commands:shift_frames

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:signal_commands:shift_frames [2024/07/16 19:32] – created sgrangervisual3d:documentation:pipeline:signal_commands:shift_frames [2024/11/15 21:10] (current) – Brought page up to pipeline command format. wikisysop
Line 1: Line 1:
-====== Shift_Frames ======+===== Shift Frames =====
  
-|| +In some cases, [[visual3d:documentation:emg:emg_overview|EMG]] data and [[visual3d:documentation:definitions:motion_capture_mocap|motion capture]] data may be out of sync with each other. This can occur because of a physiological issue known as electromechanical delay (EMD), or because of technical issues with data collectione.g. the saved EMG signal might be delayed because the EMG system is wireless. The command **Shift_Frames** shifts a signal forward/backward in time by a number of frames to accommodate this issue.
- +
-In some cases, the EMG data and Motion Capture data may be out of sync with each other. This can occur because of a physiological issue known as electromechanical delay (EMD), or because of technical issues with data collection (e.g. the saved EMG signal might be "delayedbecause the EMG system is wireless). +
- +
-{{Shift_Frames.png}} +
- +
-The command **Shift_Frames** shifts a signal forward/backward in time by a number of frames. The command is below:+
  
 <code> <code>
 Shift_Frames Shift_Frames
-/SIGNAL_TYPES=ANALOG+/SIGNAL_TYPES=TARGET
 ! /SIGNAL_NAMES= ! /SIGNAL_NAMES=
 ! /SIGNAL_FOLDER=ORIGINAL  ! /SIGNAL_FOLDER=ORIGINAL 
 ! /RESULT_SUFFIX=  ! /RESULT_SUFFIX= 
 ! /RESULT_FOLDER=PROCESSED  ! /RESULT_FOLDER=PROCESSED 
-/FRAME_SHIFT= The number of frames to shift (expression)  +/FRAME_SHIFT= 5 
-/REPLACEMENT_VALUE= The value to replace the unknown values caused by the shift (expression).+/REPLACEMENT_VALUE=DATA_NOT_FOUND
 ; ;
 </code> </code>
 +
 +==== Parameters ====
 +
 +^ Parameter ^ Description ^
 +| SIGNAL_TYPES | The Type(s) of the signal to be shifted. |
 +| SIGNAL_NAMES| The Name(s) of the signal to be shifted. |
 +| SIGNAL_FOLDER | The Folder(s) of the signal to be shifted. |
 +| RESULT_SUFFIX | The suffix to append to the signal's name after it has been shifted. |
 +| RESULT_FOLDER | The folder in which to store the shifted signal. |
 +| FRAME_SHIFT| The number of frames to shift. Can be an [[visual3d:documentation:pipeline:expressions:expressions_overview|expression]].  |
 +| REPLACEMENT_VALUE | The value to replace any unknown values caused by the shift. The default value is 0, except when the **Signal_Type** parameter is a **TARGET** in which case **[[visual3d:documentation:c3d_signal_types:data_not_found|DATA_NOT_FOUND]]** (e.g. unreliable value) is used. |
 +
 +==== Dialog ====
 +
 +The Shift_Frames command can be edited interactively using the following dialog.
 +
 +{{:Shift_Frames.png}}
 +
 +==== Notes ====
  
   * When a signal is shifted forward in time, the frames at the beginning of the file have unknown values.   * When a signal is shifted forward in time, the frames at the beginning of the file have unknown values.
   * When a signal is shifted backward in time, the frames at the end of the file have unknown values.   * When a signal is shifted backward in time, the frames at the end of the file have unknown values.
   * These unknown values can be specified by the **/Replacement_Value** parameter.   * These unknown values can be specified by the **/Replacement_Value** parameter.
-  * If no **/Replacement_Value** is specified Visual 3D uses a value of 0 except when the **Signal_Type** parameter is a **TARGET** and value of **DATA_NOT_FOUND** (e.g. unreliable value) is used.+  * If no **/Replacement_Value** is specified Visual 3D uses a value of 0 except when the **Signal_Type** parameter is a **TARGET** and value of **[[visual3d:documentation:c3d_signal_types:data_not_found|DATA_NOT_FOUND]]** (e.g. unreliable value) is used.
  
-For exampleshift all analog signals in time based on the value of a Metric signal and replace the unknown values with **DATA_NOT_FOUND** (e.g. no value).+==== Examples ==== 
 + 
 +With Visual3D's flexible signal specification syntax and the power of expressionsit is possible to precisely specify how any signals should be shifted. 
 + 
 +=== Example 1: Shift a single signal === 
 + 
 +Shift the signal 1FX by one analog frame and to replace the first frame with the value -99 
 + 
 +<code> 
 +Shift_Frames 
 +/SIGNAL_TYPES=ANALOG 
 +/SIGNAL_NAMES=1FX 
 +! /SIGNAL_FOLDER=ORIGINAL 
 +! /RESULT_SUFFIX= 
 +! /RESULT_FOLDER=PROCESSED 
 +/FRAME_SHIFT=1 
 +/REPLACEMENT_VALUE=-99 
 +
 +</code> 
 + 
 +=== Example 2: Shift all analog signals using an expression === 
 + 
 +Shift all analog signals in time based on the value of a Metric signal and replace the unknown values with **DATA_NOT_FOUND** (e.g. no value).
  
 <code> <code>
Line 41: Line 76:
 </code> </code>
  
-**NOTE:** FORCE, COFP, and FREEMOMENT signals are derived from ANALOG signals, so these values cannot be shifted; the Analog signals should be shifted, and the option to use PROCESSED analog signals for computing forces should be set to true. +**NOTE:** [[visual3d:documentation:visual3d_signal_types:force_data_type|FORCE]][[visual3d:documentation:visual3d_signal_types:cofp_data_type|COFP]], and [[visual3d:documentation:visual3d_signal_types:freemoment_data_type|FREEMOMENT]] signals are derived from [[visual3d:documentation:c3d_signal_types:analog_data_type|ANALOG]] signals, so these values cannot be shifted; the ANALOG signals should be shifted, and the option to use PROCESSED analog signals for computing forces should be set to true.
- +
-For example, to shift the signal 1FX by one analog frame and to replace the first frame with the value -99 +
- +
-**Shift_Frames** +
-/SIGNAL_TYPES=ANALOG +
-/SIGNAL_NAMES=1FX +
-! /SIGNAL_FOLDER=ORIGINAL +
-! /RESULT_SUFFIX= +
-! /RESULT_FOLDER=PROCESSED +
-/FRAME_SHIFT=1 +
-/REPLACEMENT_VALUE=-99 +
-**:**+
  
  
visual3d/documentation/pipeline/signal_commands/shift_frames.1721158327.txt.gz · Last modified: 2024/07/16 19:32 by sgranger