User Tools

Site Tools


sift:tutorials:openbiomechanics_project:refine_queries_with_metadata

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:openbiomechanics_project:refine_queries_with_metadata [2024/07/16 19:24] – created sgrangersift:tutorials:openbiomechanics_project:refine_queries_with_metadata [2024/11/29 18:43] (current) sgranger
Line 1: Line 1:
-====== Refine_Queries_with_Metadata ======+====== Refine Queries with Metadata ======
  
-Through the OpenBiomechanics Project, Driveline Baseball has made elite-level motion capture data publicly available. The data can be downloaded from Driveline's GitHub repository.+Through the OpenBiomechanics Project, Driveline Baseball has made elite-level motion capture data publicly available. The data can be downloaded from [[https://github.com/drivelineresearch/openbiomechanics|Driveline's GitHub repository]].
  
-Having access to large datasets is a great asset, but processing these large datasets can take time (and patience). Sift is designed to streamline this process. The steps in this tutorial describe how to create CMZ files from the pitching and batting data sets, and then inspect and group the data in Sift.+Having access to large datasets is a great asset, but processing these large datasets can take time (and patience). Sift is designed to streamline this process. The steps in this tutorial describe how to create [[visual3d:documentation:definitions:file_formats:cmz_format|CMZ]] files from the raw [[visual3d:documentation:third-party:motion_analysis:c3d_file|C3D]] files from pitching and batting data sets, then inspect and group the data in Sift.
  
 ===== Downloads and Relevant Links ===== ===== Downloads and Relevant Links =====
Line 9: Line 9:
 Begin by downloading the following two zip files. Begin by downloading the following two zip files.
  
