Schema¶
The schema module creates Zarr output templates from pipeline configuration. Column definitions, types, and fill values are read from the YAML config's aggregation section.
Zarr Template¶
zagg.schema.xdggs_spec ¶
xdggs_spec(
parent_order: int, child_order: int, config: PipelineConfig | None = None
) -> GroupSpec
Create a pydantic_zarr.experimental.v3.GroupSpec for aggregation data using HEALPix/Morton indexing.
Parameters:
-
parent_order(int) –HEALPix order of parent morton cells
-
child_order(int) –HEALPix order of child morton cells (must be >= parent_order)
-
config(PipelineConfig or None, default:None) –Pipeline configuration. Falls back to
default_config("atl06").
Returns:
-
GroupSpec–Xdggs compatible group spec
Raises:
-
ValueError–If child_order < parent_order
zagg.schema.xdggs_zarr_template ¶
xdggs_zarr_template(
store: Store,
parent_order: int,
child_order: int,
n_parent_cells: int | None = None,
overwrite: bool = False,
config: PipelineConfig | None = None,
) -> Store
Create a Zarr template for data aggregation data using HEALPix/Morton indexing.
Parameters:
-
store(Store) –Zarr-compatible store (from zarr.abc.store)
-
parent_order(int) –HEALPix order of parent morton cells
-
child_order(int) –HEALPix order of child morton cells (must be >= parent_order)
-
n_parent_cells(int, default:None) –Number of parent cells containing data
-
overwrite(bool, default:False) –Whether to overwrite an existing array or group at the path. Defaults to False.
-
config(PipelineConfig or None, default:None) –Pipeline configuration. Falls back to
default_config("atl06").
Returns:
-
Store–The same store, with template written to path '{child_order}/'
Types¶
zagg.schema.ProcessingMetadata ¶
Bases: TypedDict