Hello Martin
Thank you for the help. I try to run “specest_noisy_sinusoid_mtm.py”
(Python script is also okey for me). However it does not run “it says no
module specest”.
By the way I am using windows 8 OS.
My goal is is to write a simple python or gnuradio code to perform the
following task
I have the following variables
NFFT=1024
Nav=512
ampl=1
seed=1
Sampling_rate= 10k

Generate any real time signal (This could be done by using
"gr.noise_source_f (gr.GR_GAUSSIAN, ampl, seed1)). 
Insert throttle to control the sampling rate (i.e., gr.throttle(1,
Sampling_rate)) 
Compute the FFT (even without windowing) (i.e., NFFT samples at a
time)Let me assume that after I compute FFT and I got an “x” vector of
size NFFT 
Compute the square magnitude of x (This could be done by using
gr.complex_to_mag_squared(NFFT))
i.e., in matlab y=abs(x).^2
 sum the first and second Nav samples
i.e., av1=sum(y(1:512))/Nav and
av2=sum(y(513:1024))/Nav
 Then display “av1” and “av2” in a text box continuously.
Note that in matlab (without GUI it is very easy task)
And I feel that there should be some simple approach to do it in
GNUradio
Thank you again for your help
Tadilo Endeshaw
Postdoctoral Researcher
Institut National de recherche Scientifique
Centre Energie Matriaux Telecommunications
Place Bonaventure,
800 de la Gauchetiere Ouest, Suite 6900
H5A 1K6
Montreal, QC
Canada
Email : [email protected]
[email protected] (private)
Personal home page: https://sites.google.com/site/tadilomypage/
From: discussgnuradiobounces+tadilo.bogale=removed_email_address@domain.invalid
[discussgnuradiobounces+tadilo.bogale=removed_email_address@domain.invalid] On Behalf
Of Martin B. [[email protected]]
Sent: July 30, 2014 10:01 AM
To: [email protected]
Subject: Re: [Discussgnuradio] Spectrum sensing Simulation Only
On 07/30/2014 03:37 PM, Tom R. wrote:
The easiest way to average is to use the single_pole_iir_filter to
smooth out the data stream. But note that you’re coming out of the FFT
block as a vector. You can set the vector length of the single pole IIR,
but I’d have to review exactly what that means mathematically. It
probably smooths the entire vector as one as opposed to smoothing over
index i in each vector. You might have to play around with that.
grspecest might help you with that (pybombs install grspecest, or
GitHub  kitcel/grspecest: A module adding spectral estimation routines to GNU Radio.).
M
Discussgnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discussgnuradio