mne.io.read_raw_nwb#
- mne.io.read_raw_nwb(fname, *, ch_type='seeg', series=None, preload=False, verbose=None)[source]#
Read an NWB voltage series using h5py.
- Parameters:
- fnamepath-like
Path to an NWB file.
- ch_type
str The channel type to use for all channels, e.g.
"seeg"(default) or"ecog". NWB files do not store channel types.- series
str|None The path of the series to read inside the file, e.g.
"processing/ecephys/LFP/lfp". IfNone(default), read the only voltage series inacquisition, or else the onlyElectricalSeriesin the file.- 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.- 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
RawNWB The raw recording.
- rawinstance of
See also
mne.io.read_rawRead raw data from supported formats.
Notes
Requires
h5py. Withoutseries, reads the singleElectricalSeriesin the file’sacquisitiongroup, or the single two-dimensionalTimeSeriesin volts if there is noElectricalSeries. Channel names are the electrode IDs if available, otherwise channel numbers. Timestamps must be uniformly sampled. Each table inintervals(e.g.trials) becomes annotations described asNWB/<table>, exceptinvalid_times, which becomesBAD_nwb_invalid; rows scoped to other series are skipped. The subject ID and sex are stored inraw.info["subject_info"].New in v1.14.