From 8b806aaa83de5451e9a179007f7d48ccc9c2d43b Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Tue, 12 Mar 2024 01:02:40 +0000 Subject: [PATCH] Change PSD calculation to be sum of squares * Fs. --- gamutrf/grscan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamutrf/grscan.py b/gamutrf/grscan.py index 75d43e2e..df43dc0c 100644 --- a/gamutrf/grscan.py +++ b/gamutrf/grscan.py @@ -359,7 +359,7 @@ def connect_blocks(self, source, other_blocks, last_block_port=0): def get_db_blocks(self, nfft, samp_rate, scaling): if scaling == "density": - scale = 1.0 / (samp_rate * sum(self.get_window(nfft)) ** 2) + scale = 1.0 / (samp_rate * sum((self.get_window(nfft) ** 2))) elif scaling == "spectrum": scale = 1.0 / (sum(self.get_window(nfft)) ** 2) else: