API#
This page describes the application programming interface of MNE-NIRS. The functions and classes of this package are described below. The description of each interface includes links to the examples relevant to that code.
This library extends the fNIRS functionality available within MNE-Python. When analysing fNIRS data with these tools you are likely to use functions from both MNE-Python and MNE-NIRS. As such, documentation is provided below for relevant functions and classes from both packages. General neuroimaging functionality provided by MNE-Python such as filtering, epoching, visualisation, etc is not included here and can be found in the MNE-Python API page.
Input/Output#
MNE-Python#
IO module for reading raw data.
|
Reader for a Hitachi fNIRS recording. |
|
Reader for a NIRX fNIRS recording. |
|
Reader for a continuous wave SNIRF data. |
|
Reader for an optical imaging recording. |
MNE-NIRS#
|
Write continuous wave data to disk in SNIRF format. |
|
Read auxiliary data from SNIRF file. |
|
Return the specificity of each channel to a specified brain landmark. |
|
Return the landmarks and specificity a channel is sensitive to. |
Preprocessing#
MNE-Python#
NIRS specific preprocessing functions.
|
Convert NIRS raw data to optical density. |
|
Convert NIRS optical density data to haemoglobin concentration. |
|
Determine the distance between NIRS source and detectors. |
|
Determine which NIRS channels are short. |
|
Calculate scalp coupling index. |
Apply temporal derivative distribution repair to data. |
MNE-NIRS#
Signal Enhancement
Apply negative correlation enhancement algorithm. |
|
|
Systemic correction regression based on nearest short channel. |
Data quality evaluation.
|
Compute peak spectral power metric for each channel and time window. |
|
Compute scalp coupling index for each channel and time window. |
|
Quantify Mayer wave properties using FOOOF analysis. |
Experimental Design#
|
Generate a design matrix based on annotations and model HRF. |
|
Generate boxcar representation of the experimental paradigm. |
Compute longest ISI per annotation. |
|
|
Compute cosine drift regressor high pass cut off. |
Statistics#
First level analysis#
Individual (first) level analysis functions.
|
GLM fit for an MNE structure containing fNIRS data. |
Individual (first) level result classes.
|
Class containing GLM regression results. |
|
Class containing GLM contrast results. |
|
Read GLM results from disk. |
Individual (first) level result class methods. View the class documentation above for a detailed list of methods.
|
Compute contrasts on regression results. |
|
Return a tidy dataframe representing the GLM results. |
Region of interest results as a dataframe. |
|
|
Scatter plot of the GLM results. |
|
Plot 2D topography of GLM data. |
Project GLM results on to the surface of the brain. |
|
|
Scatter plot of the GLM results. |
|
Save GLM results to disk. |
|
Return a tidy dataframe representing the GLM results. |
|
Plot topomap GLM contrast data. |
|
Scatter plot of the GLM results. |
|
Save GLM results to disk. |
Second level analysis#
Group (second) level analysis functions.
|
Convert statsmodels summary to a dataframe. |
Visualisation#
fNIRS specific data visualisation.
|
Plot a 3D sensor montage. |
|
3D visualisation of fNIRS response magnitude. |
GLM result visualisation.
|
Plot topomap of NIRS group level GLM results. |
|
Project GLM results on to the surface of the brain. |
Data quality visualisation.
|
Plot time x channel based quality metrics. |
Simulation#
|
Create simulated fNIRS data. |
Channels#
Functions to help with handling channel information.
|
List all the sources in the fNIRS montage. |
|
List all the detectors in the fNIRS montage. |
|
Drop sources. |
|
Drop detectors. |
|
Pick sources. |
|
Pick detectors. |
|
Return channels with a short source-detector separation. |
|
Return channels with a long source detector separation. |
|
Return a list of picks for specified source detector pairs. |
Datasets#
The following datasets are accessible using MNE-NIRS. The software will automatically download and extract the data, then provide the path to the data.
fNIRS dataset with finger tapping task
|
Motor task experiment data with 5 participants. |
fNIRS dataset with auditory speech and noise
|
Audio speech and noise dataset with 18 participants. |
fNIRS dataset with audio or visual speech
|
Audio and visual speech dataset with 8 participants. |