Skip to content

Commit 98269f7

Browse files
committed
Lint fixes
1 parent 190ceea commit 98269f7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

adc_eval/spectrum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def find_harmonics(spectrum, freq, nfft, bin_sig, psig, harms=5, leak=20):
9191

9292
# Make sure we pick the max bin where power is maximized; due to spectral leakage
9393
# if bin_harm == nfft/2, set to bin of 0
94-
if bin_harm == nfft/2:
94+
if bin_harm == nfft / 2:
9595
bin_harm = 0
9696
pwr_max = spectrum[bin_harm]
9797
for i in range(bin_harm - leak, bin_harm + leak + 1):

tests/test_spectrum_plotting.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ def test_find_harmonics_with_leakage_outside_bounds(self):
7777
leakage_bins = 10
7878
stats = spectrum.find_harmonics(
7979
pwr, freq, self.nfft, self.bin, self.arms, harms=2, leak=leakage_bins
80-
8180
)
82-
self.assertEqual(stats["harm"][2]["bin"], self.nfft/2 - 1)
81+
self.assertEqual(stats["harm"][2]["bin"], self.nfft / 2 - 1)
8382

8483
def test_find_harmonics_on_fft_bound(self):
8584
"""Test find harmonics with harmonics landing at nfft/2."""
@@ -89,12 +88,11 @@ def test_find_harmonics_on_fft_bound(self):
8988
leakage_bins = 10
9089
stats = spectrum.find_harmonics(
9190
pwr, freq, self.nfft, self.bin, self.arms, harms=5, leak=leakage_bins
92-
9391
)
9492
self.assertEqual(stats["harm"][2]["bin"], 2 * self.bin)
9593
self.assertEqual(stats["harm"][3]["bin"], 3 * self.bin)
9694
self.assertEqual(stats["harm"][4]["bin"], 0)
97-
self.assertEqual(stats["harm"][5]["bin"], self.nfft - 5*self.bin)
95+
self.assertEqual(stats["harm"][5]["bin"], self.nfft - 5 * self.bin)
9896

9997
def test_plot_string(self):
10098
"""Test proper return of plotting string."""

0 commit comments

Comments
 (0)