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 is a Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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..
-
+
@@ -21,7 +21,7 @@
-
+
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 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 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.
+ Documentation •
Installation •
Getting Started •
Tutorials •
@@ -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