Skip to content

Commit

Permalink
fix bug psd name writing
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmerk committed Nov 11, 2024
1 parent 647a0a1 commit 8cf5156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py_neuromodulation/features/oscillatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def calc_feature(self, data: np.ndarray) -> dict:
if self.settings.return_spectrum:
combinations = product(enumerate(self.ch_names), enumerate(self.freqs))
for (ch_idx, ch_name), (idx, f) in combinations:
feature_results[f"{ch_name}_welch_psd_{str(f)}"] = Z[ch_idx][idx]
feature_results[f"{ch_name}_welch_psd_{int(f)}"] = Z[ch_idx][idx]

return feature_results

Expand Down Expand Up @@ -242,7 +242,7 @@ def calc_feature(self, data: np.ndarray) -> dict:
if self.settings.return_spectrum:
combinations = product(enumerate(self.ch_names), enumerate(self.freqs))
for (ch_idx, ch_name), (idx, f) in combinations:
feature_results[f"{ch_name}_stft_psd_{str(f)}"] = Z[ch_idx].mean(
feature_results[f"{ch_name}_stft_psd_{int(f)}"] = Z[ch_idx].mean(
axis=1
)[idx]

Expand Down

0 comments on commit 8cf5156

Please sign in to comment.