Documents · Verb reference
synchrony_signature
Reduce local pairs within declared fixed supports.
Callable type: Grammar verb / pipe stage · Browse: Synchrony and comparison
Usage
from cubedynamics import verbs as v
v.synchrony_signature(*, radii_km=(25.0, 50.0, 75.0, 100.0), include_directional=True)
Arguments
| Argument | Meaning | Default |
|---|---|---|
| radii_km | Positive, strictly increasing cumulative supports no larger than the pair table's observation radius. | (25.0, 50.0, 75.0, 100.0) |
| include_directional | Include compact eight-sector Delta diagnostics. | True |
Accepts
A sparse pair Dataset produced by v.local_synchrony_pairs(...).
Returns
A baseline compression Dataset of exact nested-radius cold median, warm median, pairwise-Delta median/IQR, counts, coverage, and compact directional diagnostics.
Order / grammar behavior
Use as a compression baseline, not as the local scientific object or an inferred synchrony scale. Cumulative statistics are evaluated from retained pairs.
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.synchrony_signature(radii_km=(10, 20, 30))).unwrap()
result["delta_median"].isel(time_window_end=0).plot(col="radius_km", cmap="RdBu", center=0, cbar_kwargs={"label": "Median Delta S · red warm / blue cold"})
plt.show()
Works with
A sparse pair Dataset produced by v.local_synchrony_pairs(...).
See also
Implementation notes
The output is useful for comparison, compression, mapping, compatibility, and sensitivity analysis. It does not define the local synchrony surface or infer a characteristic synchrony scale.
Implementation source. Signatures and descriptions on this page are generated from this checkout, not hand-maintained copies.