# Should I filter before calculating power, if I'm looking for relative changes in power?

I am building a "scanner" sort of program, which reads IQ samples from an rtl-sdr stick, and keeps track of the power on certain frequencies, in certain bands. I am interested in detecting activity on frequencies, which I do by looking at changes in power. Since I'm simply calculating changes over time, can I get away with not filtering the data before calculating power, or is there some reason I should filter?

You want to filter when you have a scenario similar to this: you want to track the power in a band of $B$ Hz around a frequency $f_c$, but the SDR's output covers a band that is larger than $B$. In this case you want to filter, since otherwise a signal outside the band of interest could affect your calculations.
So I would highly recommend filtering! It is not difficult to do, unless you know how much band selectivity (filtering) your SDR is providing, and understand that this exceeds the maximum signal strength by more than 10 dB of the total power outside of your band after the SDR provides its own channel filtering (I say 10 dB as this would result in a maximum error of 0.4 dB: $err=10log10(1+x/10)$, where x is the total undesired power in dB, an err is the resulting error in dB, but you can replace x with whatever your err criteria is to determine how much additional filtering you should provide).