3. NWB APIs: PyNWB & MatNWB
===========================
The NWB team develops and supports APIs in Python
(`PyNWB `_)
and MATLAB (`MatNWB `_),
which guide users in reading and writing NWB files.
The features of these two APIs are very similar to each other, so choose
whichever is more convenient. Note that most of the high-level conversion
tools use PyNWB, but the APIs are interchangeable and there should be no
problem with writing data using MatNWB even if you plan to read it using
PyNWB later (or vice versa). Below is a table of the available tutorials
illustrating the end-to-end conversion of common data types in each imaging
modality:
.. list-table::
:header-rows: 1
* -
- PyNWB
- MatNWB
* - Reading NWB files
- `tutorial `__
- `tutorial `__
`15 min video `__
* - Writing extracellular electrophysiology
- `tutorial `__
`23 min video `__
- `tutorial `__
`46 min video `__
* - Writing intracellular electrophysiology
- `tutorial `__
- `tutorial `__
* - Writing calcium imaging
- `tutorial `__
`31 min video `__
- `tutorial `__
`39 min video `__
* - Advanced I/O
- `tutorials `__
`26 min video `__
- `tutorial `__
`16 min video `__
These tutorials walk you through the most common data types of each of the modalities.
With the tutorials for domain-specific conversion, extensions, advanced I/O,
and the documentation for proprietary formats, you have all of the tools to
create your own conversion. However, writing a full-fledged conversion script from
the ground up with MatNWB and PyNWB is time-intensive, error-prone, and requires
detailed knowledge of the source format. That is why, in the next section, we
will introduce automated conversion tools that work on a large number of supported
proprietary formats.