[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] fft display frequency spotting
From: |
cswiger |
Subject: |
Re: [Discuss-gnuradio] fft display frequency spotting |
Date: |
Tue, 2 Aug 2005 16:49:35 -0400 (EDT) |
On Tue, 2 Aug 2005, cswiger wrote:
> def Mouse(self,event):
> fRel = ( event.GetX() - 48 ) / 15.2 - 20
> print eng_notation.num_to_str(self.frequency + (fRel*1e3))
>
>
Even better than printing on the console is use ToolTips to display the
frequency your cursor pointer is on in a little pop up window that
slides along the bottom of the fft window:
wx.ToolTip.Enable(True)
wx.ToolTip.SetDelay(0)
# for mouse position reporting on fft display
em.eventManager.Register(self.Mouse, wx.EVT_MOTION, self.fft.win)
def Mouse(self,event):
freq = self.frequency + (((event.GetX() - 48) / 15.2 - 20) * 1e3)
self.fft.win.SetToolTip(wx.ToolTip(eng_notation.num_to_str(freq)))
--Chuck