hdmf_zarr.nwb module
Module with Zarr backend for NWB for integration with PyNWB
- class hdmf_zarr.nwb.NWBZarrIO(path, mode, manager=None, synchronizer=None, object_codec_class=None, storage_options=None, force_overwrite=False, load_namespaces=True, extensions=None)
Bases:
ZarrIOIO backend for PyNWB for writing NWB files
This class is similar to the
NWBHDF5IOclass in PyNWB. The main purpose of this class is to perform default setup for BuildManager, loading or namespaces etc., in the context of the NWB format.- Parameters:
path (
strorPathorDirectoryStoreorTempStoreorNestedDirectoryStore) – the path to the Zarr file or a supported Zarr storemode (
str) – the mode to open the Zarr file with, one of (“w”, “r”, “r+”, “a”, “r-“). the mode r- is used to force open without consolidated metadata in read only mode.manager (
BuildManager) – the BuildManager to use for I/Osynchronizer (
ProcessSynchronizerorThreadSynchronizerorbool) – Zarr synchronizer to use for parallel I/O. If set to True a ProcessSynchronizer is used.object_codec_class (None) – Set the numcodec object codec class to be used to encode objects.Use numcodecs.pickles.Pickle by default.
storage_options (
dict) – Zarr storage options to read remote foldersforce_overwrite (
bool) – force overwriting existing object when in ‘w’ mode. The existing file or directory will be deleted when before opening (even if the object is not Zarr, e.g,. an HDF5 file)load_namespaces (
bool) – whether or not to load cached namespaces from given path - not applicable in write modeextensions (
strorTypeMaporlist) – a path to a namespace, a TypeMap, or a list consisting paths to namespaces and TypeMaps
- export(src_io, nwbfile=None, write_args={})
- static read_nwb(path)
Helper factory method for reading an NWB file and return the NWBFile object
- Parameters:
path (
strorPathorDirectoryStoreorTempStoreorNestedDirectoryStore) – the path to the Zarr file or a supported Zarr store