From 5e4c6591d6f7484582cd597e2f252d3ae5d1cd23 Mon Sep 17 00:00:00 2001 From: saphjra <49561526+saphjra@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:20:33 +0100 Subject: [PATCH] changed inconsistency_check to include a print statement. Probably not the cleanest way to do it --- src/pymovements/utils/parsing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pymovements/utils/parsing.py b/src/pymovements/utils/parsing.py index 8691d57c..cc65e3ab 100755 --- a/src/pymovements/utils/parsing.py +++ b/src/pymovements/utils/parsing.py @@ -445,7 +445,7 @@ def _check_sampling_rate(recording_config: list[dict[str, Any]]) -> float | None ------- float | None The sampling rate of the first entry as a float if available, otherwise None. - Raises a warning if no recording configuration is found or + prints a warning if no recording configuration is found or if the sampling rate is inconsistent. """ if not recording_config: @@ -458,8 +458,7 @@ def _check_sampling_rate(recording_config: list[dict[str, Any]]) -> float | None 'Warning: Inconsistent sampling rates found. The first recorded sampling ' 'rate is used to calculate the dataloss.', ) - sampling_rate = sampling_rates.pop() - sampling_rate = float(sampling_rate) + sampling_rate = float(recording_config[0]['sampling_rate']) return sampling_rate