-  - [[https://github.com/drivelineresearch/openbiomechanics|OpenBiomechanics Project: Driveline Baseball data]]+  - [[https://github.com/drivelineresearch/openbiomechanics|OpenBiomechanics Project: Driveline Baseball data]] (download the entire biomechanics project with sub folders)
   - [[https://www.has-motion.com/download/Katie/Driveline_CMotionFiles.zip|C-Motion Specific Files]]   - [[https://www.has-motion.com/download/Katie/Driveline_CMotionFiles.zip|C-Motion Specific Files]]
  
Line 23: Line 23:
 ===== Build CMZs for Hitting Data ===== ===== Build CMZs for Hitting Data =====
  
-{{BuildCMZsDlg.png}}+First open a new Sift workspace.\\
  
-In the Build CMZ dialog:+On the [[sift:application:Load_page|Load Page]], select "Load C3Ds"\\ 
 + 
 +In the [[sift:build_cmz:load_c3ds_dialog| Load C3Ds Dialog]] under **Generic Builder**:
  
   - **Set the path to:** C:\...\openbiomechanics-main\baseball_hitting\data\c3d   - **Set the path to:** C:\...\openbiomechanics-main\baseball_hitting\data\c3d
Line 34: Line 36:
     - C:\...\CMotion Files\Events.v3s     - C:\...\CMotion Files\Events.v3s
     - C:\...\openbiomechanics-main\baseball_hitting\code\v3d\CMO.v3s     - C:\...\openbiomechanics-main\baseball_hitting\code\v3d\CMO.v3s
 +{{ sift:tutorials:openbiomechanics_project:hittingdlgrefine.png }}
   - Click **Create CMZs**   - Click **Create CMZs**
   - A metadata dialog box will appear after clicking Create CMZs. Make the following changes in this box:   - A metadata dialog box will appear after clicking Create CMZs. Make the following changes in this box:
Line 41: Line 44:
     - user: Static Trial Identifier     - user: Static Trial Identifier
     - Check "Subject Specific" next to highest_playing_level, hitter_side, bat weight/length, and Click "Apply".     - Check "Subject Specific" next to highest_playing_level, hitter_side, bat weight/length, and Click "Apply".
-  - CMZ files may take a while to build. Check the status bar in the bottom left hand corner of the interface for the build status. After the files are built, check that the Library Path dialog is set correctly and hit "Load" in the Load Library dialog. +  - CMZ files may take a while to build. Check the status bar in the bottom left hand corner of the interface for the build status.  
 +  - After the files are built, check that the Library Path dialog is set correctly and hit "Load" in the **[[:sift:application:Load_Library_Dialog|Load Library]]** dialog. 
 +    - On the [[:sift:application:load_page|Load Page]], you will see all of the workspaces for the hitting data have been created and loaded. 
 +{{ :BuildCMZsDlg.png }}
 ==== Refining Hitting Data ==== ==== Refining Hitting Data ====
  
Line 51: Line 56:
 Let's say we want to query this data set, but we **only** want data from subjects that are under age 20. Let's say we want to query this data set, but we **only** want data from subjects that are under age 20.
  
-We start by loading library with the hitting data set, navigating to the Query Builder dialog, and opening the Auto-Populate dialog. Ensure that "Baseball" is checked. Find the "Refine using signal" checkbox and click "Add". Then you can enter your query refinements.+We start by loading library with the hitting data set, navigating to the [[sift:application:Query_builder_dialog|Query Builder dialog]], and opening the [[sift:application:query_builder_dialog#auto_populate_queries|Auto-Populate dialog]]
  
-{{AutoPopulate.png}}+Under "Combine Sides", select Baseball from the drop down. Here you will see the info box auto-populated by the meta data in the CMZ files.  
 + 
 +Additional refinements, under the "Refinements" tab, find the "Refine using signal" checkbox and click "Add Signal". Then you can enter your query refinements for athletes under age 20: 
 + 
 +{{sift:tutorials:openbiomechanics_project:refinehittingdlg.png}} {{:sift:tutorials:openbiomechanics_project:refineunder20.png}}
  
 When refining queries it can be helpful to have the metadata file open, so that you can see the values it contains. Note that in this case, accessing athlete_age has been set as a global metric, and you will not be able to find the meta folder unless Global Value is checked. When refining queries it can be helpful to have the metadata file open, so that you can see the values it contains. Note that in this case, accessing athlete_age has been set as a global metric, and you will not be able to find the meta folder unless Global Value is checked.
  
 The result of this procedure is that data is queried only if it meets this refinement category, and the refinement name will be applied as a suffix to the end of the signal name. The result of this procedure is that data is queried only if it meets this refinement category, and the refinement name will be applied as a suffix to the end of the signal name.
 +
 +When you hit "Create" on the Auto-Populate Dialog, you will see the queries appear for athletes under 20, and with L and R batting sides combined for each query.
 +{{ :sift:tutorials:openbiomechanics_project:autopophitting.png }}
  
 ===== Build Your Own Metadata File ===== ===== Build Your Own Metadata File =====
Line 67: Line 79:
 In the example below, we can see that there are four headers (static_model, dynamic_file, walking_speed and subject_mass). In the example below, we can see that there are four headers (static_model, dynamic_file, walking_speed and subject_mass).
  
-{{_buildYourOwnMeta.png}}+{{:RefineQueriesWithMeta_-_buildYourOwnMeta.png}}
  
 Here you can edit the description fields and subject specific fields. After you are satisfied with the fields, click "Apply" to build CMZs and load the library. Here you can edit the description fields and subject specific fields. After you are satisfied with the fields, click "Apply" to build CMZs and load the library.
Line 77: Line 89:
 In this instance, we have data where three subjects walk at three different speeds. In this instance, we have data where three subjects walk at three different speeds.
  
-If you navigate from the Query Builder dialog to the Auto-Populate menu, In the **Signals** tab Select **Metric** as the signal type and **meta** as the signal folder. Now switch over to the **Refinements** tab, click {{sift_action_add.png}} **Add Signal**, create three refinements as seen in the picture below, and then hit {{sift_apply.png}} **Create**.+If you navigate from the Query Builder dialog to the Auto-Populate menu, In the **Signals** tab Select **Metric** as the signal type and **meta** as the signal folder. Now switch over to the **Refinements** tab, click {{:sift_action_add.png}} **Add Signal**, create three refinements as seen in the picture below, and then hit {{:sift_apply.png}} **Create**.
  
-{{AutoSignals.png}}+{{:RefineQueriesUsingMeta-AutoSignals.png}}
  
  
-{{AutoRefinements.png}}+{{:RefineQueriesUsingMeta-AutoRefinements.png}}
  
  
Line 91: Line 103:
 Since I want to refine my data by walking speed in this example, I name the refinement "2.0", choose the data under METRIC>meta>walking_speed>X and indicate that the value must be "Equal to" 2.0. I can then save my refinements as an .xml file which can be loaded at any time if I want to re-query my library. Since I want to refine my data by walking speed in this example, I name the refinement "2.0", choose the data under METRIC>meta>walking_speed>X and indicate that the value must be "Equal to" 2.0. I can then save my refinements as an .xml file which can be loaded at any time if I want to re-query my library.
  
-{{QueryBuilderDlg.png}}+{{:RefineQueriesWithMeta-QueryBuilderDlg.png}}
  
 ==== Visualizing Refined Queries ==== ==== Visualizing Refined Queries ====
Line 99: Line 111:
 Insure that **Plot Type** is set to Metric Plot, then check the boxes for **Select All Groups** and **Select All Workspaces**. Insure that **Plot Type** is set to Metric Plot, then check the boxes for **Select All Groups** and **Select All Workspaces**.
  
-{{Plot.png}}+{{:RefineQueriesWithMeta-Plot.png}}
  
  
  
sift/tutorials/openbiomechanics_project/refine_queries_with_metadata.1721157881.txt.gz · Last modified: 2024/07/16 19:24 by sgranger