nwbRead
- nwbRead(filename, flags, options)[source]
NWBREAD - Read an NWB file.
- Syntax:
nwb = NWBREAD(filename)
Reads the nwb file at filename and returns an NWBFile object representing its contents.nwb = NWBREAD(filename, flags)
Reads the nwb file using optional flags controlling the mode for how to read the file. See input arguments for a list of available flags.nwb = NWBREAD(filename, Name, Value)
Reads the nwb file using optional name-value pairs controlling options for how to read the file.- Input Arguments:
filename (
string
) - Filepath pointing to an NWB file.flags (
string
) - Flag for setting the mode for the NWBREAD operation. Available options are: ‘ignorecache’. If the ‘ignorecache’ flag is used, classes for NWB data types are not re-generated based on the embedded schemas in the file.options (
name-value pairs
) - Optional name-value pairs. Available options:savedir (
string
) - A folder to save generated classes for NWB types.
- Output Arguments:
nwb (
NwbFile
) - Nwb file object
- Usage:
Example 1 - Read an NWB file:
nwb = nwbRead('data.nwb');
Example 2 - Read an NWB file without re-generating classes for NWB types:
nwb = nwbRead('data.nwb', 'ignorecache');
Note: This is a good option to use if you are reading several files which are created of the same version of the NWB schemas.
Example 3 - Read an NWB file and generate classes for NWB types in the current working directory:
nwb = nwbRead('data.nwb', 'savedir', '.');
See also