User Tools

Site Tools


visual3d:documentation:pipeline:expressions:brackets

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:expressions:brackets [2024/06/19 12:49] sgrangervisual3d:documentation:pipeline:expressions:brackets [2024/11/15 20:15] (current) – [Brackets] wikisysop
Line 1: Line 1:
-brackets+====== Brackets ======
  
-===== contents ===== 
  
  
 +===== Parentheses =====
  
-  [[#parentheses|1 parentheses]] +Parentheses **(** and **)** are used to contain the parameters in a function
-  [[#square_brackets|2 square_brackets]] +
-    [[#square_brackets_2|2.1 square brackets]] +
-    [[#using_square_brackets_and_boolean_operators|2.2 using square brackets and boolean operators]]+
  
 +For Example\\
 +Vector(0,0,1)
  
-====== parentheses ======+===== Square_Brackets =====
  
-parenthesis **(** and **)** are used to contain the parameters in a function +Square Brackets **[** and **]** specify frame numbers and components
-for example +
-[[index.php?title=vector(0,0,1)&action=edit&redlink=1|vector(0,0,1)]] +
-====== square_brackets ======+
  
-=== square brackets ===+Square Brackets **[** and **]** are used at the end of a function call or parenthesis ( ) to specify the frames numbers and components
  
-square brackets **[** and **]** specify frame numbers and components+Example, add two signals and retrieve the component 1 from frame 5 
 +<code> 
 +Evaluate_Expression 
 +/Expression= (TARGET::ORIGINAL::RFT1 + TARGET::ORIGINAL::RFT2)[5,1] 
 +/Result_Name=RFT_ADD_X 
 +/Result_Type=DERIVED 
 +/Result_Folder=PROCESSED 
 +
 +</code>
  
-square brackets **[** and **]** are used at the end of a function call or parenthesis ( ) to specify the frames numbers and components +Example, add two signals and retrieve the component 1 for all frames 
-example, add two signals and retrieve the component 1 from frame 5 +<code> 
-evaluate_expression +Evaluate_Expression 
-/expression= (target::original::rft1 + target::original::rft2)[5,1] +/Expression= (TARGET::ORIGINAL::RFT1 TARGET::ORIGINAL::RFT2)[-1,1] 
-/result_name=rft_add_x +/Result_Name=RFT_ADD_X 
-/result_type=derived +/Result_Type=DERIVED 
-/result_folder=processed +/Result_Folder=PROCESSED 
-**;** +
-for example, add two signals and retrieve the component 1 for all frames +</code>
-evaluate_expression +
-/expression= (target::original::rft1 target::original::rft2)[-1,1] +
-/result_name=rft_add_x +
-/result_type=derived +
-/result_folder=processed +
-**;** +
-**note** a frame of -1 means all frames +
-extracting one "component" of data from signal+
  
-the following command will result in the derived signal test containing the x component values of the target rft1. +**NOTE** a frame of -1 means all frames\\ 
-**evaluate_expression** +Extracting one "component" of data from signal
-/expression=target::original::rft1::+
-/result_name=test +
-/result_type=derived +
-! /result_folder=processed +
-**;** +
-=== using square brackets and boolean operators ===+
  
-in this example, project a collection of markers onto the floor+The following command will result in the DERIVED signal TEST containing the X component values of the TARGET RFT1. 
 +<code> 
 +Evaluate_Expression 
 +/EXPRESSION=TARGET::ORIGINAL::RFT1::
 +/RESULT_NAME=TEST 
 +/RESULT_TYPE=DERIVED 
 +! /RESULT_FOLDER=PROCESSED 
 +
 +</code> 
 + 
 +== Using Square Brackets and Boolean Operators == 
 + 
 +In this example, project a collection of markers onto the floor
 whenever the z-component of a marker is less than a threshold (e.g. 0.08 in this example) whenever the z-component of a marker is less than a threshold (e.g. 0.08 in this example)
-otherwise set the resulting frame to no_data +otherwise set the resulting frame to NO_DATA 
-**evaluate_expression** + 
-/expression=(((current_signal[-1,3])<0.08)/((current_signal[-1,3])<0.08))*vector(1,1,0)*current_signal +<code> 
-/signal_types=target +Evaluate_Expression 
-/signal_folder=original +/EXPRESSION=(((CURRENT_SIGNAL[-1,3])<0.08)/((CURRENT_SIGNAL[-1,3])<0.08))*VECTOR(1,1,0)*CURRENT_SIGNAL 
-/signal_names=lft1+lft2+lft3+rft1+rft2+rft3 +/SIGNAL_TYPES=TARGET 
-/result_types=target +/SIGNAL_FOLDER=ORIGINAL 
-/result_folders=ground +/SIGNAL_NAMES=LFT1+LFT2+LFT3+RFT1+RFT2+RFT3 
-! /result_name+/RESULT_TYPES=TARGET 
-/apply_as_suffix_to_signal_name=true +/RESULT_FOLDERS=GROUND 
-**;**+! /RESULT_NAME
 +/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE 
 +; 
 +</code>
  
  
visual3d/documentation/pipeline/expressions/brackets.1718801393.txt.gz · Last modified: 2024/06/19 12:49 by sgranger