mne_bids.find_matching_paths#
- mne_bids.find_matching_paths(root, subjects=None, sessions=None, tasks=None, acquisitions=None, runs=None, processings=None, recordings=None, spaces=None, splits=None, descriptions=None, suffixes=None, extensions=None, datatypes=None, check=False, *, ignore_json=False, ignore_nosub=False)[source]#
Get list of all matching paths for all matching entity values.
Input can be str or list of str. None matches all found values.
Performs a recursive search, starting in
.root
(if set), based onBIDSPath.entities
object.- Parameters:
- root
pathlib.Path
|str
The root of the BIDS path.
- subjects
str
| array_like ofstr
|None
The subject ID. Corresponds to “sub”.
- sessions
str
| array_like ofstr
|None
The acquisition session. Corresponds to “ses”.
- tasks
str
| array_like ofstr
|None
The experimental task. Corresponds to “task”.
- acquisitions: str | array-like of str | None
The acquisition parameters. Corresponds to “acq”.
- runs
str
| array_like ofstr
|None
The run number. Corresponds to “run”.
- processings
str
| array_like ofstr
|None
The processing label. Corresponds to “proc”.
- recordings
str
| array_like ofstr
|None
The recording name. Corresponds to “rec”.
- spaces
str
| array_like ofstr
|None
The coordinate space for anatomical and sensor location files (e.g.,
*_electrodes.tsv
,*_markers.mrk
). Corresponds to “space”. Note that valid values forspace
must come from a list of BIDS keywords as described in the BIDS specification.- splits
str
| array_like ofstr
|None
The split of the continuous recording file for
.fif
data. Corresponds to “split”.- descriptions
str
| array_like ofstr
|None
This corresponds to the BIDS entity
desc
. It is used to provide additional information for derivative data, e.g., preprocessed data may be assigneddescription='cleaned'
.Added in version 0.11.
- suffixes
str
| array_like ofstr
|None
The filename suffix. This is the entity after the last
_
before the extension. E.g.,'channels'
. The following filename suffix’s are accepted: ‘meg’, ‘markers’, ‘eeg’, ‘ieeg’, ‘T1w’, ‘participants’, ‘scans’, ‘electrodes’, ‘coordsystem’, ‘channels’, ‘events’, ‘headshape’, ‘digitizer’, ‘beh’, ‘physio’, ‘stim’- extensions
str
| array_like ofstr
|None
The extension of the filename. E.g.,
'.json'
.- datatypes
str
| array_like ofstr
|None
The BIDS data type, e.g.,
'anat'
,'func'
,'eeg'
,'meg'
,'ieeg'
.- check
bool
If
True
, only returns paths that conform to BIDS. IfFalse
(default), the.check
attribute of the returnedmne_bids.BIDSPath
object will be set toTrue
for paths that do conform to BIDS, and toFalse
for those that don’t.- ignore_json
bool
If
True
, ignores json files. Defaults toFalse
.- ignore_nosub
bool
If
True
, ignores all files that are not of the formroot/sub-*
. Defaults toFalse
.
- root
- Returns:
- bids_paths
list
ofmne_bids.BIDSPath
The matching paths.
- bids_paths