From DAS to Zarr
Completion requirements
This notebook demonstrates how to load data from an HDF5 file, convert it to a Zarr array, and then visualise it.
Steps covered:
- Setting up: Installing the zarr library and importing necessary packages;
- Data Loading: Downloading an HDF5 data file from a URL and loading it into an in-memory buffer;
- HDF5 Inspection: Opening the HDF5 file and inspecting its 'data' group and 'header' metadata to extract important parameters like time, channels, and units;
- Zarr Conversion: Creating a
zarr.storage.MemoryStoreand converting the HDF5 data into an Xarray Dataset, which is then saved to the Zarr store with specified chunking; - Zarr Access and Visualization: Demonstrating how to
open and access the Zarr array directly or as an Xarray Dataset. Finally, it visualises slices of the data using
matplotlib.pyplot.imshow, showing the strain rate over time and channel.
Click on From DAS to Zarr to open the resource.