From 1b410ca6e1a84532f5194e960e098345ef4c139d Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 11 Aug 2024 12:47:16 +0200 Subject: [PATCH] ref --- bidsmreye/quality_control.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bidsmreye/quality_control.py b/bidsmreye/quality_control.py index 190f16b..18bb072 100644 --- a/bidsmreye/quality_control.py +++ b/bidsmreye/quality_control.py @@ -23,6 +23,7 @@ from bidsmreye.logger import bidsmreye_log from bidsmreye.report import generate_report from bidsmreye.utils import ( + add_timestamps_to_dataframe, check_if_file_found, create_dir_for_file, progress_bar, @@ -162,15 +163,7 @@ def perform_quality_control( ) if sampling_frequency is not None: - nb_timepoints = confounds.shape[0] - timestamp = np.arange( - 0, 1 / sampling_frequency * nb_timepoints, 1 / sampling_frequency - ) - confounds["timestamp"] = timestamp - - cols = confounds.columns.tolist() - cols.insert(0, cols.pop(cols.index("timestamp"))) - confounds = confounds[cols] + confounds = add_timestamps_to_dataframe(confounds, sampling_frequency) compute_displacement_and_outliers(confounds)