= Tutorial: Process functional NIRS data = ||<40%> || ~+'''This tutorial is under construction'''+~ || ''Authors: Thomas Vincent, Zhengchen Cai'' Prerequisite: * [[http://neuroimage.usc.edu/brainstorm/Tutorials/NIRSDataImport|Import and visualize functional NIRS data]] == Presentation of the experiment == * Finger tapping task: 10 stimulation blocks of 30 seconds each, with rest periods of ~30 seconds * One subject, one NIRS acquisition run of 12''' '''minutes at 10Hz * 4 sources and 12 detectors (+ 4 proximity channels) placed above the right motor region * Two wavelengths: 690nm and 830nm * MRI anatomy 3T from /!\ ''' scanner type ''' == Extract stimulation events == During the experiment, the stimulation paradigm were run under matlab and sent triggers through the parallel port to the acquistion device. These stimulation events are then stored as a box signal in channel AUX2: values above a certain threshold indicate a stimulation block. To transform this signal into Brainstorm events, drag and drop the NIRS data "S01_Block_FO_LH_Run01" in the Brainstorm process window. Click on "Run" and select Process "Events -> Detect events above threshold". {{attachment:NIRSTORM_tut2_detect_events.gif||height="475"}} Use the following parameters: * set "Event name" to "MOTOR" * select "Channel name": "AUX2" * set "Maximum threshold" to 3 * Check "Use absolute value of signal" Then run the process. To view the results, right-click on "Link to raw file" under "S01_Block_FO_LH_Run01" then "NIRS -> Display time series". {{attachment:NIRSTORM_tut2_nirs_time_series_motor_events.gif||height="350"}} The "MOTOR" event group has been created, by 10 events, each lasting 30 sec. Events are shown in green on the top of the plot. {{attachment:NIRSTORM_tut2_list_motor_events.gif||height="200"}} == Bad channel tagging == NIRS measurement are heterogeneous (long distance measurements, movements, occlusion by hair) and the signal in several channels might not be analyzable. A first pre-processing step hence consists in removing those channels. The following criterions may be applied to reject channels: * some values are negative * signal is flat (variance close to 0) * signal has too many flat segments Drag and drop the NIRS data "S01_Block_FO_LH_Run01" in the Brainstorm process window. Click on "Run" and select Process "NIRSTORM -> Tag bad channels". {{attachment:NIRSTORM_tut2_nirs_remove_bad_channels.gif||height="350"}} * Remove negative channels: tag a channel as bad if it has a least one negative value. This is important for the quantification of delta [Hb] which cannot be applied if there are negative values. * Maximum proportion of saturating point: a saturating point has a value equals to the maximum of the signal. The default is at 1: remove only flat signals. If one wants to also keep flat channels, set the value to at least 1.01.