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/19 12:50] – sgranger | visual3d:documentation:pipeline:file_commands:select_active_file [2025/07/22 15:05] (current) – wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{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. | + | ====== Select Active File ====== |
- | tutorial4_5.jpg | + | ===== 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. | ||
- | ===== pipeline command ===== | + | 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) | ||
- | the pipeline command below is used to select the [[visual3d: | ||
- | < | + | ==== Understanding the File Selection Methods ==== |
- | select_active_file | + | |
- | ! /file_name= | + | |
- | ! /query= | + | |
- | ! / | + | |
- | ; | + | |
- | </ | + | |
- | ==== file_name ==== | + | **/ |
+ | * " | ||
+ | * " | ||
- | the parameter | + | **/QUERY=**: Lets you use logic expressions to select based on file-level tags |
+ | * If you have tagged trials like " | ||
+ | * '/ | ||
+ | * '/ | ||
- | **note:** visual3d defines files by their full pathname. for example, the following command will not be recognized | + | |Symbol|Meaning (Syntax)|Example| |
+ | |**+**|OR|' | ||
+ | |**|**|OR (Alternative)|' | ||
+ | |**& | ||
+ | |**NOT**|Negation|' | ||
- | < | + | **'/SUBJECT_TAGS='**- similar to /QUERY, but works at the subject level. Use this if you've applied subject-wide tags like ' |
- | select_active_file | + | |
- | /file_name= file1.c3d | + | ===== Pipeline Command ===== |
- | ; | + | |
- | </ | + | |
- | 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 |
- | /file_name= c: | + | ! /FILE_NAME= |
- | ; | + | ! /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: | + | {{:visual3d: |
- | / | + | 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 | + | === Example |
- | 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. |
< | < | ||
- | select_active_file | + | Select_Active_File |
- | /file_name=global | + | /FILE_NAME=GLOBAL |
- | ! /query= | + | ! /QUERY= |
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ===== example | + | === Example |
- | 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 |
- | /file_name=all_files | + | /FILE_NAME=ALL_FILES |
- | /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 |
- | /file_name=all_files | + | /FILE_NAME=ALL_FILES |
- | /query=tag1 | tag2 | + | /QUERY=RUN & NOT(FATIGUE) |
+ | ! / | ||
; | ; | ||
</ | </ | ||
- | ===== example 3 - all_files and and not query ===== | + | === Example 4: Select trials based on subject-level tags === |
- | 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 |
- | /file_name=all_files | + | /FILE_NAME=ALL_FILES |
- | /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 " |
< | < | ||
- | ! assign tag run to files with " | + | ! Tag only the files NOT containing "run" |
- | assign_tags_to_files | + | ! Assign tag RUN to files with " |
- | /motion_file_names=*run*.c3d | + | Assign_Tags_To_Files |
- | ! /query= | + | /MOTION_FILE_NAMES=*run*.c3d |
- | /tags=run | + | ! /QUERY= |
+ | /TAGS=RUN | ||
; | ; | ||
- | ! assign | + | ! Assign |
- | assign_tags_to_files | + | Assign_Tags_To_Files |
- | /motion_file_names=all_files | + | /MOTION_FILE_NAMES=ALL_FILES |
- | /query=not(run) | + | /QUERY=NOT(RUN) |
- | /tags=not_run | + | /TAGS=NOT_RUN |
; | ; | ||
- | ! select not_run | + | ! Select NOT_RUN |
- | select_active_file | + | Select_Active_File |
- | /file_name=not_run | + | /FILE_NAME=NOT_RUN |
- | ! /query= | + | ! /QUERY= |
- | ; | + | |
</ | </ | ||
- | [[visual3d:documentation:pipeline:general_information:pipeline_commands_reference|back to pipeline commands reference]] | + | ===== 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:Documentation:Pipeline:General_Information:Pipeline_Commands_Reference|Back to Pipeline Commands Reference]] | ||
- | }} |
visual3d/documentation/pipeline/file_commands/select_active_file.1718801438.txt.gz · Last modified: 2024/06/19 12:50 by sgranger