introduction to the nirs analyzir...

8
5/18/18 1 Introduction to the NIRS AnalyzIR toolbox Theodore Huppert PhD Associate Professor Dept of Radiology University of Pittsburgh 2 Background Started in 2014 by Jeff Barker, PhD (BioE grad student) Currently 2,018 unique downloads Average 37dn/day

Upload: others

Post on 20-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

1

11

Introduction to theNIRS AnalyzIR toolbox

Theodore Huppert PhDAssociate ProfessorDept of Radiology

University of Pittsburgh

2

Background

Started in 2014 by Jeff Barker, PhD (BioE grad student)Currently 2,018 unique downloadsAverage 37dn/day

Page 2: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

2

Huppert Lab: +NIRS-toolbox

www.bitbucket.org/huppertt/nirs-toolbox

Software Specs• Matlab based

• 2014b or newer• Statistics and signal processing

toolboxes• Open-source• Command-line based (few GUIs

added)• Mercurial (“CVS”) control• Wiki manual (in progress)• Issue reporting • Demo code and data

4

www.bitbucket.org/huppertt/nirs-toolbox

Software Specs• Matlab based

• 2014b or newer• Statistics and signal processing

toolboxes• Open-source• Command-line based (few GUIs

added)• Mercurial (“CVS”) control• Wiki manual (in progress)• Issue reporting • Demo code and data

Page 3: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

3

5

www.bitbucket.org/huppertt/nirs-toolbox

Software Specs• Matlab based

• 2014b or newer• Statistics and signal processing

toolboxes• Open-source• Command-line based (few GUIs

added)• Mercurial (“CVS”) control• Wiki manual (in progress)• Issue reporting • Demo code and data

6

Updating the toolboxvia TortoiseHG GUI

https://tortoisehg.bitbucket.io

1) Install Windows or MacOS version

2) From GUI, “Clone” new repository3) set source to

http://bitbucket.org/huppertt/nirs-toolbox

Page 4: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

4

7

Updating the toolboxvia TortoiseHG GUI

https://tortoisehg.bitbucket.io

1) Install Windows or MacOS version

2) From GUI, “Clone” new repository3) set source to

http://bitbucket.org/huppertt/nirs-toolbox

8

Updating the toolboxvia TortoiseHG GUI

https://tortoisehg.bitbucket.io

Two-stage update system

Public Web Version

Local Change History

Working Version

PullPush

UpdateCommit

Pull

Update

Page 5: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

5

9

Updating the toolboxvia TortoiseHG GUI

https://tortoisehg.bitbucket.io

Two-stage update system

Public Web Version

Local Change History

Working Version

PullPush

UpdateCommit

10

Updating the toolboxvia Command Line (MacOS/Linux)

https://www.mercurial-scm.org/

Two-stage update system

Public Web Version

Local Change History

Working Version

PullPush

UpdateCommit

Page 6: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

6

11

Adding to Matlab Path

Note folders that start with “+” (e.g. /+nirs) denote Matlab namespaces and cannot be added directly to the path. You must add the parent folder containing this namespace.

1) Add folder<root>/nirs-toolbox

2) Add with Subfolders<root>/nirs-toolbox/external<root>/nirs-toolbox/demos

12

+nirs/NIRS analysis toolbox

+eeg/EEG & MEG analysis toolbox

+dtseries/Dense time series (CIFTI) formatted data(e.g. MRI [surface based] or MEEG/NIRSimage reconstructed data

+advanced/repository for work in progress, depreciatedcode, and features for non-general use.<< use with caution >>

demos/Example code for NIRS processing

externalDependencies, and redistributed 3rd party code and GUIs called by toolboxes. This code is not intended to be calleddirectly

Page 7: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

7

13

http://www.dartmouth.edu/~nir/nirfast/

http://mcx.space/

http://iso2mesh.sourceforge.net/

http://bispl.weebly.com/nirs-spm.html#/

• Matlab NamespacesDefines context specific functionsCalled in form “nirs.io.loadDirectory” ( +nirs/+io/loadDirectory.m) Overwritten methods (e.g. nirs.core.Data and eeg.core.Data)

• Matlab Class Definitionscustom classes (e.g. nirs.core.Data)contain common methods (“draw”, “table”, etc) that act on the local object.

• Abstract classesparent object classes defining inheritance to childrennot intended to be called directly

• Dependent variables“read-only” object fields that are computed on demand.E.g. Stats.p which depends on the beta, (noise covariance) and DFE fields

14

Page 8: Introduction to the NIRS AnalyzIR toolboxhuppertlab.net/wp-content/uploads/2018/05/1.1_Intro_Toolbox.pdf · 5/1/2018  · • Matlab based • 2014b or newer • Statistics and signal

5/18/18

8

• nirs.core.Datamain class for holding time-series data (also eeg.core.Data, dtseries.core.Data and

nirs.core.GenericData).Encodes data, stimulus information, demographics, and probe>> raw.draw(<channels>) plots the data

• nirs.core.Probeholds probe geometry, data labels (“link” table) and registration information

(including head model)>> probe.draw() plots the probe>> probe.defaultdrawfcn = “10-20” sets the behavior (for registered probes)

• nirs.core.ChannelStatsholds first and second-level statistical models>> stats.draw(‘tstat’,[-5 5],’q<0.05’) draws the statistical map>> stats.ttest(‘A-B’) does a t-test of two conditions

15

• Dictionary

similar to use in Python

holds variables based on keys

MyDictionary(‘age’) = ?

• nirs.design.StimulusEvents

holds discrete task events

onset - onset time of events in seconds

duration - duration of each event

amp - amplitude of each event (used in parametric models)

metadata - unused at moment (to encode reaction time etc)

• nirs.design.StimulusVector

holds continuous task events (e.g. short-separation src-set data)

amp - the regressor time-series data

time - the sample times of data (interpt’d to match nirs data)

16