Skip to content

Commit

Permalink
fix: wrong magnitude for centroid calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Teagum committed Jun 7, 2024
1 parent 4517e8a commit fb39fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apollon/signal/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def power(self) -> FloatArray:
@property
def centroid(self) -> FloatArray:
"""Compute spectral centroid"""
return features.spectral_centroid(self.frqs, self.abs)
return features.spectral_centroid(self.frqs, self.power)

@property
def _n_fft(self) -> int:
Expand Down

0 comments on commit fb39fea

Please sign in to comment.