discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] File sink question


From: Ellie White
Subject: Re: [Discuss-gnuradio] File sink question
Date: Fri, 31 Mar 2017 00:52:54 +0000

Hello Marcus –

 

Thank you for the quick response. I guess I had been confused and had set the sampling rate far too high! I think the right sampling rate should be 2 MHz for the RTL-SDR dongle, based on what I’ve seen online – does that sound more appropriate to you?

 

Regarding the rest of my question, if I am understanding this correctly, the file sink stores data read in from the source (in my case, the SDR dongle) as a 2d array, containing frequency and time information. So, if I would run my flowgraph for some amount of time, I am accumulating time samples in the destination file via the file sink (each time sample containing 1024 values representing the power of each frequency channel produced by the FFT block) – is that correct?

 

To clarify a bit further, my aim is to make a plot of power vs. time for one particular frequency channel using python. So I want to be able to tell how many seconds of data I am looking at, rather than how many time samples I am looking at. I attached a plot to illustrate what I mean: right now, the x-axis is labeled based on time samples (I think), and I would like to label it with the corresponding time stamp instead. So the question is, how do I convert number of time samples into an indication of time intervals?

 

Hopefully this makes sense and isn’t too convoluted…let me know if I need to clarify anything further or provide any other information.

 

Thanks so much!

 

Ellie

 

From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+address@hidden On Behalf Of Marcus Müller
Sent: Thursday, March 30, 2017 7:02 PM
To: address@hidden
Subject: Re: [Discuss-gnuradio] File sink question

 

Dear Ellie,

I'm not aware of any GNU Radio-compatible SDR receiver with a sampling rate of 300 MHz - that is very high - are you perhaps confusing sampling rate and center frequency?

How do you "measure" 5min? GNU Radio doesn't "run" at the sampling rate you set in things like the signal source – that is really just a number, a parameter, that the signal source uses together with the signal frequency you configure to calculate how long a period is in samples. Samples will be produced as fast as your computer is – which is probably less then 300 MS/s.

So, if you'd want 5mins of "simulated signal", you'd use a "head" block, with the number of samples being set to 300,000,000·60·5. Notice that you **do not** want to do that, usually. In GNU Radio's default complex signal type, which is complex numbers composed of 32 bit real and 32bit imaginary float, that's 720 GB.

Best regards,

Marcus

 

On 03/31/2017 12:13 AM, Ellie White wrote:

Hello again,

 

I have a quick question to ask about how the file sink works (since this was slightly unrelated to the other question I thought I should put it under a different subject line). To provide some background info, my sampling rate is set at 300e6, and I recorded data for (I’m guessing) about 5 minutes. Based on some fiddling around in Python with a data file I saved from a file sink, it appears that just 426,152 time samples were recorded to file, so I am wondering, first, why are there so few samples recorded (i.e. why wasn’t the number of samples recorded 300e6*seconds)? And second, how does the file sink “decide” which samples to keep, and which not to keep?

 

Thank you in advance for any help/explanations!

 

Ellie




_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

 

Attachment: python_plot.png
Description: python_plot.png


reply via email to

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