reassemble

function of dascore.proc.tile_apply source

reassemble(
    self ,
    taper: Any = None,
)-> ‘Self’

Blend a stack of tiles back into the patch they were cut from.

The inverse of Patch.window(...).apply in "stack" mode: each tile is multiplied by a taper with complementary ramps and added at its private sample index, so a stack which was not changed returns the original patch exactly. Public {dim}_start and {dim}_stop describe physical cell edges, not reconstruction indices.

Parameters

Parameter Description
patch A patch Patch.window(...).apply stacked.
taper The window whose edge the taper ramps take; see Patch.window. Hann
when not given. A stack cut with an analysis window is blended under
that window’s dual instead, and takes no taper.

Examples

import dascore as dc
patch = dc.get_example_patch()
tiles = patch.window(time=0.2).apply(lambda x: x, mode="stack")
assert tiles.reassemble().equals(patch, close=True)