I want to use kaiser window that's part of numpy for drawing spectrogram specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, **kwargs)
*window*: callable or ndarray A function or a vector of length *NFFT*. To create window vectors see :func:`window_hanning`, :func:`window_none`, :func:`numpy.blackman`, :func:`numpy.hamming`, :func:`numpy.bartlett`, :func:`scipy.signal`, :func:`scipy.signal.get_window`, etc. The default is :func:`window_hanning`. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. So I tried: Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser, noverlap=2) TypeError: kaiser() takes exactly 2 arguments (1 given) Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser(x, 8), noverlap=2) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=blackman, noverlap=2) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Can someone help? Thanks
------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users