Usrp_spectrum_sense.py doubts


#1

Can anyone explain me this from usrp_spectrum_sense.py (line 55)?

for tap in mywindow:
power += tap*tap

mywindow is done with window.py but I didn’t find where is “tap” and
what it
means…
Furthermore, Does “+=” means that increase one unit to the result of
tap*tap?

Sorry if I am a little useless…


#2

Your getting into basic python questions now, maybe check out some
python tutorials first. The “tap” in that for loop just iterates over
each value in mywindow. The += is the assignment by addition operator,
it adds the value of “tap*tap” to the value of power.

Tim

From: discuss-gnuradio-bounces+trnewman=removed_email_address@domain.invalid
[mailto:discuss-gnuradio-bounces+trnewman=removed_email_address@domain.invalid] On Behalf Of
Santi O.
Sent: Wednesday, November 12, 2008 11:18 AM
To: removed_email_address@domain.invalid
Subject: [Discuss-gnuradio] Usrp_spectrum_sense.py doubts

Can anyone explain me this from usrp_spectrum_sense.py (line 55)?

for tap in mywindow:

power += tap*tap

mywindow is done with window.py but I didn’t find where is “tap” and
what it means…
Furthermore, Does “+=” means that increase one unit to the result of
tap*tap?

Sorry if I am a little useless…