# Working with WFM sample data

**URL:** <https://www.ruby-forum.com/t/working-with-wfm-sample-data/216813>\
**Category:** GNU Radio\
**Created:** [February 14, 2012, 9:03pm UTC](https://www.ruby-forum.com/t/working-with-wfm-sample-data/216813 "2012-02-14T21:03:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 14, 2012, 9:03pm UTC](https://www.ruby-forum.com/t/working-with-wfm-sample-data/216813/1 "2012-02-14T21:03:57Z")

</div>

hello!

i’m a new user embarking on some exploration to evaluate GNUradio and  
the USRP platform for some multichannel radio monitoring. i am starting  
with sample file processing before buying any hardware, as CPU usage is  
my chief concern.

my problem is with using a large sample file captured from the FM  
broadcast-band: i can’t get it to work with the simplest of graphs in  
GRC. i was able to use Sharlene Katz’s handy GRC tutorials to get her  
AM sample file running through an FFT scope and demodulated to audio, so  
i know my GNUradio install is working. however, running my WFM sample  
file results in no activity on the FFT scope, and i get errors when  
mousing over the FFT window.

the sample file was described to me as 32-bit complex IQ baseband,  
98.0MHz center, 25Msps, gain 30 from an N200r4 + WBX. to try a very  
simple graph, i loaded it in to the GRC like this:  
[File Source (complex)]  
-\> [Throttle (complex, 25M)]  
-\> [FFT Sink (complex, 25M rate, baseband 98M)]

running this graph results in an FFT scope with no activity; cutting  
the sample rates to 250k has no effect. if i mouse over the FFT window  
i get this error:

* * *

Traceback (most recent call last):  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/plotter\_base.py”,  
line 187, in \_on\_paint  
for fcn in self.\_draw\_fcns: fcn1  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/plotter\_base.py”,  
line 59, in draw  
self.\_draw()  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/grid\_plotter\_base.py”,  
line 395, in \_draw\_point\_label  
label\_str = self.\_populate\_point\_label(x\_val, y\_val)  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/channel\_plotter.py”,  
line 150, in \_populate\_point\_label  
label\_str += ‘\n%s: %s’%(channel, common.eng\_format(y\_value,  
self.y\_units))  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,  
line 82, in eng\_format  
coeff, exp, prefix = get\_si\_components(num)  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,  
line 48, in get\_si\_components  
exp = get\_exp(num)  
File  
“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,  
line 37, in get\_exp  
return int(math.floor(math.log10(abs(num))))  
ValueError: cannot convert float NaN to integer

* * *

relevant info: GNUradio 3.3.0, Python 2.6, Mac OS 10.7.3, MacPorts  
install. sample data is stored on an internal hard drive.

this seems like a pretty simple task, so there’s either something  
simple i’m missing or there’s a bug or misconfiguration in my install.  
any help would be appreciated - i’ve got a lot to figure out with this  
file, but i can’t seem to get past this step.

thank you,

- emilio gonzalez  
KI6NVO

---

<div class="post-metadata">

**Author:** ![emilio\_gonzalez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7ea924/32.png) [@emilio\_gonzalez](https://www.ruby-forum.com/u/emilio_gonzalez)\
**Post date:** [February 14, 2012, 9:20pm UTC](https://www.ruby-forum.com/t/working-with-wfm-sample-data/216813/2 "2012-02-14T21:20:06Z")

</div>

It’s very likely that your on-disk sample format isn’t what you’ve  
declared to Gnu Radio, and it’s seeing some garbage numbers.

Is it  
possible that it’s stored as 16-bit I 16-bit Q in the file? If so,  
you’ll need to convert it before any of your complex-float blocks do  
anything with it.

On Tue, 14 Feb 2012 12:02:34 -0800, emilio gonzalez  
wrote:

> hello!
> 
> i’m a new user embarking on some exploration to  
> evaluate GNUradio and  
> the USRP platform for some multichannel radio  
> monitoring. i am starting  
> with sample file processing before buying  
> any hardware, as CPU usage is  
> my chief concern.
> 
> my problem is  
> with using a large sample file captured from the FM  
> broadcast-band: i  
> can’t get it to work with the simplest of graphs in  
> GRC. i was able  
> to use Sharlene Katz’s handy GRC tutorials to get her  
> AM sample file  
> running through an FFT scope and demodulated to audio, so  
> i know my  
> GNUradio install is working. however, running my WFM sample  
> file  
> results in no activity on the FFT scope, and i get errors when

mousing over the FFT window.

> the sample file was described to me as  
> 32-bit complex IQ baseband,  
> 98.0MHz center, 25Msps, gain 30 from an  
> N200r4 + WBX. to try a very  
> simple graph, i loaded it in to the GRC  
> like this:  
> [File Source (complex)]  
> → [ Throttle (complex, 25M)  
> ]  
> → [FFT Sink (complex, 25M rate, baseband 98M)]
> 
> running this  
> graph results in an FFT scope with no activity; cutting  
> the sample  
> rates to 250k has no effect. if i mouse over the FFT window  
> i get  
> this error:
> 
> * * *
> 
> Traceback (most recent call last):  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/plotter\_base.py”,

> line 187, in \_on\_paint  
> for fcn in self.\_draw\_fcns: fcn1  
> File

> 

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/plotter\_base.py”,

> line 59, in draw  
> self.\_draw()  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/grid\_plotter\_base.py”,

> line 395, in \_draw\_point\_label  
> label\_str =  
> self.\_populate\_point\_label(x\_val, y\_val)  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/channel\_plotter.py”,

> line 150, in \_populate\_point\_label  
> label\_str += ‘n%s:  
> %s’%(channel, common.eng\_format(y\_value,  
> self.y\_units))  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,

> line 82, in eng\_format  
> coeff, exp, prefix =  
> get\_si\_components(num)  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,

> line 48, in get\_si\_components  
> exp = get\_exp(num)  
> File

“/opt/local/lib/python2.6/site-packages/gnuradio/wxgui/plotter/common.py”,

> line 37, in get\_exp  
> return int(math.floor(math.log10(abs(num))))

ValueError: cannot convert float NaN to integer

> * * *
> 
> relevant  
> info: GNUradio 3.3.0, Python 2.6, Mac OS 10.7.3, MacPorts  
> install.  
> sample data is stored on an internal hard drive.
> 
> this seems like a  
> pretty simple task, so there’s either something  
> simple i’m missing or  
> there’s a bug or misconfiguration in my install.  
> any help would be  
> appreciated - i’ve got a lot to figure out with this  
> file, but i  
> can’t seem to get past this step.
> 
> thank you,
> 
> - emilio gonzalez

KI6NVO

> * * *

Discuss-gnuradio mailing list

> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [1]

[Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [2]

Links:
