Skip to content

Commit

Permalink
fix apply_estimator sw
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmerk committed Feb 11, 2025
1 parent aab97fd commit d263661
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions py_neuromodulation/features/sharpwaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,11 @@ def calc_feature(self, data: np.ndarray) -> dict:
)
# add here also the num_peaks features
if self.sw_settings.sharpwave_features.num_peaks:
key_name = f"{ch_name}_Sharpwave_num_peaks_{filter_name}"
feature_results[key_name] = np_mean([dict_ch_features[key_name]["Peak"],
dict_ch_features[key_name]["Trough"]])
for ch_name in self.ch_names:
for filter_name in self.filter_names:
key_name = f"{ch_name}_Sharpwave_num_peaks_{filter_name}"
feature_results[key_name] = np_mean([dict_ch_features[key_name]["Peak"],
dict_ch_features[key_name]["Trough"]])
else:
# otherwise, save all write all "flattened" key value pairs in feature_results
for key, subdict in dict_ch_features.items():
Expand Down

0 comments on commit d263661

Please sign in to comment.