Пример #1
0
# Import MNE-BIDS processing
from mne_bids import BIDSPath, read_raw_bids, get_entity_vals

# %%
# Set up directories
# ------------------
#
# First we will define where the raw data is stored. We will analyse a
# BIDS dataset, note that the BIDS specification for NIRS data is still
# under development and you will need to install the development branch
# as described above.
#
# We first define the root directory of our dataset.

root = fnirs_motor_group.data_path()
print(root)

# %%
# And as we are using MNE-BIDS we can create a BIDSPath.
# This helps to handle all the path wrangling.

dataset = BIDSPath(root=root, task="tapping")
print(dataset.directory)

# %%
# For example we can automatically query the subjects, tasks, and sessions.

subjects = get_entity_vals(root, 'subject')
print(subjects)
Пример #2
0
# Set up directories
# ------------------
# .. sidebar:: Requires MNE-BIDS fNIRS branch
#
#    This section of code requires the MNE-BIDS fNIRS branch.
#    See instructions at the top of the page on how to install.
#    Alternatively, if your data is not in BIDS format,
#    skip to the next section.
#
# First we will define where the raw data is stored. We will analyse a
# BIDS dataset. This ensures we have all the metadata we require
# without manually specifying the trigger names etc.
# We first define where the root directory of our dataset is.
# In this example we use the example dataset ``audio_or_visual_speech``.

root = data_path()
dataset = BIDSPath(root=root,
                   suffix="nirs",
                   extension=".snirf",
                   task="tapping",
                   datatype="nirs")
subjects = get_entity_vals(root, 'subject')

# %%
# Define individual analysis
# --------------------------
#
# More details on the epoching analysis can be found
# at :ref:`Waveform individual analysis <tut-fnirs-processing>`.
# A minimal processing pipeline is demonstrated here, as the focus
# of this tutorial is to demonstrate the decoding pipeline.