with_runs

function of dascore.utils.chunk_plan source

with_runs(
    df ,
    dim: str ,
    indexed ,
    read ,
    modified = False,
    key = _patch_row,
)

The relation with each row cut into its coordinate’s segments.

indexed maps a _patch_row to the run records its index states (None where it stored the coordinate without them), and read returns a row’s coordinate in that case. Each segment is the row with the segment’s envelope and step, clipped to the row’s own envelope, so a selection trims it; a row none of whose segments survive the clip lies in a gap and is dropped. modified marks the stretches to load as selections of their patch, and coalesce_runs reads the stretches landing in one output back as one member. key names the column indexed is keyed by.