From 7e7b4e51ef5ad7e4c951316aec5390dd292ac6dd Mon Sep 17 00:00:00 2001 From: Ali Neishabouri Date: Fri, 8 Jul 2022 16:11:22 +0200 Subject: [PATCH] Sum counts --- src/biopsykit/signals/imu/activity_counts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biopsykit/signals/imu/activity_counts.py b/src/biopsykit/signals/imu/activity_counts.py index 9790104..778e9b5 100644 --- a/src/biopsykit/signals/imu/activity_counts.py +++ b/src/biopsykit/signals/imu/activity_counts.py @@ -134,7 +134,7 @@ def _accumulate_minute_bins(data: np.ndarray) -> np.ndarray: n_samples = 10 * 60 # Pad data at end to "fill" last bin padded_data = np.pad(data, (0, n_samples - len(data) % n_samples), "constant", constant_values=0) - return padded_data.reshape((len(padded_data) // n_samples, -1)).mean(axis=1) + return padded_data.reshape((len(padded_data) // n_samples, -1)).sum(axis=1) def calculate(self, data: arr_t) -> arr_t: """Calculate Activity Counts from acceleration data.