This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.
Scott Cutler scott at scottcutler.netTo get from the time domain (the raw samples) to the frequency domain (waterfall display, etc.), you need an FFT. The FFT operates on some given buffer size, and outputs a buffer of the same size filled with complex frequency levels (where the magnitude squared is the signal energy). The FFT width determines your frequency resolution, not the bandwidth. The bandwidth is determined by the sample rate--in your case, 1.4 MHz. So you choose your FFT based on your resolution and performance requirements. In your case, the FFT will return frequencies from -0.7 to 0.7 MHz around the center frequency--no matter what the FFT width. The FFT results store the positive frequencies from 1..(N/2-1) and the negative ones from (N/2+1)..(N-1). Sample 0 is 0 Hz and N/2 is 0.7 MHz (you can't really use this last one since it aliases). The other frequencies scale linearly between these points (sample N/4 is 0.35 MHz, etc.). For a waterfall display, this generally means you want to swap the left and right halves of a buffer. You can read as many samples as you want from the device. Conceptually, it's similar to an audio device--if you need more samples, you just wait longer. You could collect 64M samples if you wanted, and get some nice sub-Hz resolution, but it would take 45 s to record at your settings. There is of course a tradeoff between time and frequency resolution. I don't know much about radio astronomy, but you'll probably want to figure out what the shortest timescale events you'd like to track are, and choose the FFT width based on that. Incidentally, none of this is peculiar to rtl-sdr--even the fanciest and most expensive units operate the same way, though they have higher sample rates and such. In fact, the stuff I said is fundamental to all signal processing--if you're willing to get your hands dirty with math, you might want to read the wiki articles on Fourier Transforms and other signal processing subjects. -Scott On 10/21/2012 10:25 AM, Michel Pelletier wrote: > Hello everyone, I hope this is an appropriate forum for a beginner > question about using an E4000 dongle. > > I'm an amateur astronomer, and lately I've been wanting to get into > amateur radio astronomy. The rtlsdr seems like a really cheap way to > get involved. It can tune many interesting frequencies, in particular > channel 37 around 608-614 Mhz. > > I am a Python programmer by trade so I am using roger-'s amazing > pyrtlsdr library which is great, I can read samples from the device > and they get returned as numpy arrays. The scipy.signal package > allows me to correctly decimate the signal and I am working on a > simple graphing program to graph signal levels in realtime, by hour, > by day, and by week. I hope to basically reproduce the Jansky > experiment that started the entire science of radio astronomy: > > http://en.wikipedia.org/wiki/Karl_Guthe_Jansky > > I have a question though about how to use the dongle that I can't > quite figure out. roger-'s demo_waterfall program, for example, sets > the default sample_rate to 1.4e6, but then on each scan only calls > read_samples(2**16). The demo displays the entire megahertz of > bandwidth, so I'm a bit confused as to how the 64K samples map onto > the 1M samples of the device. It doesn't seem to make sense taht the > device only returns the first 64K samples. Can anyone clue in a total > beginner on the sample rate and reading samples from the device > correlate? > > Thank you! > > -Michel >