(self, x=None, n_fft=256, step=None, fs=1., window='hann',
normalize=False, color_scale='log', cmap='cubehelix',
clim='auto')
| 41 | """ |
| 42 | |
| 43 | def __init__(self, x=None, n_fft=256, step=None, fs=1., window='hann', |
| 44 | normalize=False, color_scale='log', cmap='cubehelix', |
| 45 | clim='auto'): |
| 46 | self._x = np.asarray(x) |
| 47 | self._n_fft = int(n_fft) |
| 48 | self._step = step |
| 49 | self._fs = float(fs) |
| 50 | self._window = window |
| 51 | self._normalize = normalize |
| 52 | self._color_scale = color_scale |
| 53 | |
| 54 | if clim == 'auto': |
| 55 | self._clim_auto = True |
| 56 | else: |
| 57 | self._clim_auto = False |
| 58 | |
| 59 | if not isinstance(self._color_scale, str) or \ |
| 60 | self._color_scale not in ('log', 'linear'): |
| 61 | raise ValueError('color_scale must be "linear" or "log"') |
| 62 | |
| 63 | data = self._calculate_spectrogram() |
| 64 | super(SpectrogramVisual, self).__init__(data, clim=clim, cmap=cmap) |
| 65 | |
| 66 | @property |
| 67 | def freqs(self): |
nothing calls this directly
no test coverage detected