Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
If you're using pyplot.specgram (i.e. "from pylab import *; specgram(...)"), note that the plot is in dB, hence the negative values. I'm surprised this fact isn't mentioned in the documentation: http://matplotlib.org/api/pyplot_api.html?highlight=specgram#matplotlib.pyplot.specgram However, when i

Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
Hi, If you trace back into the code further, you will see that the Pxx is computed as X = fft(x), Pxx = X * conj(X) which is real, but the data type will be complex with a ~0 imaginary part (up to floating point precision). Thus the Pxx.real is just to ensure that the resulting data type is real in

[Matplotlib-users] specgram bug

2012-11-12 Thread Paul Anton Letnes
Hi, not 100% sure this is a bug, but here goes: In file matplotlib/lib/matplotlib/mlab.py, the functions psd (power spectral density) and specgram returns the real part of the fourier transform. % grep -n Pxx.real mlab.py 390:return Pxx.real,freqs 470:Pxx = Pxx.real #Needed since helper

Re: [Matplotlib-users] specgram memory problem

2012-02-06 Thread David Craig
uname -a gives, Linux David 3.2.2-1.fc16.i686 #1 SMP Thu Jan 26 03:38:31 UTC 2012 i686 i686 i386 GNU/Linux On Mon, Feb 6, 2012 at 6:07 PM, Benjamin Root wrote: > > > On Mon, Feb 6, 2012 at 11:59 AM, David Craig wrote: > >> I'm using a lenovo laptop with fedora 16. It has 2.9 GiB memory and 4 >>

Re: [Matplotlib-users] specgram memory problem

2012-02-06 Thread Benjamin Root
On Mon, Feb 6, 2012 at 11:59 AM, David Craig wrote: > I'm using a lenovo laptop with fedora 16. It has 2.9 GiB memory and 4 > intel core CPUs @ 2.3GHz each. Available disk space is 147.9GiB. > numpy 1.6.0 > matplotlib 1.0.1 > > 32-bit or 64-bit OS? Please use 'uname -a' to tell us, because you c

Re: [Matplotlib-users] specgram memory problem

2012-02-06 Thread David Craig
I'm using a lenovo laptop with fedora 16. It has 2.9 GiB memory and 4 intel core CPUs @ 2.3GHz each. Available disk space is 147.9GiB. numpy 1.6.0 matplotlib 1.0.1 On 6 Feb 2012, at 10:29, Fabrice Silva wrote: > On Sat, Feb 4, 2012 at 9:44 AM, Fabrice Silva mrs.fr> wrote: >> Le vendre

Re: [Matplotlib-users] specgram memory problem

2012-02-06 Thread Fabrice Silva
On Sat, Feb 4, 2012 at 9:44 AM, Fabrice Silva wrote: > Le vendredi 03 février 2012 à 17:39 +, David Craig a écrit : > > sure how to get it to plot the outputs from specgram. I use > > specgram as follows, > > Pxx, freqs, bins, im = plt.specgram(..) >

Re: [Matplotlib-users] specgram memory problem

2012-02-04 Thread Fabrice Silva
Le vendredi 03 février 2012 à 17:39 +, David Craig a écrit : > sure how to get it to plot the outputs from specgram. I use > specgram as follows, > Pxx, freqs, bins, im = plt.specgram(..) > what am I trying imshow?? plt.specgram computes the spectrogram and when calls imshow to display t

Re: [Matplotlib-users] specgram memory problem

2012-02-03 Thread Fabrice Silva
Le vendredi 03 février 2012 à 12:11 +, David Craig a écrit : > Hi, I am using matplotlib to produce some spectrograms for seismic > data. I am looking at a 10 day period with a sample rate of 20sps. I > would like to have my spectrogram to be composed of 10 minute windows > with an overlap of 9

[Matplotlib-users] specgram memory problem

2012-02-03 Thread David Craig
Hi, I am using matplotlib to produce some spectrograms for seismic data. I am looking at a 10 day period with a sample rate of 20sps. I would like to have my spectrogram to be composed of 10 minute windows with an overlap of 90%. However when I try and run my script I run out of memory. I can produ

[Matplotlib-users] specgram

2012-02-01 Thread David Craig
Hi, I am trying to produce a spectrogram for my data set and am having an issue with the color map. My data is filtered between 0.02 and 1.0Hz, but specgram() produces an image in the range 0 to 10Hz. Also the color map is not set properly. I would like to have it so the colormap ranges from th

[Matplotlib-users] specgram with zeros array

2011-01-14 Thread Gus
I am using Matplotlib version 1.0.1 and I get errors if I try the following: import matplotlib.pyplot as plt import numpy as np plt.specgram(np.zeros(50)) I have pasted the error output below, but hopefully it would reproduce in other systems. I'm not sure if this is intended behavior and was w

Re: [Matplotlib-users] specgram: Warning: divide by zero encountered in log10

2007-03-28 Thread John Hunter
On 3/28/07, Niklas Saers <[EMAIL PROTECTED]> wrote: > Hi guys, > I'm trying to make a specgram() for some wave samples that I have read into > 'data' using pyaudiolab's read_frames() (put into wavread()) > > When I do > > from wavread import * > from pylab import * > from statistics import * > > da

[Matplotlib-users] specgram: Warning: divide by zero encountered in log10

2007-03-28 Thread Niklas Saers
Hi guys, I'm trying to make a specgram() for some wave samples that I have read into 'data' using pyaudiolab's read_frames() (put into wavread()) When I do from wavread import * from pylab import * from statistics import * data, datasize, samplerate, channels = wavread("myfile.wav") specgram