visual3d:documentation:pipeline:file_commands:select_active_file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:file_commands:select_active_file [2024/07/17 15:23] – sgranger | visual3d:documentation:pipeline:file_commands:select_active_file [2025/07/22 15:05] (current) – wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Select Active File ====== | ====== Select Active File ====== | ||
- | Many of the pipeline commands | + | ===== Overview ===== |
+ | The **Select_Active_File** command is used to define which file(s) are active in the Visual3D workspace. This is important because most pipeline commands | ||
- | {{:Tutorial4_5.jpg}} | + | You can select files using three different mechanisms: |
+ | - FILE_NAME- Target a file or files using full name or wildcard patterns | ||
+ | - QUERY- Select based on logical tag conditions (e.g., ' | ||
+ | - SUBJECT_TAGS- Select based on subject-level tags (metadata applied to trials) | ||
- | ==== Pipeline Command ==== | ||
- | The pipeline command below is used to select | + | ==== Understanding |
- | < | + | **/FILE_NAME=**: Lets you specify the actual filename or use wildcards: |
- | Select_Active_File | + | * " |
- | ! / | + | * " |
- | ! /QUERY= | + | |
- | ! / | + | |
- | ; | + | |
- | </ | + | |
- | === File_Name === | + | **/QUERY=**: Lets you use logic expressions to select based on file-level tags |
+ | * If you have tagged trials like " | ||
+ | * '/ | ||
+ | * '/ | ||
- | The parameter | + | |Symbol|Meaning (Syntax)|Example| |
+ | |**+**|OR|' | ||
+ | |**|**|OR (Alternative)|' | ||
+ | |**& | ||
+ | |**NOT**|Negation|' | ||
- | **Note:** Visual3D defines files by their full pathname. For example, the following command will not be recognized | + | **'/ |
- | < | + | ===== Pipeline Command ===== |
- | Select_Active_File | + | |
- | /FILE_NAME= file1.c3d | + | |
- | ; | + | |
- | </ | + | |
- | To fix the example above, you define | + | The command below is as seen on the Visual3D application, the parameters within act as options to manipulate the command. |
< | < | ||
Select_Active_File | Select_Active_File | ||
- | / | + | ! / |
- | ; | + | ! /QUERY= |
+ | ! / | ||
</ | </ | ||
- | or you can use a wildcard: | + | ===== Command Parameters ===== |
- | < | + | The following table shows the command parameters and descriptions. |
- | Select_Active_File | + | |
- | /FILE_NAME= *file1.c3d | + | |
- | ; | + | |
- | </ | + | |
- | or you can specify a TAG: | + | |**Parameter**|**Description**| |
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
- | < | + | ===== Dialog ===== |
- | Select_Active_File | + | |
- | /FILE_NAME= TAG1 | + | |
- | ; | + | |
- | </ | + | |
- | === Query === | + | There is no dedicated dialog box for this command. The GUI equivalent is manually selecting the active file using the file selector dropdown in the toolbar: |
- | The Query option (**Visual3D Professional Only**) allows you to select a subset of the files referred by to FILE_NAME. You can query using [[Visual3D:Documentation:Pipeline:Expressions:Expressions_Overview|expressions]]: | + | {{:visual3d:documentation:pipeline:file_commands:activefile_ui_dropdown.png? |
- | / | + | This command is primarily used in pipeline scripts and batch processing workflows to automate file selection. |
- | === Subject_Tags | + | ===== Examples ===== |
- | Set the active subject tag - FOR MULTISUBJECT ONLY! | + | The following examples will go through |
- | ==== Example 1: Global_Workspace ==== | + | === Example 1: Select the Global Workspace |
- | This example shows how to make the [[Visual3D: | + | Use this when working with signals that were computed across multiple trials. These signals are not associated with a specific file, and so they live in the Global Workspace. |
< | < | ||
Line 71: | Line 69: | ||
/ | / | ||
! /QUERY= | ! /QUERY= | ||
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ==== Example 2 - ALL_FILES and OR Query ==== | + | === Example 2: Select trials based on tags (OR condition) |
- | From ALL_FILES select files that are tagged | + | Say that you' |
- | Using the "+" as the " | + | < |
+ | Select_Active_File | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | Or equivalently: | ||
< | < | ||
Select_Active_File | Select_Active_File | ||
/ | / | ||
- | /QUERY=TAG1 + TAG2 | + | /QUERY=WALK | RUN |
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | Using " | + | === Example 3: Select trials with one tag AND NOT another === |
+ | Suppose you want to select all running trials that are not tagged | ||
< | < | ||
Select_Active_File | Select_Active_File | ||
/ | / | ||
- | /QUERY=TAG1 | TAG2 | + | /QUERY=RUN & NOT(FATIGUE) |
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ==== Example | + | === Example |
- | From ALL_FILES select files that are TAG1 AND NOT TAG2 using the operators "&" | + | Assuming you've tagged subjects as ' |
< | < | ||
Select_Active_File | Select_Active_File | ||
/ | / | ||
- | /QUERY=TAG1 & NOT(TAG2) | + | ! /QUERY= |
+ | / | ||
; | ; | ||
</ | </ | ||
- | ==== Example 4 - ALL_FILES and a wildcard ==== | ||
- | From ALL_FILES select files that do not contain the wildcard *run*.c3d | + | === Example 5: Exclude specific filename patterns using tagging === |
- | This cannot be done in one step. Command will be used to tag the files prior to using the Select_Active command. | + | If you want to exclude trials with " |
< | < | ||
+ | ! Tag only the files NOT containing " | ||
! Assign tag RUN to files with " | ! Assign tag RUN to files with " | ||
Assign_Tags_To_Files | Assign_Tags_To_Files | ||
Line 132: | Line 143: | ||
/ | / | ||
! /QUERY= | ! /QUERY= | ||
- | ; | ||
</ | </ | ||
+ | |||
+ | ===== Notes ===== | ||
+ | * Use this command any time your pipeline depends on file-specific operations in a multi-file workspace. | ||
+ | * Tags are assigned using the Assign_Tags_To_Files command and must be added before using '/ | ||
+ | * Use '/ | ||
+ | * To select files by exclusion (e.g. " | ||
+ | |||
+ | ---- | ||
[[Visual3D: | [[Visual3D: |
visual3d/documentation/pipeline/file_commands/select_active_file.1721229785.txt.gz · Last modified: 2024/07/17 15:23 by sgranger