Reassemble

class of dascore.proc.tile_apply
inherits from: PatchProcessor, DascoreBaseModel, pydantic.main.BaseModel
source

Reassemble(
    *args ,
    taper: Any = None,
)-> None

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

The inverse of tile_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 tile_apply stacked.
taper The window whose edge the taper ramps take; see tile_apply. 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.tile_apply(lambda x: x, mode="stack", time=0.2, samples=False)
assert tiles.reassemble().equals(patch, close=True)

Methods

Name Description
check Refuse a patch which does not carry what the operation needs.
chunk_contract Return what a chunk of the output needs of the input, or None.
get_metadata Return the patch the tiles came from, and where each tile goes.
model_copy Copy the model, dropping cached values the update invalidates.
new Create new instance with some attributed updated.
numpy_kernel Return the tiles blended back under their weights.
reassemble Blend a stack of tiles back into the patch they were cut from.
reconcile Return metadata or a patch holding the final data; default as is.
run Run the operation: check, get_metadata, kernel, reconcile, record.