mne.io.read_raw_nirx#
- mne.io.read_raw_nirx(fname, saturated='annotate', *, preload=False, encoding='latin-1', verbose=None)[source]#
Reader for a NIRX fNIRS recording.
- Parameters:
- fnamepath-like
Path to the NIRX data folder (directory containing NIRX files) or the
.hdrheader file within that folder. The function will automatically find and read all required NIRX files from the directory.- saturated
str Replace saturated segments of data with NaNs, can be:
"ignore"The measured data is returned, even if it contains measurements while the amplifier was saturated.
"nan"The returned data will contain NaNs during time segments when the amplifier was saturated.
"annotate"(default)The returned data will contain annotations specifying sections the saturate segments.
This argument will only be used if there is no .nosatflags file (only if a NIRSport device is used and saturation occurred).
New in v0.24.
- preloadbool |
str Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, requires large amount of memory). If preload is a string, it is the name of a freshly created memory-mapped file used to store the data on the hard drive (slower, requires less memory). An existing file is overwritten. The caller owns the file and is responsible for removing it after the Raw object is no longer in use. For supported Raw readers, the exact string
"auto"instead reuses decoded data below the directory configured bymne.set_cache_dir(). Entries persist without a size limit and are mapped copy-on-write. UsePath("auto")for a literal filename.Changed in version 1.13: Support for the
"auto"decoded-data cache was added.- encoding
str Text encoding of the NIRX header file. See Standard Encodings.
- verbosebool |
str|int|None Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- Returns:
- rawinstance of
RawNIRX A Raw object containing NIRX data. See
mne.io.Rawfor documentation of attributes and methods.
- rawinstance of
See also
mne.io.RawDocumentation of attributes and methods of RawNIRX.
Notes
This function has only been tested with NIRScout and NIRSport devices, and with the NIRStar software version 15 and above and Aurora software 2021 and above.
The NIRSport device can detect if the amplifier is saturated. Starting from NIRStar 14.2, those saturated values are replaced by NaNs in the standard .wlX files. The raw unmodified measured values are stored in another file called .nosatflags_wlX. As NaN values can cause unexpected behaviour with mathematical functions the default behaviour is to return the saturated data.
Note
This function expects
fnameto be a path to a directory containing the NIRX data files (e.g.,.hdr,.wl1,.wl2, etc.). If you have a.snirffile, usemne.io.read_raw_snirf()instead.
Examples using mne.io.read_raw_nirx#
Preprocessing functional near-infrared spectroscopy (fNIRS) data