raw_from_layout¶
- raw_from_layout(layout: BIDSLayout, preload: bool = True, run: list[int] | int = None, **kwargs) Raw[source][source]¶
Searches a BIDSLayout for a raw file and returns a mne Raw object.
- Parameters:
layout (
BIDSLayout) – The BIDSLayout to search.preload (
boolorstr (default False)) – 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, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, requires less memory).run (
Union[List[int],int], optional) – The run to search for, by default None**kwargs (
dict) – The parameters passed to bids.BIDSLayout.get()
- Return type:
Examples
>>> import mne >>> bids_root = mne.datasets.epilepsy_ecog.data_path(verbose=False) >>> layout = BIDSLayout(bids_root) >>> raw = raw_from_layout(layout, subject="pt1", preload=True, ... extension=".vhdr", verbose=False) Reading 0 ... 269079 = 0.000 ... 269.079 secs...