About samples

Hi,
I’m trying to use USRP to receive signals and collect the
samples.Here is the flow graph:
usrp_source_c–>stream_to_vector–>complex_to_mag–>vector_sink_f
dst = gr.vector_sink_f()
data = dst.data()
In my opinion, what stores in data should be the amplitude of the
samples. But I found that len(data) is quite different for each running.
I don’t know why. I also want to know the time duration for each sample
collecting. Thank you!
Ally

On 12/20/2010 09:03 PM, lishan_wh wrote:

Hi, I’m trying to use USRP to receive signals and collect the
samples.Here is the flow graph:
usrp_source_c–>stream_to_vector–>complex_to_mag–>vector_sink_f dst
= gr.vector_sink_f() data = dst.data() In my opinion, what stores in
data should be the amplitude of the samples. But I found that
len(data) is quite different for each running. I don’t know why. I
also want to know the time duration for each sample collecting. Thank
you! Ally

You may want to put a gr_head block between the input and the output to
control the number of samples that pass into the vector sink. In
addition, the head block will terminate flow graph execution when the
samples have accumulated.

-Josh