Skip to content

Conventions

lazymerge.SpatialAttrs dataclass

lazymerge.ProjAttrs dataclass

lazymerge.OverviewLevel dataclass

lazymerge.read_spatial

read_spatial(node: Group | Array) -> SpatialAttrs

lazymerge.write_spatial

write_spatial(node: Group | Array, attrs: SpatialAttrs) -> None

lazymerge.read_proj

read_proj(node: Group | Array) -> ProjAttrs

lazymerge.write_proj

write_proj(node: Group | Array, attrs: ProjAttrs) -> None

lazymerge.read_multiscales

read_multiscales(
    group: Group, native_res: float | None = None
) -> list[OverviewLevel] | None

Parse the zarr multiscales convention from a group.

Returns overview levels (excluding the base level) ordered finest to coarsest, or None if no multiscales attribute exists.

Args: group: Zarr group that has the multiscales attribute. native_res: Base-level pixel resolution. If not provided, it is read from the base array referenced in the layout (which must be a direct child of group).

lazymerge.chunk_bbox

chunk_bbox(
    spatial_attrs: SpatialAttrs,
    chunk_coords: tuple[int, ...],
    chunk_shape: tuple[int, ...],
) -> tuple[float, float, float, float]