-
Notifications
You must be signed in to change notification settings - Fork 55
Working With Datasets using DataTree Library
The core piece of Homer3 is the DataTree library which implements the data tree storing the group data and the processing stream used to process it. By process we mean to generate the group, subject, session and run HRFs using the configured processing stream.
DataTree is used by the Homer3 graphical user interfaces to process and display their data but it can be used standalone as an independent application. Instead of a grpahical user interface you would use commands in the Matlab Command Window to do the same processing and display it. DataTree has command line functions built into it that can be used for these purposes.
Download DataTree library at DataTree
(NOTE: We link to the development branch for now until the next release which is coming soon ...)
cd DataTree root folder setpaths
Here are a few simple but complete examples:
Take the following 3 subject dataset.
Change current folder to root data set folder:
cd C:/Users/Public/subjects/test/Example4_twNI
Load dataset into data tree:
dataTree = DataTreeClass();
Plot raw data for current element, for 1st wavelength of 3 source/detector pairs , [2,3], [3,5] and [4,6].
NOTE: current element in the data tree by default is the first run of the first session of the first subject in a group. In this case it would be neuro_run01.snirf which has the group/subject/session/run ID = [1,1,1,1]. (It can be changed to point to any element in the data tree with the DataTreeClass.SetCurrElem() function):
obj = dataTree.currElem; obj.Load(); sdPairsSelect = [2,3,0,1; 3,5,0,1; 4,6,0,1]; h = obj.Plot('raw', sdPairsSelect);
Now run processing stream for current element and plot oncentration HRF for HbR of condition 1, for 3 channels with source/detector pairs, [2,3], [3,5] and [4,6]:
sdPairsSelect = [2,3,1,2; 3,5,1,2; 4,6,1,2]; h = obj.Plot('conc hrf', sdPairsSelect); obj.Calc();
Join the Homer3 community on openfnirs.org!
- Homer3 Overview
- Download and Installation
- Homer3 Graphical User Interfaces
- Input and Output Definitions
- Processing Data
- Viewing Processed Data via GUI
- Exporting Processed Data into a Text File
- Exporting Processed Data into MATLAB WorkSpace
- Working with Datasets using DataTree Library
- Working with SNIRF files standalone
- Custom User Functions