[Top][All Lists]

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

[Discuss-gnuradio] fft display frequency spotting

From: cswiger
Subject: [Discuss-gnuradio] fft display frequency spotting
Date: Tue, 2 Aug 2005 13:54:09 -0400 (EDT)

Gang - getting an accurate frequency reading from an fft display is pretty
easy. This works for me:

   import wx.lib.evtmgr as em


   # add an fft display to panel_7, nice size, avg on and weaver IF
   # offset
   fft = fftsink.fft_sink_c (self.fg, self.panel_7, fft_size=512, \
     sample_rate=af_sample_rate, baseband_freq=-1.8e3, average=True, \
   self.fg.connect (self.xlate_L, fft)

   # for mouse position reporting on fft display
   em.eventManager.Register(self.Mouse, wx.EVT_LEFT_DOWN, fft.win)


   def Mouse(self,event):
       fRel = ( event.GetX() - 48 ) / 15.2 - 20
       print eng_notation.num_to_str(self.frequency + (fRel*1e3))

Voila - just click on the peak or feature of interest and read it's
frequency off the console. Change centers, scales and offsets to fit
your freq range and window size.


reply via email to

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