Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-28 Thread Michael Ossmann
On Fri, Oct 28, 2011 at 08:06:40AM -0600, wallen wrote: > > Well, here is the code I cobbled together to do this. It is nothing > fancy. Though it can't be adapted as easily to more sophisticated processing as your python code, I often use this one-liner to do the same thing: $ od -fvw8 filename

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-28 Thread wallen
On Thu, 2011-10-27 at 19:00 -0600, hasanimam wrote: > Hello, > > I am in deep deep trouble. And it would be really great if somebody come up > with any sort of help. Well, here is the code I cobbled together to do this. It is nothing fancy. - Wayde --

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Marcus D. Leech
> > Still no ray of hope. > > I am pasting the complete code here. > > --- > collect_raw_data = gr.file_sink(self.fft_size, "observed_data") > > numpy.fromfile("ob

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread hasanimam
Still no ray of hope. I am pasting the complete code here. --- collect_raw_data = gr.file_sink(self.fft_size, "observed_data") numpy.fromfile("observed_data",

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Marcus D. Leech
On 27/10/11 11:00 PM, hasanimam wrote: > To Josh and Marcus, > > Well I tried all aspects. > Here is what I did, > > a = numpy.fromfile("observed_data", dtype=numpy.complex64, count=-1, sep='') > file = open ("outputfile", "w") > for n in range(0,len(a)): >outstr = ("%f" % a[n]) + "\n" >fil

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread hasanimam
To Josh and Marcus, Well I tried all aspects. Here is what I did, a = numpy.fromfile("observed_data", dtype=numpy.complex64, count=-1, sep='') file = open ("outputfile", "w") for n in range(0,len(a)): outstr = ("%f" % a[n]) + "\n" file.write (outstr) file.close() The output file does not

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Josh Blum
On 10/27/2011 07:09 PM, hasanimam wrote: > > Well, I have been able to run the program somehow. The following code is what > I used. > > import numpy > > numpy.fromfile("observed_data", dtype=float, count=-1, sep='') > See my previous email about the data type. I do not think you want to par

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Marcus D. Leech
On 27/10/11 10:09 PM, hasanimam wrote: > Well, I have been able to run the program somehow. The following code is what > I used. > > import numpy > > numpy.fromfile("observed_data", dtype=float, count=-1, sep='') > > Now, the problem is that the file I am getting does not show anything. I > mean th

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread hasanimam
Well, I have been able to run the program somehow. The following code is what I used. import numpy numpy.fromfile("observed_data", dtype=float, count=-1, sep='') Now, the problem is that the file I am getting does not show anything. I mean the characters in the file are still unreadable. I wan

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Hasan Rajib Imam
Hello Josh, Thank you. In fact I am a very newcomer to use gnuradio. I tried to follow your advice. I wrote the code in python like, numpy.fromfile(observed_data, dtype=float, count=-1, sep='') Here, observed_data is the file which is created using the gr_file_sink command. However, it gives an e

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Marcus D. Leech
Hello Marcus, I really appreciate your help. Those files (read_float_binary.m and read_complex_binary.m) are MATLAB macros, intended to be used directly by MatLab. Did you mean that, the binary file which will be created by the gr_file_sink, is needed Matlab to open? Ok, then I will take the f

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Josh Blum
On 10/27/2011 06:14 PM, hasanimam wrote: > > Hello Marcus, > > I really appreciate your help. >> Those files (read_float_binary.m and read_complex_binary.m) are MATLAB > macros, intended to be used directly by MatLab. > > Did you mean that, the binary file which will be created by the > gr_fi

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread hasanimam
Hello Marcus, I really appreciate your help. >Those files (read_float_binary.m and read_complex_binary.m) are MATLAB macros, intended to be used directly by MatLab. Did you mean that, the binary file which will be created by the gr_file_sink, is needed Matlab to open? Ok, then I will take the f

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread Marcus D. Leech
Hello, I am in deep deep trouble. And it would be really great if somebody come up with any sort of help. I am trying to collect the raw data using USRP2. I used the gr_file_sink(itemsize, "filename") for this. The "filename" is a binary file and so it cant be seen/open. I googled in the interne

[Discuss-gnuradio] How to use the read_float_binary.m function

2011-10-27 Thread hasanimam
Hello, I am in deep deep trouble. And it would be really great if somebody come up with any sort of help. I am trying to collect the raw data using USRP2. I used the gr_file_sink(itemsize, "filename") for this. The "filename" is a binary file and so it cant be seen/open. I googled in the interne