You're just saving samples from the USRP – there's no info like
"frequency" or "time" attached to those. It's just a very long row of
complex numbers.

Best regards,

Marcus


On 07/11/2017 01:23 AM, Sinta Novtafiani wrote:
> Hello Marcus,
>
> Thankyou for your advice. I just want to know data actual of my
> program like frequency, time and power then save as file txt so i can
> read the data anytime. But i have problem, when i read the raw binary
> file use those source code above, its appears float data in one
> coloumn and i don't know which one frequency, time, or power because i
> didn't got header of the data. I have to convert .dat file into format
> that can read anywhere or convert to numerical data in matrix because
> the data will process furthermore 
>
> On Jul 10, 2017 2:09 PM, "Marcus Müller" <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Dear Sinta,
>
>     I've had this discussion several times before, so let me please
>     shortly mention that you've signed up to the mailing list via
>     Nabble, which is a very suboptimal thing for you (you might miss
>     answers posted by us). Please sign out of nabble, and sign up
>     directly to
>     https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>; enough
>     of that :)
>
>     This is more of a collection of thoughts for future readers than
>     direct criticism on your approach:
>
>     Well, I really don't know why you would want a text file
>     containing float samples. It doesn't make sense from a precision
>     point of view, it doesn't make sense from a storage size point of
>     view, and it doesn't even make sense from a usability point of
>     view – I don't really believe you'll get a "feeling" for data if
>     you scroll around in a 1mio lines text file :)
>
>     That being said, there's probably very legitimate reason you'd
>     want a CSV file (for example, get a couple data points only to
>     import them into a spreadsheet software). You probably want to
>     look into the "Head" block that limits the number of items going
>     through.
>
>     Also, you could just as well in your Python code not save all of
>     `data`, but only let's say `data[:100]`.
>
>     Best regards,
>
>     Marcus
>
>     On 07/10/2017 08:54 AM, Sinta Novtafiani wrote:
>>     Hello Nicholas,
>>
>>     Thankyou for your reply. I've try that way and its work. I have a
>>     problem, my file that generate from file sink is big. And it
>>     cause text edtior become not reponding when i open file that have
>>     converted to txt. Did you know how to control file size from file
>>     sink?
>>
>>     I use this code below to convert binary file into txt
>>
>>     data=scipy.fromfile(open('filename'), dtype=scipy.float32)
>>     scipy.savetxt('filename.txt', data)
>>
>>     On Mon, Jul 10, 2017 at 1:52 AM, Nicolas Cuervo
>>     <[email protected] <mailto:[email protected]>> wrote:
>>
>>         Hello Sinta,
>>
>>         This specific question is handled in the GNURadio FAQ [1].
>>         Please try to use the scipy.fromfile() method and check if
>>         the output agrees with your expectations.
>>
>>         Regards,
>>         - Nicolas
>>
>>         [1] 
>> https://wiki.gnuradio.org/index.php/FAQ#What_is_the_file_format_of_a_file_sink.3F_How_can_I_read_files_produced_by_a_file_sink.3F
>>         
>> <https://wiki.gnuradio.org/index.php/FAQ#What_is_the_file_format_of_a_file_sink.3F_How_can_I_read_files_produced_by_a_file_sink.3F>
>>
>>         On Mon, Jul 10, 2017 at 5:25 AM, Sinta Novtafiani
>>         <[email protected] <mailto:[email protected]>> wrote:
>>
>>             I got UHD Source receiver with frequency sweeper, its
>>             working fine but i need
>>             to read and actually process the data to make graph out
>>             of it without using
>>             QT GUI, i try to open with hex editor but dont seem to
>>             understand the
>>             pattern of the file that i need to process, im making
>>             python program to
>>             convert it to numbers but the number that comes up doesnt
>>             seem relevant with
>>             the one i see at QT GUI.
>>             <http://gnuradio.4.n7.nabble.com/file/n64518/receiver.png
>>             <http://gnuradio.4.n7.nabble.com/file/n64518/receiver.png>>
>>             <http://gnuradio.4.n7.nabble.com/file/n64518/46_AM.png
>>             <http://gnuradio.4.n7.nabble.com/file/n64518/46_AM.png>>
>>
>>
>>
>>             --
>>             View this message in context:
>>             
>> http://gnuradio.4.n7.nabble.com/How-to-process-file-sink-from-UHD-Source-USRP-tp64518.html
>>             
>> <http://gnuradio.4.n7.nabble.com/How-to-process-file-sink-from-UHD-Source-USRP-tp64518.html>
>>             Sent from the GnuRadio mailing list archive at Nabble.com.
>>
>>             _______________________________________________
>>             Discuss-gnuradio mailing list
>>             [email protected] <mailto:[email protected]>
>>             https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>             <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>>
>>
>>
>>
>>
>>     _______________________________________________
>>     Discuss-gnuradio mailing list
>>     [email protected] <mailto:[email protected]>
>>     https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>     _______________________________________________ Discuss-gnuradio
>     mailing list [email protected]
>     <mailto:[email protected]>
>     https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>     <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio> 
>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to