I’m trying to figure out how the x-axis units work on the fftsinks. In
the application “am_rcv.py”, the first plot shows the incoming data
plotted as an fft, however the units are centered about 0 kHz. In
another
application, say usrp_wfm_rcv_pll.py the units are centered about the
actual frequency of the carrier. Why is this? The fft sink in both
cases
is plotting the fft of the source, so I don’t see why there should be a
difference.
thanks,
eric
Eric H. Matlis, Ph.D.
Aerospace & Mechanical Engineering Dept.
120 Hessert Center for Aerospace Research
University of Notre Dame
Notre Dame, IN 46556-5684
Phone: (574) 631-6054
Fax: (574) 631-8355
On Fri, Dec 01, 2006 at 03:53:36PM -0500, Eric Hill M. wrote:
eric
It depends on who coded them when. Originally there was no interface
for telling the FFT sink what RF frequency corresponded to DC in the
FFT output. Now there is. Feel free to submit a patch for am_rcv.py.
Eric
Thanks for the response. I guess my question is: where is that
information carried? Is it in the definition of the source? The
two definitions of the sinks look virtually identical to me:
am_rcv.py:
pre_demod = fftsink.fft_sink_c (self, panel,
title=“Pre-Demodulation”, fft_size=1024,
sample_rate=if_rate)
self.connect (src, pre_demod)
vbox.Add (pre_demod.win, 1, wx.EXPAND)
usrp_wfm_rcv_pll.py:
self.src_fft = fftsink.fft_sink_c (self, self.panel,
title=“Data from USRP”,fft_size=512, sample_rate=usrp_rate)
self.connect (self.u, self.src_fft)
vbox.Add (self.src_fft.win, 4, wx.EXPAND)
eric
Eric Hill M. wrote:
usrp_wfm_rcv_pll.py:
self.src_fft = fftsink.fft_sink_c (self, self.panel,
title=“Data from USRP”,fft_size=512, sample_rate=usrp_rate)
self.connect (self.u, self.src_fft)
vbox.Add (self.src_fft.win, 4, wx.EXPAND)
eric
I haven’t looked at the code carefully, but “if_rate” and “usrp_rate”
sure look suspicious given that IF usually stands for Intermediate
Frequency. Here is a relevant-looking part of fftsink.py
x = max(abs(*self.fftsink.sample_rate*),
abs(self.fftsink.baseband_freq))
if x >= 1e9:
sf = 1e-9
units = “GHz”
elif x >= 1e6:
sf = 1e-6
units = “MHz”
else:
sf = 1e-3
units = “kHz”
-Dan
On Fri, Dec 01, 2006 at 08:04:52PM -0500, Eric Hill M. wrote:
usrp_wfm_rcv_pll.py:
self.src_fft = fftsink.fft_sink_c (self, self.panel,
title=“Data from USRP”,fft_size=512, sample_rate=usrp_rate)
self.connect (self.u, self.src_fft)
vbox.Add (self.src_fft.win, 4, wx.EXPAND)
eric
def update_status_bar (self):
msg = "Volume:%r Setting:%s" % (self.vol, self.state)
self._set_status_msg(msg, 1)
self.src_fft.set_baseband_freq(self.freq) <<< LOOK HERE <<<