Skip to content

Documents · Verb reference

aoi_signature

Summarize an AOI cube into a named spatial-unit time signature.

Callable type: Grammar verb / pipe stage · Browse: compatibility

Compatibility / legacy: Compatibility name: prefer block_signature for new workflows; its block_id/block dimension differs from unit_id/unit.

Usage

from cubedynamics import verbs as v
v.aoi_signature(*, unit_id, variables=None, time_dim=None, spatial_dims=None, reducer='median', unit_dim='unit', skipna=True)

Arguments

Argument Meaning Default
unit_id See implementation docstring below; no parameter-specific description supplied. required
variables See implementation docstring below; no parameter-specific description supplied. None
time_dim See implementation docstring below; no parameter-specific description supplied. None
spatial_dims See implementation docstring below; no parameter-specific description supplied. None
reducer See implementation docstring below; no parameter-specific description supplied. 'median'
unit_dim See implementation docstring below; no parameter-specific description supplied. 'unit'
skipna See implementation docstring below; no parameter-specific description supplied. True

Accepts

Reducer verb that keeps time and adds a length-one unit dimension. This is the first step toward pairwise and many-unit spatial meta-analysis.

Returns

Reducer verb that keeps time and adds a length-one unit dimension. This is the first step toward pairwise and many-unit spatial meta-analysis.

Order / grammar behavior

Reducer verb that keeps time and adds a length-one unit dimension. This is the first step toward pairwise and many-unit spatial meta-analysis.

Minimal example

Run from the repository root after python -m pip install -e '.[vignettes]'. Uses the checked observational PRISM fixture; no network is required.

from pathlib import Path
import xarray as xr
import matplotlib.pyplot as plt
from cubedynamics import pipe, verbs as v

# Frozen, reviewed PRISM observations; run from the repository root.
path = Path("tests/fixtures/real_data/prism_boulder_january_2024.nc")
with xr.open_dataset(path, engine="scipy") as observed:
    cube = observed["tmax"].load()
assert cube.attrs["units"] == "degC"

result = (pipe(cube) | v.aoi_signature(unit_id="boulder")).unwrap()
result["tmax"].squeeze().plot()
plt.show()

Works with

Reducer verb that keeps time and adds a length-one unit dimension. This is the first step toward pairwise and many-unit spatial meta-analysis.

See also

Implementation notes

No additional implementation notes in the current docstring.

Implementation source. Signatures and descriptions on this page are generated from this checkout, not hand-maintained copies.