User Tools

Site Tools


sift:tutorials:using_directory_watchers_in_the_gui

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
sift:tutorials:using_directory_watchers_in_the_gui [2026/07/17 13:39] – [Editing an Existing Watcher] wikisysopsift:tutorials:using_directory_watchers_in_the_gui [2026/07/17 19:52] (current) – [Launching the Background Instance] wikisysop
Line 8: Line 8:
  
   - Visual3D to calculate the right and left ankle joint angles   - Visual3D to calculate the right and left ankle joint angles
-  - right heel strike to right heel strike for right stride cycles +  - Right heel strike to right heel strike for right stride cycles 
-  - left heel strike to left heel strike for left stride cycles+  - Left heel strike to left heel strike for left stride cycles
   - Sift PCA to summarize the major differences in curve shape   - Sift PCA to summarize the major differences in curve shape
-  - group-level Local Outlier Factor (LOF) to flag ankle cycles that are different from the other cycles on the same side+  - Group-level Local Outlier Factor (LOF) to flag ankle cycles that are different from the other cycles on the same side
  
 To begin, download and unzip this folder {{ :sift:tutorials:directory_watcher_tutorial.zip |'Directory_Watcher_Tutorial.'}}  The C3D file remains outside the watched **Data** directory until you are ready to start the workflow. To begin, download and unzip this folder {{ :sift:tutorials:directory_watcher_tutorial.zip |'Directory_Watcher_Tutorial.'}}  The C3D file remains outside the watched **Data** directory until you are ready to start the workflow.
Line 23: Line 23:
 The script performs four steps: The script performs four steps:
  
-  - opens the treadmill-running C3D +  - Opens the treadmill-running C3D  
-  - calculates right and left ankle joint angles +  - Calculates right and left ankle joint angles 
-  - creates the heel-strike events used to define stride cycles +  - Creates the heel-strike events used to define stride cycles 
-  - saves a CMZ into the ''CMZs'' folder+  - Saves a CMZ into the ''CMZs'' folder 
  
 For a lower-body model, an ankle joint angle is calculated using the foot as the segment and the shank as the reference segment. The X component represents flexion and extension for the segment coordinate systems used in this example. See [[visual3d:tutorials:kinematics_and_kinetics:model_based_computations|Model Based Computations]] for more information about joint-angle definitions. For a lower-body model, an ankle joint angle is calculated using the foot as the segment and the shank as the reference segment. The X component represents flexion and extension for the segment coordinate systems used in this example. See [[visual3d:tutorials:kinematics_and_kinetics:model_based_computations|Model Based Computations]] for more information about joint-angle definitions.
  
-Before running, replace every occurrence of ''[[REPLACE]]'' with the full path to the unzipped ''Directory_Watcher_Tutorial'' folder.+Before running, replace every occurrence of **REPLACE** with the full path to the unzipped ''Directory_Watcher_Tutorial'' folder.
  
 For example: For example:
Line 38: Line 39:
 </code> </code>
  
-Only the ''File_Open'' and ''File_Save_As'' commands require this path.+Only the ''File_Open'' and ''File_Save_As'' commands require this path update.
  
 <code> <code>
Line 208: Line 209:
 ==== Sift Batch Script ==== ==== Sift Batch Script ====
  
-The batch script does not need to be updated, the script gets a reference to its location itself (the %~dp0 you see in the script). +The BATCH script does not need to be updated, the script gets a reference to its location itself (the %~dp0 you see in the script). 
  
 There are a couple things to note about the script, the first line is ::SIFT, a .bat file will only be executed if this line is present, this prevents a unintended script from being executed by accident, you will also notice that the entire sift command is on one line. This is because they all need to be passed at once via a command line call and new line characters will execute everything preceding it and treat everything remaining as a brand new command to make this easier to manage you can enable wordwrap on your text editor of choice. There are a couple things to note about the script, the first line is ::SIFT, a .bat file will only be executed if this line is present, this prevents a unintended script from being executed by accident, you will also notice that the entire sift command is on one line. This is because they all need to be passed at once via a command line call and new line characters will execute everything preceding it and treat everything remaining as a brand new command to make this easier to manage you can enable wordwrap on your text editor of choice.
Line 219: Line 220:
 The script performs the following: The script performs the following:
  
-  - loads the CMZ library +  - Loads the CMZ library 
-  - loads and calculates the ankle-angle queries +  - Loads and calculates the ankle-angle queries 
-  - selects both ankle signal groups +  - Selects both ankle signal groups 
-  - creates a PCA named ''AnkleStridePCA'' +  - Creates a PCA named ''AnkleStridePCA'' 
-  - runs LOF separately within each signal group +  - Runs LOF separately within each signal group 
-  - automatically excludes the cycles identified as outliers +  - Automatically excludes the cycles identified as outliers 
-  - exports the LOF values and threshold +  - Exports the LOF values and threshold 
-  - saves the completed Sift project+  - Saves the completed Sift project
  
 ===== Opening the Directory Watchers Dialog ===== ===== Opening the Directory Watchers Dialog =====
