discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] math range error?


From: Martin Dvh
Subject: Re: [Discuss-gnuradio] math range error?
Date: Tue, 21 Feb 2006 17:12:06 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

Eric Blossom wrote:
> On Mon, Feb 20, 2006 at 01:09:17PM -0800, joe j wrote:
> 
>>Hi everyone,
>>    I'm currently working on angle manipulation from "Angle manipulation & 
>> other concerns" (earlier postings).  Whenever I use scopesink.py and 
>> fftsink.py functions to graph data, I getting math range error - not sure 
>> why.  Here's the exact error message I got:
>> Traceback (most recent call last):
>>   File "/root/gr/lib/python2.4/site-packages/gnuradio/wxgui/scopesink.py", 
>> line 399, in format_data
>>     self.Draw (graphics, xAxis=x_range, yAxis=self.y_range)
>>   File "/root/gr/lib/python2.4/site-packages/gnuradio/wxgui/plot.py", line 
>> 879, in Draw
>>     graphics.scaleAndShift(scale, shift)
>>   File "/root/gr/lib/python2.4/site-packages/gnuradio/wxgui/plot.py", line 
>> 356, in scaleAndShift
>>     o.scaleAndShift(scale, shift)
>>   File "/root/gr/lib/python2.4/site-packages/gnuradio/wxgui/plot.py", line 
>> 149, in scaleAndShift
>>     self.scaled = scale*self.points+shift
>> OverflowError: math range error
> 
> 
> You're probably trying to plot some NaN's or Inf's.  Not sure where
> they might come from (division?).  On the other hand, if what you're
> trying to get is the angle, just run the output the multiplier into
> gr.complex_to_arg().  No need for mag or div.
I also had a lot of these when I was doing things like this.
I think it has the same cause as why the scopesink autoscaling started at +1e31 
many times.
For some reason the first few samples of usrp_source_c sometimes has strange 
values (very big, Nan, inf)
I don't know if it is some uninitialized buffer or something else.

As a workaround I sometimes use 
gr.skiphead(gr.sizeof_gr_complex,numberofsamplestoskip) to skip the first few 
thousand samples of the usrp.

Although I noticed that you get errors when numberofsamplestoskip is greater 
then 4000.
(Probably the proper use of history has to be updated in gr.skiphead)

Another workaround is capturing to file and using dd to skip the first 32 
ksamples


greetings,
Martin

> 
> Eric
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]