from dascore.utils.signal import get_taper
taper = get_taper("triang", (8, 8), (3, 3))
taper.shape(8, 8)
| function of dascore.utils.signal | source |
get_taper(
window: Any ,
size: tuple[int, …] ,
overlap: tuple[int, …] ,
)-> ‘np.ndarray’
Return a tile of ones with complementary ramps of overlap down every edge.
Tiles of this size laid at a stride of size - overlap and multiplied by this taper sum to exactly one everywhere they cover, so an overlap-add of them returns the signal they were cut from.
| Parameter | Description |
|---|---|
| window |
The window whose edge the ramps take; see get_window.
|
| size | The tile’s shape. |
| overlap |
How many samples each edge ramps over, per axis. Zero is a boxcar along that axis. |
numpy.ndarray A float32 array of shape size; a copy, so it may be written to.