function of dascore.proc.basic source

    patch ,
    samples = False,
    update_coord = False,
    **kwargs ,

Roll patch array elements along a given dimension.


Parameter Description
patch input patch
samples if True, value indicates coordinate or value of dimension
update_coord if True, updates coord based on rolled amount
**kwargs specifies dimension and number of elements to roll


import dascore as dc
patch = dc.get_example_patch()
# roll time dimension 5 elements
rolled_patch = patch.roll(time=5, samples=True)
# roll distance dimension 30 meters(or units of distance in patch)
rolled_patch2 = patch.roll(distance=30, samples=False)
# roll time dimension 5 elements and update coordinates
rolled_patch3 = patch.roll(time=5, samples=True, update_coord=True)