discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] File Sink Output Size Problem


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] File Sink Output Size Problem
Date: Thu, 08 Sep 2016 21:41:53 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 09/08/2016 09:34 PM, Pavan Yedavalli wrote:
Hi,

This is probably a very simple question, but I have an issue when I am using the file sink. My current flowgraph consists of a signal source (cosine) -> stream_to_vector of size 1024 -> forward FFT of size 1024 -> complex_to_mag of size 1024 -> file sink of size 1024 (unbuffered OFF and append set to overwrite). 

After I run this flowgraph for a few seconds and manually stop it, I use scipy.fromfile(open("filename"), dtype=scipy.float32) to retrieve the values from the binary file. However, the length of this output vector is some integer multiple of 1024 every time. Shouldn't it always be 1024 because I'm overwriting the file? I noticed that the longer I run the flowgraph, the larger this value is, so it seems like it may not be overwriting? Or perhaps there is something else I need to do make sure that my output is always of length 1024 with just the magnitudes of each sample? I'm sure I'm missing something very simple. Any help would be appreciated. Thank you.

--
Pavan

The "overwrite" flag doesn't mean "overwrite the output file every time a new vector is presented".  It just means that when the file sink
  opens the file, it either sets the append option in the open, or just does the default "truncate file" option.

Standard writing-data-to-a-file semantics.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]