# vispy.visuals.spectrogram module

class vispy.visuals.spectrogram.SpectrogramVisual(x=None, n_fft=256, step=None, fs=1.0, window='hann', normalize=False, color_scale='log', cmap='cubehelix', clim='auto')

  Bases: `ImageVisual`

  Calculate and show a spectrogram

  Parameters:
    x array-like

      1D signal to operate on. `If len(x) < n_fft`, x will be zero-padded to length `n_fft`.

    n_fft int

      Number of FFT points. Much faster for powers of two.

    step int | None

      Step size between calculations. If None, `n_fft // 2` will be used.

    fs float

      The sample rate of the data.

    window str | None

      Window function to use. Can be `'hann'` for Hann window, or None for no windowing.

    normalize bool

      Normalization of spectrogram values across frequencies.

    color_scale{‘linear’, ‘log’}

      Scale to apply to the result of the STFT. `'log'` will use `10 * log10(power)`.

    cmap str

      Colormap name.

    clim str | tuple

      Colormap limits. Should be `'auto'` or a two-element tuple of min and max values.

  property color_scale

    The color scale

  property freqs

    The spectrogram frequencies

  property fs

    The sampling frequency

  property n_fft

    The length of fft window

  property normalize

    The normalization setting

  property step

    The step of fft window

  property window

    The used window function

  property x

    The original signal

previous

vispy.visuals.scrolling_lines module

next

vispy.visuals.sphere module