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:42] – removed sgranger | visual3d:documentation:pipeline:file_commands:select_active_file [2025/07/22 15:05] (current) – wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Select Active File ====== | ||
+ | |||
+ | ===== 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 operate only on the currently active file(s). If multiple files are open or batch processing is used, this command gives you precise control over which trial a command affects. | ||
+ | |||
+ | 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) | ||
+ | |||
+ | |||
+ | ==== Understanding the File Selection Methods ==== | ||
+ | |||
+ | **/ | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | **/ | ||
+ | * If you have tagged trials like " | ||
+ | * '/ | ||
+ | * '/ | ||
+ | |||
+ | |Symbol|Meaning (Syntax)|Example| | ||
+ | |**+**|OR|' | ||
+ | |**|**|OR (Alternative)|' | ||
+ | |**& | ||
+ | |**NOT**|Negation|' | ||
+ | |||
+ | **'/ | ||
+ | |||
+ | ===== Pipeline Command ===== | ||
+ | |||
+ | The command below is as seen on the Visual3D application, | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | ! /FILE_NAME= | ||
+ | ! /QUERY= | ||
+ | ! / | ||
+ | </ | ||
+ | |||
+ | ===== Command Parameters ===== | ||
+ | |||
+ | The following table shows the command parameters and descriptions. | ||
+ | |||
+ | |**Parameter**|**Description**| | ||
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
+ | |||
+ | ===== Dialog ===== | ||
+ | |||
+ | 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: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | This command is primarily used in pipeline scripts and batch processing workflows to automate file selection. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | The following examples will go through the use of the Select_Active_File command in the Visual3D application. | ||
+ | |||
+ | === Example 1: Select the Global Workspace === | ||
+ | |||
+ | 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. | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | / | ||
+ | ! /QUERY= | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | === Example 2: Select trials based on tags (OR condition) === | ||
+ | |||
+ | Say that you've tagged trials using WALK and RUN and you want to activate all trials that are either walking OR running: | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | / | ||
+ | /QUERY=WALK + RUN | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | Or equivalently: | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | / | ||
+ | /QUERY=WALK | RUN | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | === Example 3: Select trials with one tag AND NOT another === | ||
+ | Suppose you want to select all running trials that are not tagged as " | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | / | ||
+ | /QUERY=RUN & NOT(FATIGUE) | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | === Example 4: Select trials based on subject-level tags === | ||
+ | |||
+ | Assuming you've tagged subjects as ' | ||
+ | |||
+ | < | ||
+ | Select_Active_File | ||
+ | / | ||
+ | ! /QUERY= | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Example 5: Exclude specific filename patterns using tagging === | ||
+ | |||
+ | If you want to exclude trials with " | ||
+ | |||
+ | < | ||
+ | ! Tag only the files NOT containing " | ||
+ | ! Assign tag RUN to files with " | ||
+ | Assign_Tags_To_Files | ||
+ | / | ||
+ | ! /QUERY= | ||
+ | /TAGS=RUN | ||
+ | ; | ||
+ | |||
+ | ! Assign tag NOT_RUN to files that are not tagged RUN | ||
+ | Assign_Tags_To_Files | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Select NOT_RUN as the active files | ||
+ | Select_Active_File | ||
+ | / | ||
+ | ! /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/documentation/pipeline/file_commands/select_active_file.1721230944.txt.gz · Last modified: 2024/07/17 15:42 by sgranger