Adaptive specshow
See original GitHub issueIs your feature request related to a problem? Please describe.
#1326 introduced an accelerated display for waveforms that switches between downsampled envelope plots and sample-precise step plots depending on the range of the viewport. This makes me wonder if we could do something similar for spectrograms and other dense (meshgrid) visualizations?
The motivation here is efficiently visualizing long, dense signals. Interactive mode can be pretty sluggish when zooming or panning over quadmeshes, and much of the time we may not even need that degree of precision.
Describe the solution you’d like
We could do something like the AdaptiveWaveplot
object. There could be an upper-bound N
on the number of pixels on screen at any time, and the underlying image is constructed by interpolating the spectrogram at N
points. Whenever the viewport changes (zoom or pan), the mesh can be re-interpolated. The bounds could also be axis-separable, which might be helpful for things like chromagrams that are low-resolution vertically but potentially high-resolution horizontally.
Describe alternatives you’ve considered
Our current specshow
is fine for most applications, but it doesn’t scale very well. My usual workaround is to display a slice of the spectrogram instead of zooming into the full spectrogram.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top GitHub Comments
scipy 1.9.0 was released, so this is no longer blocked. Once the builds hit conda-forge, I’ll see if my prototype works. At that point, we can decide whether to move forward with this feature for 0.10 or not.
Confirmed, everything seems to work.