User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_compute_dft_coefficients

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_compute_dft_coefficients [2024/07/12 14:04] – created sgrangervisual3d:documentation:pipeline:metric_commands:metric_compute_dft_coefficients [2025/09/23 15:08] (current) – [Examples] wikisysop
Line 1: Line 1:
-====== Metric_Compute_DFT_Coefficients ======+=====Metric Compute DFT Coefficients=====
  
-The Discrete Fourier Transform of a Signal +====Overview==== 
- +Metric Compute DFT Coefficients is used to compute a metric signal containing the DFT coefficients and the Base Frequency. It can be found in the **Pipeline Workshop** within the **Metric** folder. This command can be used when it is necessary to perform processing and filtering on a signal to identify the frequency spectrum and/or response.
-This command computes a metric signal containing the DFT coefficients and the Base Frequency.+
  
 The form of the DFT is as follows: The form of the DFT is as follows:
Line 17: Line 16:
 See also [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Compute_Power_From_DFT_Coefficients|Compute Power from DFT coefficients]] See also [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Compute_Power_From_DFT_Coefficients|Compute Power from DFT coefficients]]
  
-{{ComputeDFTdialog.jpg}} +====Pipeline Command===
- +The command, as seen in the pipeline workshop, is below.  
-=== Pipeline Command === +<code> 
- +Metric_Compute_DFT_Coefficients
-**Metric_Compute_DFT_Coefficients**+
 /SIGNAL_TYPES= /SIGNAL_TYPES=
 +! /SIGNAL_FOLDER=ORIGINAL
 ! /SIGNAL_NAMES= ! /SIGNAL_NAMES=
-! /SIGNAL_FOLDER=ORIGINAL 
 ! /SIGNAL_COMPONENTS=ALL_COMPONENTS ! /SIGNAL_COMPONENTS=ALL_COMPONENTS
 +! /RESULT_FOLDER=DFT
 ! /RESULT_SUFFIX=_DFT ! /RESULT_SUFFIX=_DFT
-! /RESULT_FOLDER=DFT +! /EVENT_SEQUENCE= 
-!/[[Visual3D:Documentation:C3D_Signal_Types:EVENT_LABEL_Data_Type#Event_Sequence|EVENT_SEQUENCE]]+! /EXCLUDE_EVENTS=
-!/[[Visual3D:Documentation:C3D_Signal_Types:EVENT_LABEL_Data_Type#Exclude_Events|EXCLUDE_EVENTS]]=+
 ! /START_FRAME= ! /START_FRAME=
 ! /END_FRAME= ! /END_FRAME=
-! /USE_POINT_RATE=TRUE 
 ! /BASE_FREQUENCY= ! /BASE_FREQUENCY=
-/NUM_FREQUENCIES=4 +/NUM_FREQUENCIES=4 
-**;** +</code>
-=== Signal_Components ===+
  
-Each component of the signal will generate a metric signal containing the coefficients for that component of the signal.+====Command Parameters==== 
 +The following table shows the command parameters and descriptions:
  
-=== Number of Frequencies ===+|**SIGNAL_TYPES** |**Specify signal types**| 
 +|**SIGNAL_FOLDER**|**Specify signal folder**| 
 +|**SIGNAL_NAMES**|**Specify signal names**| 
 +|**SIGNAL_COMPONENTS**|**Each component of the signal will generate a metric signal containing the coefficients for that component of the signal.**| 
 +|**RESULT_FOLDER**|**Specify folder containing results**| 
 +|**RESULT_SUFFIX**|**Specify suffix applied to results**| 
 +|**EVENT_SEQUENCE**|**The [[Visual3D:Documentation:C3D_Signal_Types:EVENT_LABEL_Data_Type#Event_Sequence|Event Sequence and Exclude_Sequence]] define the range of frames used to compute the DFT coefficients.**| 
 +|**EXCLUDE_EVENTS**|**If this event occurs before the first and last event, do not compute a metric**| 
 +|**START_FRAME**|**Specify the starting frame of the sequence**| 
 +|**END_FRAME**|**Specify the ending frame of the sequence**| 
 +|**BASE_FREQUENCY**|**The base frequency is the fundamental frequency of the signal**| 
 +|**NUM_FREQUENCIES**|**Determines the number of coefficients that will be stored in the resulting metric signal.**|
  
-The parameter Num_Frequencies determines the number of coefficients that will be stored in the resulting metric signal.+====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.
  
-If Num_Frequencies is empty, the number is determined consistent with a standard DFT or FFT.+{{:ComputeDFTdialog.jpg}}
  
-Num_Frequencies = 1 + NumFrames/2+The dialog box allows you to assign values to the command parameters outlined above. 
  
-where the Maximum Number of Frequencies 0.5*DataRate;+====Examples==== 
 +===Simple example: Compute DFT coefficients for Analog signals===
  
-=== Event_Sequence ===+One of the primary applications of the **Compute DFT Coefficients** command is to perform analysis of analog signals like force readings and EMGs. Here we compute the DFT coefficients for a folder containing EMG and force plate data.
  
-The [[Visual3D:Documentation:C3D_Signal_Types:EVENT_LABEL_Data_Type#Event_Sequence|Event Sequence and Exclude_Sequence]] define the range of frames used to compute the DFT coefficients+Start by identifying the name and location of the intended folder, this can be done in the **Signals and Events** tab.
  
-=== Base_Frequency ===+{{:visual3d:documentation:pipeline:metric_commands:dft_tutorial_folder.png?250|}}
  
-If BASE_FREQUENCY is empty, +Nowadd the **Compute DFT Coefficients** command to your pipeline and modify it to include the intended folderwith the event sequence defined for the right stance phaseIt should look something like this:
- +
-Frequency= SamplingRate/NumberOfFrames (average per cycle per file) +
-Else +
- +
-Frequency= Numerical value or Expression +
-=== Resulting Metric Signal === +
- +
-The metric signal is stored as follows (Base_Frequency, p0, p1, p2, p3, p4, ....) +
- +
-The Base_Frequency and coefficients are stored as components of the signal. +
- +
-If there are multiple ranges of datathere will be a "frame" or "row" for each range. +
- +
-see also : [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Compute_Power_From_DFT_Coefficients|Metric_Compute_Power_From_DFT_Coefficients]]+
  
 +<code>
 +Metric_Compute_DFT_Coefficients
 +/SIGNAL_TYPES=ANALOG
 +/SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=EMG*
 +! /SIGNAL_COMPONENTS=ALL_COMPONENTS
 +/RESULT_FOLDER=DFT
 +! /RESULT_SUFFIX=_DFT
 +/EVENT_SEQUENCE=RON+ROFF
 +! /EXCLUDE_EVENTS=
 +! /START_FRAME=
 +! /END_FRAME=
 +! /BASE_FREQUENCY=
 +! /NUM_FREQUENCIES=4
 +;
 +</code>
  
 +Click **Execute Pipeline** and navigate back to the **Signals and Events** tab. You should now see a **DFT** folder within the **Metric** folder containing the coefficients for each processed signal.
 +===Complex example===
  
 +To see how this command can be used to compute EMG power data please go to [[Visual3D:Documentation:Pipeline:Metric_Commands:Metric_Compute_Power_From_DFT_Coefficients|Compute Power from DFT coefficients]].
visual3d/documentation/pipeline/metric_commands/metric_compute_dft_coefficients.1720793078.txt.gz · Last modified: 2024/07/12 14:04 by sgranger