> > 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", dtype=numpy.complex64, count=-1, > sep='') > thingy = numpy.fromfile("observed_data", dtype=int, count=-1, > sep='') > > file = open ("outputfile", "w") > > for n in range(0, len(thingy)): > x = str(thingy[n].real) + " " + str(thingy[n].imag)+ "\n" > file.write(x) > > file.close() > > self.connect(self.u, s2v, c2mag, collect_raw_data) > --------------------------------------------------------------------------------------- > > What do you think what should be the output of the above alogrithm. > I am getting two output files for this algorithm. > One is "observed_data" which contains some unreadable characters. I think > this is a binary file. I have to convert this binary file to understand the > raw data. > The other one is "output" which contains nothing. I guess this file should > contain the converted data of "observed_data" file. > > Still looking for some sort of help. > > Thanks. > > > The crucial item we were all missing was that you were trying to do this *inside a Gnu Radio flowgraph*.
Let the flow-graph run, then use an independant Python program *after the fact* to convert your data file. >From your code, it's clear that you're confused about how all this works, and probably software-design and programming in general. I suspect that you're a student, and that you have an overdue assignment and you don't even know where to start. From the code-segment you provided, I'm guessing that your programming and software design background is extremely limited. While people on this list are generally pretty generous with their time and knowledge, the assumption is that our good will won't be abused. Using the people on this list as a means to complete your academic assignments for you is definitely an abuse of that good will. -- Principal Investigator Shirleys Bay Radio Astronomy Consortium http://www.sbrac.org _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio