This repository provides a Python-based preprocessing pipeline for fNIRS signals using the MNE-Python and MNE-NIRS libraries. The goal is to offer a reproducible workflow for preparing fNIRS data for analysis, particularly in the context of speech perception studies.
The data used in this tutorial is a publicly available dataset from the paper. In this study, fNIRS signals were recorded while eight healthy adults perceived three stimuli: auditory-only, visual-only, and a silence condition. The auditory-only stimuli comprised audio recordings with an average duration of 12.5 seconds per trial. The visual-only stimuli involved a person articulating a speech segment without sound, requiring subjects to read the lip movements. Auditory-only and visual-only conditions included 18 trials each. Additionally, 10 trials of silence were randomly presented throughout the experiment to serve as a baseline control condition.
The fNIRS equipment utilized 44 channels at a sampling rate of 3.9 Hz that cover the inferior IFG, left auditory, right auditory, and visual brain regions. The left and right auditory areas were separated into Auditory-A and Auditory-B. Auditory-A captures the rostral aspect and auditory-B caudal aspects of the temporal lobe, more specifically, surrounding the planum temporale, also known as Wernicke's area. The visual region was divided into two subregions: Visual-A and Visual-B. Visual-A covers the cuneus and the superior occipital gyrus, while Visual-B encompasses the middle occipital gyrus. Additionally, 8 short-channel detectors were used in he recordings to be used to remove the influence from local non-cortical changes in blood oxygenation posteriorly.
You can download the dataset using the MNE-NRIS library.
This pipeline replicates the procedures described in the original publication. The steps include:
- Convert raw intensity signals to optical density.
- Scalp Coupling Index (SCI): The scalp coupling index value is calculated and used to identify optodes that were not well connected to the scalp. The scalp coupling threshold value was used to remove channels with a rejection criterion of < 0.8.
- Motion artifact correction: Motion artifact is then removed using Temporal Derivative Distribution Re-pair (TDDR), which is applied to all channels.
- Short-channel regression: Short-separation channel data are then subtracted from the standard long-separation channel signal to remove the influence from local non-cortical changes in blood oxygenation.
- Convert to hemoglobin concentrations: The signal is then transformed to oxy (HbO) and deoxyhemoglobin (HbR) using the modified Beer-Lambert Law.
- Band-pass filtering: Filtering was applied to the signal (0.02-0.4 Hz) to remove slow drifts in the signal and components related to heart rate.
- Signal enhancement: The signal was then enhanced using a correlation-based signal improvement method to reduce head motion noise and improve signal quality.
- Epoch extraction: Epochs corresponding to the onset and 18 s after stimulus onset were extracted.
- Epoch rejection: An epoch rejection criterion is employed to exclude any individual epochs with a peak-to-peak value exceeding 100 μM