plaid.storage.zarr.bridge ========================= .. py:module:: plaid.storage.zarr.bridge .. autoapi-nested-parse:: Zarr bridge utilities. This module provides utility functions for bridging between PLAID samples and Zarr storage format. It includes functions for key transformation and sample data conversion. Functions --------- .. autoapisummary:: plaid.storage.zarr.bridge.unflatten_zarr_key plaid.storage.zarr.bridge.to_var_sample_dict plaid.storage.zarr.bridge.sample_to_var_sample_dict Module Contents --------------- .. py:function:: unflatten_zarr_key(key: str) -> str Unflattens a Zarr key by replacing underscores with slashes. :param key: The flattened key with underscores. :type key: str :returns: The unflattened key with slashes. :rtype: str .. py:function:: to_var_sample_dict(zarr_dataset: zarr.Group, idx: int) -> dict[str, Any] Extracts a sample dictionary from a Zarr dataset by index. :param zarr_dataset: The Zarr group containing the dataset. :type zarr_dataset: zarr.Group :param idx: The sample index to extract. :type idx: int :returns: Dictionary of variable features for the sample. :rtype: dict[str, Any] .. py:function:: sample_to_var_sample_dict(zarr_sample: dict[str, Any]) -> dict[str, Any] Converts a Zarr sample to a variable sample dictionary. :param zarr_sample: The raw Zarr sample data. :type zarr_sample: dict[str, Any] :returns: The processed variable sample dictionary. :rtype: dict[str, Any]