====== Normal Databases in Sift ====== ===== Building NDs ===== Sift's Normal Database (ND) feature allows you to generate a reference dataset using your library of CMZ workspaces. If you are looking to generate a ND and have yet to develop CMZ workspaces with your data, see [[Sift:Build_CMZ:Building_CMZs|Building CMZs in Sift]]. The build ND feature in Sift offers flexible and customizable definitions, providing an array of summary statistics measures and summary levels for your data. To see a description of all summary statistics, see [[Sift:build_nds:ND_Summary_Statistics|here]]. Sift pulls data from the [[Sift:application:Load_Library_Dialog|loaded library]] and the [[Sift:application:Query_Builder_Dialog|Query Definitions]] to compute summary statistics and store summary results in a single reference CMZ workspace. This ND workspace can be loaded back in Sift, queried, and used throughout the entire application. **Here we will review the process of building a Normal Database in Sift.** \\ \\ {{ sift:build_nds:sift_buildnd_loadlib.png?500}}\\ 1. To begin, load a reference database of CMZ workspaces into Sift. Instructions can be found [[Sift:application:Load_Page|here]].\\ \\ \\ \\ \\ {{ sift:build_nds:sift_buildnd_regularqrys.png?250}}\\ 2. Define or load in query definitions for the signals and metrics you wish to summarize in your ND. Instructions can be found [[Sift:application:Query_Builder_Dialog|here]].\\ \\ \\ \\ 3. Once your queries are loaded and appear on the groups widget, find the BuildND botton on the [[Sift:application:Explore_Page|Explore Page]].\\ {{ sift:build_nds:sift_buildNDButton.png?300}}\\ \\ \\ \\ ==== Build ND Dialog ==== {{ sift:build_nds:sift_buildNDDlg.png?500}}\\ The Build ND Dialog has 3 main sections: **Query Groups**,**Meta Data & Summary Statistics**, and **Summary Level**.\\ The file path of the ND directs Sift to save the resulting ND CMZ file to a path of the users choice.\\ The "Use Excluded Data" checkbox allows users to include any data that was previously excluded by Sift in the ND summary results.\\ The generate button tells Sift to generate the ND after the user has defined the contents they wish to include.\\ ===Query Groups=== The Query Groups widget of this dialog will be automatically populated with the queries that you have already defined and loaded into Sift. To interact with this section of the dialog, simply select which groups you wish to derive summary signals from for your ND. In this example, I have selected an Ankle Angle signal group, and a metric group for my ND.\\ === Meta Data & Summary Statistics === The Meta Data & Summary Statistics widget of this dialog is populated with all of the available statistics that Sift offers. From this list, you can select as many summary results as you wish to be calculated for all selected Query Groups. A full list of available summary statistics can be found [[Sift:build_nds:ND_Summary_Statistics|here]]. === Summary Level === The summary level options allow users to choose how broad or detailed they would like their summaries: *Library summary – a comprehensive overview of an entire project across all participants and motion capture sessions. The summary values are over all traces in all workspaces and all trials in the ND library. *Workspace summary – a more granular summary for each motion capture session; this can also line up with each participant. The summary values are taken over all trials within each workspace, and stored as a summary signal or metric per workspace. *Trial summary – a detailed summaries of individual trials performed by each of your participants. The summary values are taken over all traces within each trial, and stored as a summary signal or metric per trail in each workspace. 4. Once you have defined your ND in the Build ND Dialog, select **Generate** to build the ND. ===== Loading NDs ===== {{ sift:build_nds:sift_loadnd.png?500}} Sift will automatically load the ND into your current workspace after you have just built it, but **here we will review how to load a ND file into Sift**. 1. On the [[Sift:application:Load_Page|Load Page]], select "Load ND" button on or find the icon on the toolbar.\\ {{ :sift:build_nds:sift_loadnddlg.png?500}} 2. Navigate to where you saved the ND generated from Sift, and select the specific .cmz file to open.\\ {{ sift:build_nds:sift_ndloaded.png?600}}\\ Once a ND workspace is loaded into Sift, a summary of the ND will appear on the [[Sift:application:Explore_Page|Explore_Page]].\\ This summary will provide detailed documentation of everything that is stored in the ND file. On the left hand side, a list of all workspaces (CMZ files) where the ND signals were pulled from, including individual trial C3D files for each workspace. \\ On the right hand side, Sift will display each summary signal, which are the signals and metrics that the user has chosen to summarize based on previous queries.\\ Sift will also display the summary stats that were calculated and stored for each summary signal.\\ And finally, Sift will display the summary levels stored in the ND, which describe at what levels of the data were summary measures calculated.\\ {{ sift:build_nds:sift_qryndbuttons.png?400}}\\ ===== Using ND Signals ===== **To query and view your ND signals in Sift**:\\ 1. Navigate to the [[Sift:application:Explore_Page|Explore_Page]] and select the Query ND button or icon on the [[Sift:application:toolbar|Toolbar]]. 2. The Query ND Dialog will appear, from here you can select specific ND signals to query into Sift that can be used just like regular queries throughout the application. \\ \\ ==== Query ND Dialog ==== {{ sift:build_nds:sift_qrynddlg.png?600}} The Query ND Dialog works similarly to the [[Sift:application:Query_Builder_Dialog|Query Builder Dialog]], however has less required fields. Because the ND signals are summaries of signals from previously defined query groups, they are already normalized and refined. In the Query ND Dialog, the user populates the fields on the right-hand side by typing a query name, selecting the ND Signal to query, the level of summary to include in the query, and the summary statistic of that signal that they want to query. The options that appear to the user in each of these fields are populated from the ND workspace itself. Sift will know exactly what signals, statistics, and summary levels are included and available to query. When you are happy with the query definition, you can **Add Query** to the list on the left-hand side. To remove a query, highlight the query on the **ND Query List**, and select **Remove Query**. To query the ND signals and create ND groups, select **Query ND Signals** on the bottom right-hand side. Query definitions for the ND queries can be saved and loaded with the top two dialog buttons. // // ND Queries will appear in the groups and workspace widgets on the [[Sift:application:Explore_Page|Explore Page]]. ND Signals can be plotted, used for analysis in the [[Sift:application:analyse_page|Analyse Page]], and exported. An example plot compare a ND signal, the mean ankle angle at the Library summary level (Pink), to individual workspace means from independent subjects (green) is shown below.\\ {{ sift:build_nds:Sift_NDPlot.png }}