From 7b8538ce5152bb6e978cae37fcb7099941e95364 Mon Sep 17 00:00:00 2001 From: Primoz Date: Wed, 21 Dec 2022 10:40:07 +0000 Subject: [PATCH] Fix a bug and remove sys.exit line from cleaning script. --- src/features/all_cleaning_individual/straw/main.py | 3 +++ src/features/all_cleaning_overall/straw/main.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/all_cleaning_individual/straw/main.py b/src/features/all_cleaning_individual/straw/main.py index 5578aac7..617defb4 100644 --- a/src/features/all_cleaning_individual/straw/main.py +++ b/src/features/all_cleaning_individual/straw/main.py @@ -36,6 +36,9 @@ def straw_cleaning(sensor_data_files, provider): phone_data_yield_unit = provider["PHONE_DATA_YIELD_FEATURE"].split("_")[3].lower() phone_data_yield_column = "phone_data_yield_rapids_ratiovalidyielded" + phone_data_yield_unit + if features.empty: + return features + features = edy.calculate_empatica_data_yield(features) if not phone_data_yield_column in features.columns and not "empatica_data_yield" in features.columns: diff --git a/src/features/all_cleaning_overall/straw/main.py b/src/features/all_cleaning_overall/straw/main.py index 22e2dd8e..197c285d 100644 --- a/src/features/all_cleaning_overall/straw/main.py +++ b/src/features/all_cleaning_overall/straw/main.py @@ -23,9 +23,6 @@ def straw_cleaning(sensor_data_files, provider, target): graph_bf_af(features, "1target_rows_before") - # TODO: need to check whether all of the participants contain E4 columns - sys.exit() - # (1.0) OVERRIDE STRESSFULNESS EVENT TARGETS IF ERS SEGMENTING_METHOD IS "STRESS_EVENT" if config["TIME_SEGMENTS"]["TAILORED_EVENTS"]["SEGMENTING_METHOD"] == "stress_event":