From c03300b00fe29896ed2fab657f6899db049c6d47 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Sat, 2 Nov 2024 20:15:57 +0100 Subject: [PATCH 01/14] Update README.md --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f8470a3f..58aded60 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,39 @@ -![MatNWB Logo](logo/logo_matnwb_small.png) - -[![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=NeurodataWithoutBorders/matnwb&file=tutorials/basicUsage.mlx) -[![codecov](https://codecov.io/gh/NeurodataWithoutBorders/matnwb/branch/master/graph/badge.svg?token=apA7F24NsO)](https://codecov.io/gh/NeurodataWithoutBorders/matnwb) -[![Run tests](https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_tests.yml/badge.svg)](https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_tests.yml?query=event%3Apush+branch%3Amaster) -[![Codespell](https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_codespell.yml/badge.svg?branch=master)](https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_codespell.yml?query=event%3Apush+branch%3Amaster) - -MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files. - -## Setup - -### Step 1: Download MatNWB +

+
+ MatNWB Logo +

+ +

MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files..

+ +

+ + Version + + + MATLAB Online + + + Codecov + + + Run tests + + + Codespell + +

+ +

+ Installation • + Getting Started • + Tutorials • + Use Cases • + Contributing • + Citing NWB +

+ + +## Installation Download the current release of MatNWB from the [MatNWB releases page](https://github.com/NeurodataWithoutBorders/matnwb/releases) or from the [![View NeurodataWithoutBorders/matnwb on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/67741-neurodatawithoutborders-matnwb). You can also check out the latest development version via @@ -17,7 +41,9 @@ Download the current release of MatNWB from the [MatNWB releases page](https://g git clone https://github.com/NeurodataWithoutBorders/matnwb.git ``` -### Step 2a: Reading from a NWB File +## Getting Started + +### Step 1: Reading from a NWB File If you wish to read from a NWB file, you can do so using the `nwbRead` command: @@ -27,8 +53,7 @@ File = nwbRead('/path/to/file.nwb'); The returned NwbFile object provides an in-memory view of the underlying NWB data. For more information, see the [NWB Overview Documentation](https://nwb-overview.readthedocs.io/en/latest/file_read/file_read.html#reading-with-matnwb) -### Step 2b: Writing a NWB File - +### Step 2: Writing a NWB File From the MATLAB command line, add MatNWB to the path. The generated classes are normally placed in the `+types` subdirectory in the MatNWB installation directory. As MATLAB [packages](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html), these generated classes comprise the building blocks you will need to write your NWB file. @@ -103,9 +128,6 @@ NWB files are HDF5 files with data stored according to the Neurodata Without Bor Certain functions, like `generateCore` and `nwbRead`, automatically read these specifications and converts them to a MATLAB class file. These classes generally map directly to attributes and constraints of the types defined in the schema. -## Sources - -MatNWB is available online at https://github.com/NeurodataWithoutBorders/matnwb ## Data Dimensions @@ -163,7 +185,7 @@ The `master` branch in this repository is considered perpetually unstable. If yo This package reads and writes NWB 2.0 files and does not support older formats. -## Examples +## Use Cases [Basic Data Retrieval](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/basicUsage.html) | showcases how one would read and process converted NWB file data to display a raster diagram. @@ -194,3 +216,12 @@ Alternatively, this issue disappears after MATLAB version 2017b. Installing thi 2. I Have Issues Reading From a NWB File! Some simple methods to troubleshoot failed NWB file reads can be found in the [NWB Overview Documentation](https://nwb-overview.readthedocs.io/en/latest/file_read/matnwb/troubleshooting.html). + +## Contributing +For details on how to contribute to MatNWB, please stay tuned. + +## Citing NWB + +* **Manuscript:** Oliver Rübel, Andrew Tritt, Ryan Ly, Benjamin K Dichter, Satrajit Ghosh, Lawrence Niu, Pamela Baker, Ivan Soltesz, Lydia Ng, Karel Svoboda, Loren Frank, Kristofer E Bouchard. (2022). The Neurodata Without Borders ecosystem for neurophysiological data science. eLife, 11:e78362. doi: https://doi.org/10.7554/eLife.78362 +* **RRID:** (PyNWB, RRID:SCR_017452) + From 149c5669409547446b507d9bb8bb5ef6e8257d0a Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 4 Nov 2024 19:17:13 +0100 Subject: [PATCH 02/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58aded60..d79fb2ad 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files..

-

+

Version @@ -21,7 +21,7 @@ Codespell -

+

Installation • From d6fdeb2728ae852eaa1e7e86c67137e945ddf6f7 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 20:54:17 +0100 Subject: [PATCH 03/14] Update Getting Started section of README.md --- README.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d79fb2ad..172d874f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@


- MatNWB Logo + MatNWB Logo

MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files..

@@ -40,36 +40,33 @@ Download the current release of MatNWB from the [MatNWB releases page](https://g ```bash git clone https://github.com/NeurodataWithoutBorders/matnwb.git ``` - -## Getting Started - -### Step 1: Reading from a NWB File - -If you wish to read from a NWB file, you can do so using the `nwbRead` command: - +From MATLAB's command window, add MatNWB to the [search path](https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html). ```matlab -File = nwbRead('/path/to/file.nwb'); +addpath('path/to/matnwb'); ``` -The returned NwbFile object provides an in-memory view of the underlying NWB data. For more information, see the [NWB Overview Documentation](https://nwb-overview.readthedocs.io/en/latest/file_read/file_read.html#reading-with-matnwb) - -### Step 2: Writing a NWB File +## Getting Started -From the MATLAB command line, add MatNWB to the path. The generated classes are normally placed in the `+types` subdirectory in the MatNWB installation directory. As MATLAB [packages](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html), these generated classes comprise the building blocks you will need to write your NWB file. +### Step 1: Reading from an NWB File +If you wish to read from an NWB file, you can do so using the `nwbRead` command: ```matlab -addpath('path/to/matnwb'); +nwbFile = nwbRead('/path/to/file.nwb'); ``` -Once you have configured your NWB File, you may write the `NwbFile` object to disk using the `nwbExport` function. +The returned NwbFile object provides an in-memory view of the underlying NWB data. For more information, see the [MatNWB Documentation](https://matnwb.readthedocs.io/en/latest/pages/getting_started/file_read.html#reading-with-matnwb) + +### Step 2: Writing an NWB File +The building blocks of an NWB file are the neurodata types defined in the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/). In MatNWB, these types are autogenerated from the schema specifications and located as classes in the [`+types`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/%2Btypes) [namespace](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) of the MatNWB root directory. +To create an NWB file, you can create neurodata objects, add them to an NwbFile object and write to disk using the `nwbExport` function (detailed examples are provided in the tutorials): ```matlab -nwbExport(NwbFile, 'path/to/file.nwb'); +nwbExport(nwbFile, 'path/to/file.nwb'); ``` ### Extensions: Generate MatNWB Classes for Extensions -The `generateExtension` command generates extension classes given a file path to the extension's namespace. This can be useful if you need to work with NWB Extension Schemas outside of Core. +The `generateExtension` command generates extension classes given a file path to an extension's namespace. This can be useful if you need to work with data types from [neurodata extensions](https://nwb-extensions.github.io). ```matlab generateExtension('schema/core/nwb.namespace.yaml', '.../my_extensions1.namespace.yaml',...); @@ -77,13 +74,13 @@ generateExtension('schema/core/nwb.namespace.yaml', '.../my_extensions1.namespac ### Advanced: Generating Legacy MatNWB Classes -The `generateCore` command can generate older versions of the nwb schema. +The `generateCore` command can generate classes for older versions of the nwb schema. ```matlab generateCore('2.1.0'); % generates classes for NWB schema version 2.1.0 ``` -Supported schema versions are provided in the MatNWB installation directory under `nwb-schema`. +Supported schema versions are provided in the MatNWB root directory under [`nwb-schema`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/nwb-schema). ## Tutorials From bb16652b826b30ad1cb67ba0ab40254aaf2c67ed Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:04:51 +0100 Subject: [PATCH 04/14] Remove "Data Dimensions" section from README.md --- README.md | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/README.md b/README.md index 172d874f..86536ebb 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ nwbExport(nwbFile, 'path/to/file.nwb'); The `generateExtension` command generates extension classes given a file path to an extension's namespace. This can be useful if you need to work with data types from [neurodata extensions](https://nwb-extensions.github.io). ```matlab -generateExtension('schema/core/nwb.namespace.yaml', '.../my_extensions1.namespace.yaml',...); +generateExtension('some/folder/my_extension1.namespace.yaml', ...); ``` ### Advanced: Generating Legacy MatNWB Classes @@ -114,10 +114,6 @@ Supported schema versions are provided in the MatNWB root directory under [`nwb- [Scratch Space](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/scratch.html) -## API Documentation - -For more information regarding the MatNWB API or any of the NWB Core types in MatNWB, visit the [MatNWB API Documentation pages](https://neurodatawithoutborders.github.io/matnwb/doc/index.html). - ## Under the Hood @@ -126,51 +122,6 @@ NWB files are HDF5 files with data stored according to the Neurodata Without Bor Certain functions, like `generateCore` and `nwbRead`, automatically read these specifications and converts them to a MATLAB class file. These classes generally map directly to attributes and constraints of the types defined in the schema. -## Data Dimensions - -NWB 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 ```VectorData``` use ```DataPipe``` objects to contain the data. It's important to keep in mind the mappings below to make sure is written to and read from file as expected. - -[without DataPipes](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dimensionMapNoDataPipes.html) - -**Writing to File** - -| Shape
in MatNWB| Shape
in HDF5| -| :----------: | :----------: | -| (M, 1) | (M,) | -| (1, M) | (M,) | -| (P, O, N, M) | (M, N, O, P) | - -**Reading from File** - -| Shape
in HDF5| Shape
in MatNWB| -| :----------: | :----------: | -| (M,) | (M,1) | -| (M, N, O, P) | (P, O, N, M) | - -**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. - -[with DataPipes](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dimensionMapWithDataPipes.html) - -**Writing to File** - -| Shape
in MatNWB| Shape
in HDF5| -| :----------: | :----------: | -| (M, 1) | (1, M) | -| (1, M) |(M, 1)/(M,)** | -| (P, O, N, M) | (M, N, O, P) | - -** Use scalar as input to 'maxSize' argument to write dataset of shape (N,) - -**Reading from File** - -| Shape
in HDF5| Shape
in MatNWB| -| :----------: | :----------: | -| (M, 1) | (1, M) | -| (1, M) | (M, 1) | -| (M,) | (M, 1) | -| (M, N, O, P) | (P, O, N, M) | - - ## Caveats The NWB schema has regular updates and is open to addition of new types along with modification of previously defined types. As such, certain type presumptions made by MatNWB may be invalidated in the future from a NWB schema. Furthermore, new types may require implementations that will be missing in MatNWB until patched in. From 71eb9e3d7028f501d69963f49da65546cd64d860 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:08:14 +0100 Subject: [PATCH 05/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86536ebb..149ef35a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ MatNWB Logo -

MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files..

+

MatNWB is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files.

From 3cc8494770dc374f6307cd69a95106cc62db7f36 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:14:02 +0100 Subject: [PATCH 06/14] Update README.md Remove FAQ and Testing section --- README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/README.md b/README.md index 149ef35a..c3566b46 100644 --- a/README.md +++ b/README.md @@ -148,23 +148,6 @@ Analysis examples will be added in the [dandi-example-live-scripts repo](https:/ ## Third-party Support The `+contrib` folder contains tools for converting from other common data formats/specifications to NWB. Currently supported data types are TDT, MWorks, and Blackrock. We are interested in expanding this section to other data specifications and would greatly value your contribution! -## Testing - -Run the test suite with `nwbtest`. - -## FAQ - -1. "A class definition must be in an "@" directory." - -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. - - -2. I Have Issues Reading From a NWB File! - -Some simple methods to troubleshoot failed NWB file reads can be found in the [NWB Overview Documentation](https://nwb-overview.readthedocs.io/en/latest/file_read/matnwb/troubleshooting.html). - ## Contributing For details on how to contribute to MatNWB, please stay tuned. From da9168bfd32582b212df0d0f0898a76c6f624de3 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:16:18 +0100 Subject: [PATCH 07/14] Update README.md change wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3566b46..39acdeb0 100644 --- a/README.md +++ b/README.md @@ -117,9 +117,9 @@ Supported schema versions are provided in the MatNWB root directory under [`nwb- ## Under the Hood -NWB files are HDF5 files with data stored according to the Neurodata Without Borders (NWB) [schema](https://github.com/NeurodataWithoutBorders/nwb-schema/tree/dev/core). The schema is described in a set of YAML documents which defines the various types and their attributes. +NWB files are HDF5 files with data stored according to the Neurodata Without Borders (NWB) [schema](https://github.com/NeurodataWithoutBorders/nwb-schema/tree/dev/core). The schema is described in a set of YAML documents which defines the various types and their attributes. -Certain functions, like `generateCore` and `nwbRead`, automatically read these specifications and converts them to a MATLAB class file. These classes generally map directly to attributes and constraints of the types defined in the schema. +Certain functions, like `generateCore` and `nwbRead`, automatically read these specifications and converts them to a set of MATLAB class files. These classes generally map directly to attributes and constraints of the types defined in the schema. ## Caveats From c77f8332af04714e74c0070f666379942dc49f33 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:28:58 +0100 Subject: [PATCH 08/14] Update README.md --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 39acdeb0..f1074830 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ From MATLAB's command window, add MatNWB to the [search path](https://www.mathwo addpath('path/to/matnwb'); ``` + ## Getting Started ### Step 1: Reading from an NWB File @@ -82,6 +83,7 @@ generateCore('2.1.0'); % generates classes for NWB schema version 2.1.0 Supported schema versions are provided in the MatNWB root directory under [`nwb-schema`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/nwb-schema). + ## Tutorials [Intro to MatNWB](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/intro.html) @@ -124,15 +126,16 @@ Certain functions, like `generateCore` and `nwbRead`, automatically read these s ## Caveats -The NWB schema has regular updates and is open to addition of new types along with modification of previously defined types. As such, certain type presumptions made by MatNWB may be invalidated in the future from a NWB schema. Furthermore, new types may require implementations that will be missing in MatNWB until patched in. +The NWB schema has regular updates and is open to addition of new types along with modification of previously defined types. As such, certain type presumptions made by MatNWB may be invalidated in the future from newer NWB schema versions. Furthermore, new types may require implementations that will be missing in MatNWB until patched in. -For those planning on using matnwb alongside pynwb, please keep the following in mind: - - MatNWB is dependent on the schema, which may not necessary correspond with your PyNWB schema version. Please consider overwriting the contents within MatNWB's **~/schema/core** directory with the generating PyNWB's **src/pynwb/data directory** and running generateCore to ensure compatibility between systems. +For those planning on using MatNWB alongside PyNWB, please keep the following in mind: + - MatNWB is dependent on the schema, which may not necessarily correspond with your PyNWB schema version. Please consider overwriting the contents within MatNWB's **~/schema/core** directory with the generating PyNWB's **src/pynwb/data directory** and running `generateCore` to ensure compatibility between systems. -The `master` branch in this repository is considered perpetually unstable. If you desire Matnwb's full functionality (full round-trip with nwb data), please consider downloading the more stable releases in the Releases tab. Most releases will coincide with nwb-schema releases and guarantee compatibility of new features introduced with the schema release along with backwards compatibility with all previous nwb-schema releases. +The `master` branch of this repository is considered perpetually unstable. If you want to stay on the safer side, please consider downloading the more stable releases from the [Releases](https://github.com/NeurodataWithoutBorders/matnwb/releases) page. Most releases will coincide with nwb-schema releases and guarantee compatibility of new features introduced with the schema release along with backwards compatibility with all previous nwb-schema releases. This package reads and writes NWB 2.0 files and does not support older formats. + ## Use Cases [Basic Data Retrieval](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/basicUsage.html) @@ -151,8 +154,7 @@ The `+contrib` folder contains tools for converting from other common data forma ## Contributing For details on how to contribute to MatNWB, please stay tuned. -## Citing NWB +## Citing NWB * **Manuscript:** Oliver Rübel, Andrew Tritt, Ryan Ly, Benjamin K Dichter, Satrajit Ghosh, Lawrence Niu, Pamela Baker, Ivan Soltesz, Lydia Ng, Karel Svoboda, Loren Frank, Kristofer E Bouchard. (2022). The Neurodata Without Borders ecosystem for neurophysiological data science. eLife, 11:e78362. doi: https://doi.org/10.7554/eLife.78362 -* **RRID:** (PyNWB, RRID:SCR_017452) - +* **RRID:** (MatNWB, RRID:SCR_021156) From 62376e152043c096f0b9104d00750a1b35e35621 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:32:38 +0100 Subject: [PATCH 09/14] Update README.md Update tutorial links --- README.md | 58 ++++++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index f1074830..5cb0b437 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ ## Installation - Download the current release of MatNWB from the [MatNWB releases page](https://github.com/NeurodataWithoutBorders/matnwb/releases) or from the [![View NeurodataWithoutBorders/matnwb on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/67741-neurodatawithoutborders-matnwb). You can also check out the latest development version via ```bash @@ -49,7 +48,6 @@ addpath('path/to/matnwb'); ## Getting Started ### Step 1: Reading from an NWB File - If you wish to read from an NWB file, you can do so using the `nwbRead` command: ```matlab nwbFile = nwbRead('/path/to/file.nwb'); @@ -66,7 +64,6 @@ nwbExport(nwbFile, 'path/to/file.nwb'); ``` ### Extensions: Generate MatNWB Classes for Extensions - The `generateExtension` command generates extension classes given a file path to an extension's namespace. This can be useful if you need to work with data types from [neurodata extensions](https://nwb-extensions.github.io). ```matlab @@ -74,7 +71,6 @@ generateExtension('some/folder/my_extension1.namespace.yaml', ...); ``` ### Advanced: Generating Legacy MatNWB Classes - The `generateCore` command can generate classes for older versions of the nwb schema. ```matlab @@ -85,47 +81,56 @@ Supported schema versions are provided in the MatNWB root directory under [`nwb- ## Tutorials +[Intro to MatNWB](https://matnwb.readthedocs.io/en/latest/pages/tutorials/intro.html) -[Intro to MatNWB](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/intro.html) +[Basic File Reading](https://matnwb.readthedocs.io/en/latest/pages/tutorials/read_demo.html) | a demo showcase for basic visualization from a DANDI dataset. -[Basic File Reading](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/read_demo.html) | a demo showcase for basic visualization from a DANDI dataset. - -[Extracellular Electrophysiology](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/ecephys.html) | +[Extracellular Electrophysiology](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ecephys.html) | [▶️ in MATLAB Online](https://matlab.mathworks.com/open/github/v1?repo=NeurodataWithoutBorders/matnwb&file=tutorials/ecephys.mlx) | [YouTube walkthrough](https://www.youtube.com/watch?v=W8t4_quIl1k&ab_channel=NeurodataWithoutBorders) -[Calcium Imaging](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/ophys.html) | +[Calcium Imaging](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ophys.html) | ▶️ in MATLAB Online | [YouTube walkthrough](https://www.youtube.com/watch?v=OBidHdocnTc&ab_channel=NeurodataWithoutBorders) -[Intracellular Electrophysiology](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/icephys.html) +[Intracellular Electrophysiology](https://matnwb.readthedocs.io/en/latest/pages/tutorials/icephys.html) -[Behavior](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/behavior.html) +[Behavior](https://matnwb.readthedocs.io/en/latest/pages/tutorials/behavior.html) -[Optogenetics](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/ogen.html) +[Optogenetics](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ogen.html) -[Dynamic tables](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dynamic_tables.html) +[Dynamic tables](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dynamic_tables.html) -[Images](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/images.html) +[Images](https://matnwb.readthedocs.io/en/latest/pages/tutorials/images.html) -[Advanced data write](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dataPipe.html) | [YouTube walkthrough](https://www.youtube.com/watch?v=PIE_F4iVv98&ab_channel=NeurodataWithoutBorders) +[Advanced data write](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dataPipe.html) | [YouTube walkthrough](https://www.youtube.com/watch?v=PIE_F4iVv98&ab_channel=NeurodataWithoutBorders) -[Using Dynamically Loaded Filters](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dynamically_loaded_filters.html) +[Using Dynamically Loaded Filters](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dynamically_loaded_filters.html) -[Remote read](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/remote_read.html) +[Remote read](https://matnwb.readthedocs.io/en/latest/pages/tutorials/remote_read.html) -[Scratch Space](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/scratch.html) +[Scratch Space](https://matnwb.readthedocs.io/en/latest/pages/tutorials/scratch.html) -## Under the Hood +## Use Cases +[Basic Data Retrieval](https://matnwb.readthedocs.io/en/latest/pages/tutorials/basicUsage.html) +| showcases how one would read and process converted NWB file data to display a raster diagram. + +[Conversion of Real Electrophysiology/Optophysiology Data](https://matnwb.readthedocs.io/en/latest/pages/tutorials/convertTrials.html) +| converts Electrophysiology/Optophysiology Data recorded from: +>Li, Daie, Svoboda, Druckman (2016); Data and simulations related to: Robust neuronal dynamics in premotor cortex during motor planning. Li, Daie, Svoboda, Druckman, Nature. CRCNS.org +http://dx.doi.org/10.6080/K0RB72JW + +Analysis examples will be added in the [dandi-example-live-scripts repo](https://github.com/NeurodataWithoutBorders/dandi-example-live-scripts) + +## Under the Hood NWB files are HDF5 files with data stored according to the Neurodata Without Borders (NWB) [schema](https://github.com/NeurodataWithoutBorders/nwb-schema/tree/dev/core). The schema is described in a set of YAML documents which defines the various types and their attributes. Certain functions, like `generateCore` and `nwbRead`, automatically read these specifications and converts them to a set of MATLAB class files. These classes generally map directly to attributes and constraints of the types defined in the schema. ## Caveats - The NWB schema has regular updates and is open to addition of new types along with modification of previously defined types. As such, certain type presumptions made by MatNWB may be invalidated in the future from newer NWB schema versions. Furthermore, new types may require implementations that will be missing in MatNWB until patched in. For those planning on using MatNWB alongside PyNWB, please keep the following in mind: @@ -136,25 +141,12 @@ The `master` branch of this repository is considered perpetually unstable. If yo This package reads and writes NWB 2.0 files and does not support older formats. -## Use Cases - -[Basic Data Retrieval](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/basicUsage.html) -| showcases how one would read and process converted NWB file data to display a raster diagram. - -[Conversion of Real Electrophysiology/Optophysiology Data](https://neurodatawithoutborders.github.io/matnwb/tutorials/html/convertTrials.html) -| converts Electrophysiology/Optophysiology Data recorded from: ->Li, Daie, Svoboda, Druckman (2016); Data and simulations related to: Robust neuronal dynamics in premotor cortex during motor planning. Li, Daie, Svoboda, Druckman, Nature. CRCNS.org -http://dx.doi.org/10.6080/K0RB72JW - -Analysis examples will be added in the [dandi-example-live-scripts repo](https://github.com/NeurodataWithoutBorders/dandi-example-live-scripts) - ## Third-party Support The `+contrib` folder contains tools for converting from other common data formats/specifications to NWB. Currently supported data types are TDT, MWorks, and Blackrock. We are interested in expanding this section to other data specifications and would greatly value your contribution! ## Contributing For details on how to contribute to MatNWB, please stay tuned. - ## Citing NWB * **Manuscript:** Oliver Rübel, Andrew Tritt, Ryan Ly, Benjamin K Dichter, Satrajit Ghosh, Lawrence Niu, Pamela Baker, Ivan Soltesz, Lydia Ng, Karel Svoboda, Loren Frank, Kristofer E Bouchard. (2022). The Neurodata Without Borders ecosystem for neurophysiological data science. eLife, 11:e78362. doi: https://doi.org/10.7554/eLife.78362 * **RRID:** (MatNWB, RRID:SCR_021156) From 2de86768b1b909a543188f63d652a27d0d149cd3 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 21:48:41 +0100 Subject: [PATCH 10/14] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5cb0b437..8f2a75f4 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@

+ DocumentationInstallationGetting StartedTutorials • @@ -46,8 +47,9 @@ addpath('path/to/matnwb'); ## Getting Started +The MatNWB 📖 documentation can be found at https://matnwb.readthedocs.io. If you find MatNWB useful, please come back later and leave us a star ⭐ -### Step 1: Reading from an NWB File +### Reading from an NWB File If you wish to read from an NWB file, you can do so using the `nwbRead` command: ```matlab nwbFile = nwbRead('/path/to/file.nwb'); @@ -55,7 +57,7 @@ nwbFile = nwbRead('/path/to/file.nwb'); The returned NwbFile object provides an in-memory view of the underlying NWB data. For more information, see the [MatNWB Documentation](https://matnwb.readthedocs.io/en/latest/pages/getting_started/file_read.html#reading-with-matnwb) -### Step 2: Writing an NWB File +### Writing an NWB File The building blocks of an NWB file are the neurodata types defined in the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/). In MatNWB, these types are autogenerated from the schema specifications and located as classes in the [`+types`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/%2Btypes) [namespace](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) of the MatNWB root directory. To create an NWB file, you can create neurodata objects, add them to an NwbFile object and write to disk using the `nwbExport` function (detailed examples are provided in the tutorials): @@ -63,7 +65,7 @@ To create an NWB file, you can create neurodata objects, add them to an NwbFile nwbExport(nwbFile, 'path/to/file.nwb'); ``` -### Extensions: Generate MatNWB Classes for Extensions +### Generate MatNWB Classes for Extensions The `generateExtension` command generates extension classes given a file path to an extension's namespace. This can be useful if you need to work with data types from [neurodata extensions](https://nwb-extensions.github.io). ```matlab From d96a1abb1ba2f485141f9f3b394462384c724904 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 9 Dec 2024 22:06:28 +0100 Subject: [PATCH 11/14] Update README.md Fix local repo links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f2a75f4..d7fe2b9f 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ nwbFile = nwbRead('/path/to/file.nwb'); The returned NwbFile object provides an in-memory view of the underlying NWB data. For more information, see the [MatNWB Documentation](https://matnwb.readthedocs.io/en/latest/pages/getting_started/file_read.html#reading-with-matnwb) ### Writing an NWB File -The building blocks of an NWB file are the neurodata types defined in the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/). In MatNWB, these types are autogenerated from the schema specifications and located as classes in the [`+types`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/%2Btypes) [namespace](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) of the MatNWB root directory. +The building blocks of an NWB file are the neurodata types defined in the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/). In MatNWB, these types are autogenerated from the schema specifications and located as classes in the [`+types`](https://github.com/NeurodataWithoutBorders/matnwb/tree/master/%2Btypes) [namespace](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) of the MatNWB root directory. To create an NWB file, you can create neurodata objects, add them to an NwbFile object and write to disk using the `nwbExport` function (detailed examples are provided in the tutorials): ```matlab @@ -79,7 +79,7 @@ The `generateCore` command can generate classes for older versions of the nwb sc generateCore('2.1.0'); % generates classes for NWB schema version 2.1.0 ``` -Supported schema versions are provided in the MatNWB root directory under [`nwb-schema`](https://github.com/NeurodataWithoutBorders/matnwb/tree/update-readme-2024/nwb-schema). +Supported schema versions are provided in the MatNWB root directory under [`nwb-schema`](https://github.com/NeurodataWithoutBorders/matnwb/tree/master/nwb-schema). ## Tutorials From c8c5f8c1877a415c93579d994663c2b3b80e18a3 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Tue, 10 Dec 2024 10:10:29 +0100 Subject: [PATCH 12/14] Add emojis to TOC in README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d7fe2b9f..d431fa08 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,12 @@

- Documentation • - Installation • - Getting Started • - Tutorials • - Use Cases • - Contributing • - Citing NWB + ⚙️ Installation • + 🚀 Getting Started • + 🎓 Tutorials • + 💡 Use Cases • + 🤝 Contributing • + 📄 Citing NWB

From dfd54c2d5254c90e9198d143a893d5d9a2f9e27b Mon Sep 17 00:00:00 2001 From: ehennestad Date: Tue, 10 Dec 2024 10:12:53 +0100 Subject: [PATCH 13/14] Fix placement of emojis in TOC --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d431fa08..44dbbe3e 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@

- ⚙️ Installation • - 🚀 Getting Started • - 🎓 Tutorials • - 💡 Use Cases • - 🤝 Contributing • - 📄 Citing NWB + ⚙️ Installation • + 🚀 Getting Started • + 🎓 Tutorials • + 💡 Use Cases • + 🤝 Contributing • + 📄 Citing NWB

From 6ed877dfd989f1bf152043d64de0926119f647ea Mon Sep 17 00:00:00 2001 From: ehennestad Date: Tue, 10 Dec 2024 10:18:20 +0100 Subject: [PATCH 14/14] Small rewording - README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44dbbe3e..dd9e9cdd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ ## Installation -Download the current release of MatNWB from the [MatNWB releases page](https://github.com/NeurodataWithoutBorders/matnwb/releases) or from the [![View NeurodataWithoutBorders/matnwb on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/67741-neurodatawithoutborders-matnwb). You can also check out the latest development version via +Download the current release of MatNWB from the [Releases page](https://github.com/NeurodataWithoutBorders/matnwb/releases) or from [![View NeurodataWithoutBorders/matnwb on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/67741-neurodatawithoutborders-matnwb). You can also check out the latest development version via ```bash git clone https://github.com/NeurodataWithoutBorders/matnwb.git