开源软件名称(OpenSource Name):NeurodataWithoutBorders/matnwb开源软件地址(OpenSource Url):https://github.com/NeurodataWithoutBorders/matnwb开源编程语言(OpenSource Language):HTML 92.6%开源软件介绍(OpenSource Introduction):MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files. SetupStep 1: Download MatNWBDownload the current release of MatNWB from the MatNWB releases page or from the . You can also check out the latest development version via git clone https://github.com/NeurodataWithoutBorders/matnwb.git Step 2: Generate the APIFrom the Matlab command line, add MatNWB to the Matlab path and generate the core classes for the NWB schema. cd matnwb
addpath(genpath(pwd));
generateCore(); % generate the most recent nwb-schema release. Optional: Generate MatNWB code for extensionsThe generateExtension('schema/core/nwb.namespace.yaml', '.../my_extensions1.namespace.yaml',...); Generated Matlab code will be put into a nwb = nwbRead('data.nwb'); Optional: Generate an older core schemaThe generateCore(); Currently, only schemas >= 2.2.0 are supported (2.1.0 and 2.0.1 are not supported at this time). TutorialsExtracellular Electrophysiology | YouTube walkthrough Calcium Imaging | YouTube walkthrough Intracellular Electrophysiology Advanced data write | YouTube walkthrough Using Dynamically Loaded Filters API DocumentationFor more information regarding the MatNWB API or any of the NWB Core types in MatNWB, visit the MatNWB API Documentation pages. How does it workNWB files are HDF5 files with data stored according to the Neurodata Without Borders: Neurophysiology (NWB:N) schema. The schema is described in a set of yaml documents. These define the various types and their attributes. This package provides two functions Once the code generation step is done, NWB objects can be read, constructed and written from Matlab. PyNWB's cached schemas are also supported, bypassing the need to run SourcesMatNWB is available online at https://github.com/NeurodataWithoutBorders/matnwb Data DimensionsNWB files use the HDF5 format to store data. There are two main differences between the way MATLAB and HDF5 represents dimensions. The first is that HDF5 is C-ordered, which means it stores data is a rows-first pattern, and the MATLAB is F-ordered, storing data in the reverse pattern, with the last dimension of the array stored consecutively. The result is that the data in HDF5 is effectively the transpose of the array in MATLAB. The second difference is that HDF5 can store 1-D arrays, but in MATLAB the lowest dimensionality of an array is 2-D. Due to differences in how MATLAB and HDF5 represent data, the dimensions of datasets are flipped when writing to/from file in MatNWB. This behavior differs depending on whether Writing to File
Reading from File
NOTE: MATLAB does not support 1D datasets. HDF5 datasets of size (M,) are loaded into MATLAB as datasets of size (M,1). To avoid changes in dimensions when writing to/from file use column vectors for 1D datasets. Writing to File
** Use scalar as input to 'maxSize' argument to write dataset of shape (N,) Reading from File
CaveatsThe NWB:N schema is in a state of some evolution. This package assumes a certain set of rules are used to define the schema. As the schema is updated, some of the rules may be changed and these will break this package. For those planning on using matnwb alongside pynwb, please keep the following in mind:
The This package reads and writes NWB:N 2.0 files and does not support older formats. ExamplesBasic Data Retrieval | showcases how one would read and process converted NWB file data to display a raster diagram. Conversion of Real Electrophysiology/Optophysiology Data | converts Electrophysiology/Optophysiology Data recorded from:
Analysis examples will be added in the dandi-example-live-scripts repo Third-party SupportThe TestingRun the test suite with FAQ
Make sure that there are no "@" signs anywhere in your full file path. This includes even directories that are not part of the matnwb root path and any "@" signs that are not at the beginning of the directory path. Alternatively, this issue disappears after MATLAB version 2017b. Installing this version may also resolve these issues. Note that the updates provided with 2017b should also be installed. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论