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(
*args ,
)-> None
Invert a short-time fourier transform.
The patch must be one returned by 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.
See Also
Methods
| Name | Description |
|---|---|
| check | Refuse a patch stft did not make, or made past inverting. |
| chunk_contract | Return what a chunk of the output needs of the input, or None. |
| get_metadata | Return the reassembled metadata, and how to invert each window. |
| halo | Return how far along an axis the kernel reads to fill a sample. |
| model_copy | Copy the model, dropping cached values the update invalidates. |
| new | Create new instance with some attributed updated. |
| numpy_kernel | Return each window’s inverse, blended back by reassemble. |
| istft | Invert a short-time fourier transform. |
| reconcile | Return metadata or a patch holding the final data; default as is. |
| run | Run the operation: check, get_metadata, kernel, reconcile, record. |