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 *
>
> data, datasize, samplerate, channels = wavread("myfile.wav")
> specgram(data)
>
> I get:
> Warning: divide by zero encountered in log10
> (array([[  2.26730611e-02,   1.51890672e-02,   7.78123371e-03, ...,
>           0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
>        [  9.11969843e-03,   2.81931459e-03,   3.13995580e-03, ...,


So there is no traceback, just a warning?

Perhaps you could pickle or otherwise store "data" and write a simple
test script which doesn't depend on any external packages (eg
waveread)  and post a link to the files and we'll take a look.  My
guess is that there is some frequency that has no power and the call
to Z = 10*log10(Pxx) is failing because Pxx is zero for that
frequency.  We've seen this before, and if anyone has a suggestion on
how this case *should* be handled, I'd be happy to hear some
suggestions.

JDH

JDH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to