Documents · Verb reference
landscape_change_signature
Compare complete neighboring center landscapes along separate axes.
Callable type: Grammar verb / pipe stage · Browse: Synchrony and comparison
Usage
from cubedynamics import verbs as v
v.landscape_change_signature(*, metric='delta_s', deadband=0.02, near_tie_epsilon=0.005, min_overlap=25)
Arguments
| Argument | Meaning | Default |
|---|---|---|
| metric | Pair field used to build each center landscape. | 'delta_s' |
| deadband | Absolute interval around zero treated as neutral for sign comparisons. | 0.02 |
| near_tie_epsilon | Tolerance used to report near-tied values in rank diagnostics. | 0.005 |
| min_overlap | Minimum shared comparison locations required for a landscape pair. | 25 |
Accepts
A sparse pair Dataset that retains enough neighboring center landscapes for the requested overlap threshold.
Returns
Separate east-west and north-south magnitude, rank, deadbanded sign, gradient, range, and valid-overlap diagnostics; it does not create one composite index.
Order / grammar behavior
This is a branch from pair relationships, not a reduction of stack heterogeneity. Keep both products distinct.
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"
with xr.open_dataset(path, engine="scipy") as observed:
temperature = observed[["tmin", "tmax"]].isel(y=slice(0, 12), x=slice(0, 12)).load()
pairs = (pipe(temperature) | v.local_synchrony_pairs(lower_var="tmin", upper_var="tmax", max_radius_km=30, window_days=30, min_t=3)).unwrap()
result = (pipe(pairs) | v.landscape_change_signature(metric="delta_s", min_overlap=3)).unwrap()
result["normalized_rmse"].plot(col="orientation")
plt.show()
Works with
A sparse pair Dataset that retains enough neighboring center landscapes for the requested overlap threshold.
See also
Implementation notes
This compares complete M_i(j) fields as the center moves. It is not
pair synchrony, within-surface structure, or geographic change in one
already-reduced focal summary.
Implementation source. Signatures and descriptions on this page are generated from this checkout, not hand-maintained copies.