# Spectrum Sense: Making Sense of the data

Hi All,

First of all my apologies on the quality of the email, this is my first
posting to a mailing list and I’ve tries to go into as much detail as
possible.

We have had a problem making sense of the output we receive from
usrp_spectrum_sense.py in the python examples.

Lines 226 - 232 tell us that:

# You could write this as binary to a file.

We then proceeded to print m.data and graph the output. Our assumption
was that the data output was incremental i.e started at the center
frequency and ended at the maximum frequency. However the graph did not

We then continued and used a high power RF signal generator and noticed
that it seemed DC was actually at both ends of the graph with the a
change from min to max in the middle, better explained in the image
attached.

This means the output from m.data is from the center frequency to the
maximum frequency and half way it flips to the minimum frequency and
increases back to the center frequency.

My question basically is does anyone know if our findings in the graph
above correct? And if not can anyone shed some light on what order the
output is in.

Much Appreciated,

Will

[email protected] wrote:

This means the output from m.data is from the center frequency to the
maximum frequency and half way it flips to the minimum frequency and
increases back to the center frequency.

My question basically is does anyone know if our findings in the graph
above correct? And if not can anyone shed some light on what order the
output is in.

The comment refers to “bin 0 == DC.” This means the first value is the
passband center frequency, which becomes DC after downconversion by the
USRP.

The first half of the array contains the positive baseband frequencies,
which corresponds to the passband center frequency out to the maximum
passband frequency.

The second half of the array contains the negative baseband frequencies,
which correspond to the lowest passband frequency up to the passband
center frequency.

This is exactly what your graph looks like.

This format is due to the output format of the underlying fftw library
we use to calculate FFTs. You can rotate the values by swapping the
first and second halves of the array and end up with it going from
lowest passband frequency to highest passband frequency.

Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com