Line 245: Line 246:
 </code> </code>
  
-{{.:pasted:20260717-133305.png}}+{{.:pasted:20260717-192613.png}}
  
 When prompted to add the directory, browse to ''Directory_WatcherTutorial\Data'' and select the folder. When prompted for the script, browse to ''Directory_WatcherTutorial\V3D_Pipeline.v3s'' and select the pipeline.  When prompted to add the directory, browse to ''Directory_WatcherTutorial\Data'' and select the folder. When prompted for the script, browse to ''Directory_WatcherTutorial\V3D_Pipeline.v3s'' and select the pipeline. 
Line 261: Line 262:
 The first watcher should look like this. The first watcher should look like this.
    
-{{.:pasted:20260717-133353.png}}+{{.:pasted:20260717-192652.png}}
  
 When the C3D is copied into **Data**, the watcher will launch the Visual3D pipeline.  When the C3D is copied into **Data**, the watcher will launch the Visual3D pipeline. 
Line 285: Line 286:
 | Delay | 1000 ms | | Delay | 1000 ms |
  
-{{.:pasted:20260717-133504.png}}+{{.:pasted:20260717-192738.png}}
  
 The completed watcher should monitor ''CMZs'' and contain the Sift batch script. The completed watcher should monitor ''CMZs'' and contain the Sift batch script.
Line 299: Line 300:
 In the ''Tray Options'' section, select ''Launch background instance of Sift in the system tray'' and check ''Launch minimized to system tray''. This will ensure Sift starts in the tray by default.  In the ''Tray Options'' section, select ''Launch background instance of Sift in the system tray'' and check ''Launch minimized to system tray''. This will ensure Sift starts in the tray by default. 
  
-{{.:pasted:20260717-133634.png}}+{{.:pasted:20260717-192904.png}}
  
 A Sift icon should appear in the Windows system tray. A Sift icon should appear in the Windows system tray.
  
-The background instance must continue running while the directory watchers are in use. +The background instance **MUST** continue running while the directory watchers are in use, or else they will not work
  
-Before continuing, close the normal Sift window if it is still open. The Sift batch script needs to launch its own processing instance, and only one normal Sift instance should be open at a time. 
  
 ==== Using the Watchers ==== ==== Using the Watchers ====
Line 353: Line 353:
 {{.:pasted:20260716-150531.png}} {{.:pasted:20260716-150531.png}}
  
-On the **Analyze** page, look at the workspace scores and LOF results. +On the **Analyse** page, look at the workspace scores and LOF results. 
  
 ==== Editing an Existing Watcher ==== ==== Editing an Existing Watcher ====
Line 361: Line 361:
 You can: You can:
  
-  - change its name +  - Change its name 
-  - activate or deactivate it +  - Activate or deactivate it 
-  - enable or disable recursive directory monitoring +  - Enable or disable recursive directory monitoring 
-  - enable or disable delete events +  - Enable or disable delete events 
-  - change the delay +  - Change the delay 
-  - add or remove directories +  - Add or remove directories 
-  - add or remove scripts+  - Add or remove scripts
  
 Any changes made to the selected watcher are used the next time a relevant directory event occurs. Any changes made to the selected watcher are used the next time a relevant directory event occurs.
  
-===== Removing a Watcher =====+==== Removing a Watcher ====
  
 Select the watcher and use ''Delete'' to remove it permanently. Select the watcher and use ''Delete'' to remove it permanently.
Line 383: Line 383:
 In this example, adding one C3D to the ''Data'' folder automatically: In this example, adding one C3D to the ''Data'' folder automatically:
  
-  - calculated ankle joint angles in Visual3D +  - Calculated ankle joint angles in Visual3D 
-  - divided the signals into right and left stride cycles +  - Divided the signals into right and left stride cycles 
-  - ran PCA in Sift +  - Ran PCA in Sift 
-  - looked into each side for different ankle cycles using LOF +  - Looked into each side for different ankle cycles using LOF 
-  - exported the outlier results +  - Exported the outlier results 
-  - saved a Sift project+  - Saved a Sift project
  
 The same approach can be used to automate other workflows. The same approach can be used to automate other workflows.
  
sift/tutorials/using_directory_watchers_in_the_gui.1784295549.txt.gz · Last modified: by wikisysop