Skip to content

Commit

Permalink
tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Dec 4, 2023
1 parent a0eeb39 commit bd3bb42
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/gallery/plot_nwb_zarrio.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from datetime import datetime
from dateutil.tz import tzlocal
import zarr

import numpy as np
from pynwb import NWBFile
Expand Down Expand Up @@ -142,3 +143,15 @@
# relative ``path`` here instead is fine.
with NWBZarrIO(path=absolute_path, mode="r") as io:
infile = io.read()

###############################################################################
# Consolidating Metadata
# ----------------------
# When writing to Zarr, the metadata within the file will be consolidated into a single
# file within the root group, `.zmetadata`. Users who do not wish to consolidate the
# metadata can set the boolean parameter `consolidate_metadata` to `False` within `write`.
# Even when the metadata is consolidated, the metadata natively within the file can be altered.
# Any alterations within would require the user to call `zarr.convenience.consolidate_metadata()`
# to sync the file with the changes. Please refer to the Zarr documentation for more details:
# https://zarr.readthedocs.io/en/stable/tutorial.html#storage-alternatives
zarr.consolidate_metadata(path)

0 comments on commit bd3bb42

Please sign in to comment.