I am looking for a good way to evaluate the signal power (sampling frequency, say, at a frequency of 10 kHz), versus time at a single frequency (e.g. 50 Hz). I could calculate the spectrogram, and then take part of it at the target frequency. This seems inefficient, though, since I only care about power at one frequency versus time. I understand that the power at one frequency is zero (in the limit), I would like to calculate the signal power within a small frequency interval around the target frequency.
My current "solution" is to use the Matplotlib mlab.specgram () function, which returns a 2d power array, and I just slice it. I do not agree with this because I do not completely trust the mab.specgram () function, since it takes a huge amount of time to calculate the spectrogram for different signals (even if they have the same length).
source
share