snap_coords

method of dascore.core.spool.Spool source

snap_coords(
    self ,
    *coords ,
    reverse: bool = False,
    step = None,
    max_shift = None,
)-> ‘Self’

Lazily snap each patch alone, as Patch.snap_coords does as it loads.

Takes Patch.snap_coords’ arguments. Planning reads the coordinate of each patch the index states no step or a descending one for (every patch, given step or reverse), to state the snapped one, so a max_shift it breaks raises here.

Examples

import dascore as dc
spool = dc.spool([dc.get_example_patch("wacky_dim_coords_patch")])
snapped = spool.snap_coords("time")
assert snapped[0].get_coord("time").evenly_sampled