discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] math range error?


From: joe j
Subject: [Discuss-gnuradio] math range error?
Date: Mon, 20 Feb 2006 13:09:17 -0800 (PST)

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

It seems like there's a bug in my code (or I'm missing something):
        src1 = gr.file_source(gr.sizeof_gr_complex, options.input_first_file, True)
        src2 = gr.file_source(gr.sizeof_gr_complex, options.input_second_file, True)
        dst = gr.file_sink(gr.sizeof_gr_complex, options.output_file)       

        c2mag = gr.complex_to_mag()
        f2c = gr.float_to_complex()
               
        conj = gr.conjugate_cc()
        mult = gr.multiply_cc()
        div = gr.divide_cc()

        self.connect(src1, (mult, 0))
        self.connect(src2, conj, (mult, 1))
        self.connect(src2, c2mag)
        self.connect(mult, (div, 0))
        self.connect(c2mag, f2c, (div, 1))
        self.connect(div, dst)

Thanks,
JC

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


reply via email to

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