How to see the captured dat file in octave or any other software

Hi,

I am new to gnu radio and I have a dat file (complex or float) captured
from
file sink which was directly connected USRP.
Can anyone help me with how to see the dat file in octave or any other
similar software. Is there any other method to see the content of dat
file
as i need that data for processing.

Thanks and Regards,
Abhijeet.

I suggest gnuradio companion. You can replay the samples with a file
source into an fft or scope plot. Or look at live/realtime data from the
usrp itself.

http://gnuradio.org/redmine/wiki/1/GNURadioCompanion

-Josh

On Mon, Dec 6, 2010 at 11:17 AM, abhijeet mate [email protected]
wrote:

Hi,

I am new to gnu radio and I have a dat file (complex or float) captured from
file sink which wasdirectlyconnected USRP.
Can anyone help me with how to see the dat file in octave or any other
similar software. Is there any other method to see the content of dat file
as i need that data for processing.
Thanks and Regards,
Abhijeet.

I use Python’s scipy and matplotlib packages to read in the data files
and plot them. There are some GNU Radio utilities written already to
do some basic plotting. They are found in the GR source tree in
gr-utils/src/python/gr_plot*.py. They also get installed to your
$(prefix)/bin/gr_plot*.py.

Try gr_plot_psd_c.py to plot the PSD of a file of complex samples.

Tom

Hi Tom,

Thank you very much for your help.

Abhijeet.

Hi,

Getting the data into Octave is quite easy

fid=fopen(‘file.dat’);
readsize=1000; % e.g. if you want to read 1000 samples
ir=1:2:2readsize-1;
ii=2:2:2
readsize;
[val, count] = fread (fid, readsize*2, ‘float’); % times 2 for reading
I/Q data
s=complex(val(ir),-val(ii)); % put the data into a complex vector
%
% … some processing here
%
fclose(fid);

Regards,
Thomas

On 12/07/2010 01:17 AM, abhijeet mate wrote:


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


Dr. Thomas H.
Space-Time Measurement Project
Space-Time Standards Group
New Generation Network Research Center
National Institute of Information and Communications Technology

4-2-1 Nukui-Kitamachi, Koganei
184-8795 Tokyo
Japan

Abhijeet,

If you just want to read the contents of the files then you can read
them
using the scripts provided in */gnuradio/gnuradio-core/src/utils/.

read_char_binary, read_complex_binary etc will suffice most of your
needs. I
normally addpath(’/opt/gnuradio/gnuradio-core/src/utils’) in MATLAB and
play
around with the collected raw data.

Hope this helps.