import dascore as dc
from dascore.units import second
patch = dc.get_example_patch("chirp")
# Simple stft with 10 second window and 4 seconds overlap
pa1 = patch.stft(time=10*second, overlap=4*second)
pa2 = pa1.istft()
assert pa2.equals(patch, close=True)istft
istft(
patch ,
)-> ‘dc.Patch’
Invert a short-time fourier transform.
Parameters
| Parameter | Description |
|---|---|
| patch | A patch return from stft. |
Examples
Note
- Each window’s spectrum is inverted and the windows are blended back by Patch.reassemble, under the dual of the taper they were cut with, so the coordinates the stft carried come back with them – those along the transformed dimension included.
- Coordinates associated with the frequency dimension the stft created are dropped, since it does not survive the inverse. idft behaves the same way.