discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Rounding Error between Python and C++ Blackmanharris


From: Tommy Tracy
Subject: [Discuss-gnuradio] Rounding Error between Python and C++ Blackmanharris Window
Date: Sun, 3 Nov 2013 22:34:39 -0500

Dear GNU Radio,

This is most likely a shortcoming of how python handles significant digits, but I wanted to point out that creating a Blackmanharris window in Python and C++ result in different results.

In Python:
window = fft.blackmanharris(1024)

In c++:
const std::vector< float >  window = gr::filter::firdes::window(gr::filter::firdes::WIN_BLACKMAN_HARRIS, 1024, NULL);


I have attached an image of two plots. The first plot is of the two windows on top of each other (green and blue), and the second is of their difference:
         differences = python_values - cpp_values;

I was wondering why my c++ and python application were getting different results, and I have found the cause.
--
    Sincerely,
Tommy Tracy II
        UVA

Attachment: Blackmanharris.png
Description: PNG image


reply via email to

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