{"id":23085785,"url":"https://github.com/neurodatawithoutborders/matnwb","last_synced_at":"2025-04-06T16:11:41.544Z","repository":{"id":37821125,"uuid":"109749913","full_name":"NeurodataWithoutBorders/matnwb","owner":"NeurodataWithoutBorders","description":"A Matlab interface for reading and writing NWB files","archived":false,"fork":false,"pushed_at":"2025-03-27T10:33:08.000Z","size":34850,"stargazers_count":51,"open_issues_count":49,"forks_count":32,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-27T10:34:10.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://matnwb.readthedocs.io","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NeurodataWithoutBorders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-06T21:06:44.000Z","updated_at":"2025-03-24T06:34:23.000Z","dependencies_parsed_at":"2024-06-13T04:13:33.377Z","dependency_job_id":"4bf9c325-c558-432e-a759-ac1bfccdeb3e","html_url":"https://github.com/NeurodataWithoutBorders/matnwb","commit_stats":{"total_commits":1161,"total_committers":25,"mean_commits":46.44,"dds":0.6795865633074936,"last_synced_commit":"bb9acbf74c5cc67545a505edad2a0b46694a2b57"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fmatnwb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fmatnwb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fmatnwb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fmatnwb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeurodataWithoutBorders","download_url":"https://codeload.github.com/NeurodataWithoutBorders/matnwb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509223,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T18:10:54.932Z","updated_at":"2025-04-06T16:11:41.521Z","avatar_url":"https://github.com/NeurodataWithoutBorders.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/NeurodataWithoutBorders/matnwb\"\u003e\u003cimg src=\"logo/logo_matnwb.png\" alt=\"MatNWB Logo\" width=\"300\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eMatNWB is a  Matlab interface for reading and writing Neurodata Without Borders (NWB) 2.x files.\u003c/h4\u003e\n\n\u003ch4 align=\"center\"\u003e\n  \u003ca href=\"https://github.com/NeurodataWithoutBorders/matnwb/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/NeurodataWithoutBorders/matnwb?label=version\" alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://matlab.mathworks.com/open/github/v1?repo=NeurodataWithoutBorders/matnwb\u0026file=tutorials/intro.mlx\"\u003e\n    \u003cimg src=\"https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg\" alt=\"MATLAB Online\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/NeurodataWithoutBorders/matnwb\" \u003e  \n    \u003cimg src=\"https://codecov.io/gh/NeurodataWithoutBorders/matnwb/graph/badge.svg?token=apA7F24NsO\" alt=\"Codecov\"/\u003e    \n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_tests.yml?query=event%3Apush+branch%3Amain\"\u003e\n   \u003cimg src=\"https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_tests.yml/badge.svg?branch=main\" alt=\"Run tests\"\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_codespell.yml?query=event%3Apush+branch%3Amain\"\u003e\n   \u003cimg src=\"https://github.com/NeurodataWithoutBorders/matnwb/actions/workflows/run_codespell.yml/badge.svg?branch=main\" alt=\"Codespell\"\u003e\n  \u003c/a\u003e\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  ⚙️ \u003ca href=\"#installation-and-requirements\"\u003eInstallation\u003c/a\u003e •\n  🚀 \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e •\n  🎓 \u003ca href=\"#tutorials\"\u003eTutorials\u003c/a\u003e •\n  💡 \u003ca href=\"#use-cases\"\u003eUse Cases\u003c/a\u003e •\n  🤝 \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n  📄 \u003ca href=\"#citing-nwb\"\u003eCiting NWB\u003c/a\u003e\n\u003c/p\u003e\n\n\n## Installation and Requirements\nDownload 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 \n\n```bash\ngit clone https://github.com/NeurodataWithoutBorders/matnwb.git\n```\nFrom 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).\n```matlab\naddpath('path/to/matnwb');\n```\n\nMatNWB requires MATLAB **R2019b** or newer. As a general rule, we strive to maintain compatibility with MATLAB releases from the past five years.\n\n## Getting Started\nThe MatNWB 📖 documentation can be found at https://matnwb.readthedocs.io. If you find MatNWB useful, please come back later and leave us a star ⭐\n\n### Reading from an NWB File\nIf you wish to read from an NWB file, you can do so using the `nwbRead` command:\n```matlab\nnwbFile = nwbRead('/path/to/file.nwb');\n```\n\nThe 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)\n\n### Writing an NWB File\nThe 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/main/%2Btypes) [namespace](https://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) of the MatNWB root directory. \n\nTo 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):\n```matlab\nnwbExport(nwbFile, 'path/to/file.nwb');\n```\n\n### Generate MatNWB Classes for Extensions\nThe `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).\n\n```matlab\ngenerateExtension('some/folder/my_extension1.namespace.yaml', ...);\n```\n\n### Advanced: Generating Legacy MatNWB Classes\nThe `generateCore` command can generate classes for older versions of the nwb schema.\n\n```matlab\ngenerateCore('2.1.0'); % generates classes for NWB schema version 2.1.0\n```\n\nSupported schema versions are provided in the MatNWB root directory under [`nwb-schema`](https://github.com/NeurodataWithoutBorders/matnwb/tree/main/nwb-schema).\n\n\n## Tutorials\n[Intro to MatNWB](https://matnwb.readthedocs.io/en/latest/pages/tutorials/intro.html)\n\n[Basic File Reading](https://matnwb.readthedocs.io/en/latest/pages/tutorials/read_demo.html) | a demo showcase for basic visualization from a DANDI dataset.\n\n[Extracellular Electrophysiology](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ecephys.html) | \n[▶️ in MATLAB Online](https://matlab.mathworks.com/open/github/v1?repo=NeurodataWithoutBorders/matnwb\u0026file=tutorials/ecephys.mlx) | \n[YouTube walkthrough](https://www.youtube.com/watch?v=W8t4_quIl1k\u0026ab_channel=NeurodataWithoutBorders)\n\n[Calcium Imaging](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ophys.html) | \n\u003ca href=\"https://matlab.mathworks.com/open/github/v1?repo=NeurodataWithoutBorders/matnwb\u0026file=tutorials/ophys.mlx\" target=\"_blank\"\u003e▶️ in MATLAB Online\u003c/a\u003e | \n[YouTube walkthrough](https://www.youtube.com/watch?v=OBidHdocnTc\u0026ab_channel=NeurodataWithoutBorders)\n\n[Intracellular Electrophysiology](https://matnwb.readthedocs.io/en/latest/pages/tutorials/icephys.html)\n\n[Behavior](https://matnwb.readthedocs.io/en/latest/pages/tutorials/behavior.html)\n\n[Optogenetics](https://matnwb.readthedocs.io/en/latest/pages/tutorials/ogen.html)\n\n[Dynamic tables](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dynamic_tables.html)\n\n[Images](https://matnwb.readthedocs.io/en/latest/pages/tutorials/images.html)\n\n[Advanced data write](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dataPipe.html)  | [YouTube walkthrough](https://www.youtube.com/watch?v=PIE_F4iVv98\u0026ab_channel=NeurodataWithoutBorders)\n\n[Using Dynamically Loaded Filters](https://matnwb.readthedocs.io/en/latest/pages/tutorials/dynamically_loaded_filters.html)\n\n[Remote read](https://matnwb.readthedocs.io/en/latest/pages/tutorials/remote_read.html)\n\n[Scratch Space](https://matnwb.readthedocs.io/en/latest/pages/tutorials/scratch.html)\n\n\n## Use Cases\n[Basic Data Retrieval](https://matnwb.readthedocs.io/en/latest/pages/tutorials/basicUsage.html)\n| showcases how one would read and process converted NWB file data to display a raster diagram.\n\n[Conversion of Real Electrophysiology/Optophysiology Data](https://matnwb.readthedocs.io/en/latest/pages/tutorials/convertTrials.html)\n| converts Electrophysiology/Optophysiology Data recorded from:\n\u003eLi, 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\nhttp://dx.doi.org/10.6080/K0RB72JW\n\nAnalysis examples will be added in the [dandi-example-live-scripts repo](https://github.com/NeurodataWithoutBorders/dandi-example-live-scripts)\n\n\n## Under the Hood\nNWB 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.\n\nCertain 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.\n\n\n## Caveats\nThe 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.\n\nFor those planning on using MatNWB alongside PyNWB, please keep the following in mind:\n - 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.\n \nThe `main` 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.\n\nThis package reads and writes NWB 2.0 files and does not support older formats.\n\n\n## Third-party Support\nThe `+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!\n\n## Contributing\nFor details on how to contribute to MatNWB, please stay tuned.\n\n## Citing NWB\n* **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\n* **RRID:** (MatNWB, RRID:SCR_021156)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodatawithoutborders%2Fmatnwb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurodatawithoutborders%2Fmatnwb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodatawithoutborders%2Fmatnwb/lists"}