mne_bids.get_bids_path_from_fname

mne_bids.get_bids_path_from_fname(fname, check=True, verbose=None)[source]

Retrieve a BIDSPath object from a filename.

Parameters
fnamepath-like

The path to parse a BIDSPath from.

checkbool

Whether to check if the generated BIDSPath complies with the BIDS specification, i.e., whether all included entities and the suffix are valid.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns
bids_pathBIDSPath

The BIDS path object.