[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using File Sink Block
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] Using File Sink Block |
Date: |
Sun, 10 Apr 2011 12:18:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 |
On 04/09/2011 10:39 PM, Steve Joseph wrote:
> I am trying to save the output of a stream to a .txt file using the
> gr_file_sink block. After running the flowgraph, the .txt file either
> cannot be opened due to missing formatting information, or the file just
> appears empty.
>
> Is there a line I can add to the python script to make the file readable in
> a standard editor? Am I using the block wrong somehow?
>
python -c "import numpy, sys; print '\n'.join(map(str,
numpy.fromfile(sys.argv[1], numpy.complex64)))" [input_file] > [output_file]
substitute numpy.complex64 for the io type you are using
-Josh