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/06/17 18:19] – created 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. | ||
- | Many of the pipeline commands in Visual3D act on the active files only. Using this command the user can determine what files are active and therefore will be processed. | + | You can select |
+ | - 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) | ||
- | [[Tutorial4_5.jpg]] | + | |
+ | ==== Understanding the File Selection Methods ==== | ||
+ | |||
+ | **/ | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | **/ | ||
+ | * If you have tagged trials like " | ||
+ | * '/ | ||
+ | * '/ | ||
+ | |||
+ | |Symbol|Meaning (Syntax)|Example| | ||
+ | |**+**|OR|' | ||
+ | |**|**|OR (Alternative)|' | ||
+ | |**& | ||
+ | |**NOT**|Negation|' | ||
+ | |||
+ | **'/ | ||
===== Pipeline Command ===== | ===== Pipeline Command ===== | ||
- | The pipeline | + | The command below is as seen on the Visual3D |
< | < | ||
Line 14: | Line 38: | ||
! /QUERY= | ! /QUERY= | ||
! / | ! / | ||
- | ; | ||
</ | </ | ||
- | ==== File_Name | + | ===== Command Parameters ===== |
- | The parameter **/ | + | The following table shows the command parameters and descriptions. |
- | **Note:** Visual3D defines | + | |**Parameter**|**Description**| |
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
- | < | + | ===== Dialog ===== |
- | Select_Active_File | + | |
- | /FILE_NAME= file1.c3d | + | |
- | ; | + | |
- | </ | + | |
- | To fix the example above, you define | + | There is no dedicated dialog box for this command. The GUI equivalent is manually selecting |
- | < | + | {{:visual3d: |
- | Select_Active_File | + | |
- | /FILE_NAME= c:\data\session1\file1.c3d | + | |
- | ; | + | |
- | </ | + | |
- | or you can use a wildcard: | + | This command is primarily used in pipeline scripts and batch processing workflows to automate file selection. |
- | < | + | ===== Examples ===== |
- | Select_Active_File | + | |
- | /FILE_NAME= *file1.c3d | + | |
- | ; | + | |
- | </ | + | |
- | or you can specify a TAG: | + | 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 | Select_Active_File | ||
- | / | + | /FILE_NAME=GLOBAL |
+ | ! /QUERY= | ||
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ==== Query ==== | + | === Example 2: Select trials based on tags (OR condition) |
- | The Query option (**Visual3D Professional Only**) allows | + | Say that you've tagged trials |
- | + | ||
- | / | + | |
- | + | ||
- | ==== Subject_Tags ==== | + | |
- | + | ||
- | Set the active subject tag - FOR MULTISUBJECT ONLY! | + | |
- | + | ||
- | ===== Example 1: Global_Workspace ===== | + | |
- | + | ||
- | This example shows how to make the [[Visual3D: | + | |
< | < | ||
Select_Active_File | Select_Active_File | ||
- | /FILE_NAME=GLOBAL | + | /FILE_NAME=ALL_FILES |
- | ! /QUERY= | + | /QUERY=WALK + RUN |
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ===== Example 2 - ALL_FILES and OR Query ===== | + | Or equivalently: |
- | + | ||
- | From ALL_FILES select files that are tagged TAG1 or TAG2. Note there are multiple syntaxes for the " | + | |
- | + | ||
- | Using the " | + | |
< | < | ||
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= | ||
- | ; | ||
</ | </ | ||
- | [[Visual3D: | + | ===== 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.1718648381.txt.gz · Last modified: 2024/06/17 18:19 by sgranger