Graph bars using peaks, not averages

This commit is contained in:
Correl Roush 2020-09-26 20:56:29 -04:00
parent cbd7993275
commit 3ef9d208d8

View file

@ -78,7 +78,7 @@ class Plot:
data = self.spectrum() data = self.spectrum()
if len(data) == 0: if len(data) == 0:
return return
fft = np.mean( fft = np.max(
np.reshape( np.reshape(
data[: len(data) // self.bars * self.bars], (-1, len(data) // self.bars) data[: len(data) // self.bars * self.bars], (-1, len(data) // self.bars)
), ),