Skip to content

Documents · Verb reference

rolling_tail_dep_vs_center

Return a rolling "tail dependence vs center" contrast along dim.

Callable type: Grammar verb / pipe stage · Browse: Synchrony and comparison

Usage

from cubedynamics import verbs as v
v.rolling_tail_dep_vs_center(window, *, dim='time', min_periods=5, tail_quantile=0.8)

Arguments

Argument Meaning Default
window Rolling window size in number of time steps. required
dim Dimension to roll over (default: "time"). 'time'
min_periods Minimum periods in window required to compute the statistic. 5
tail_quantile Quantile threshold defining the upper tail (default: 0.8). 0.8

Accepts

Consult the input parameters and implementation notes below. This namespace also includes direct helpers, not only pipe factories.

Returns

The public docstring does not specify a return contract. Do not assume a pipe-ready return; consult the linked implementation.

Order / grammar behavior

A pipe passes the preceding result to the next callable. Confirm that the previous step's dimensions and semantic state satisfy the input contract. Reductions can remove dimensions; plotting may produce side effects.

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.rolling_tail_dep_vs_center(window=7)).unwrap()
result.isel(time=-1).plot()
plt.show()

Works with

Use only the input types documented by this callable; not every helper accepts every noun or VirtualCube.

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.