From 9ddd5690ba5e41065cbc36107ee6561bb2ec236b Mon Sep 17 00:00:00 2001 From: fdechaumont Date: Tue, 27 Sep 2022 17:57:33 +0200 Subject: [PATCH] fix an extension detection call --- .../ComputeMeasuresIdentityProfileOneMouseAutomatic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LMT/scripts/ComputeMeasuresIdentityProfileOneMouseAutomatic.py b/LMT/scripts/ComputeMeasuresIdentityProfileOneMouseAutomatic.py index c1d5d60..ffb1fc6 100644 --- a/LMT/scripts/ComputeMeasuresIdentityProfileOneMouseAutomatic.py +++ b/LMT/scripts/ComputeMeasuresIdentityProfileOneMouseAutomatic.py @@ -1471,7 +1471,7 @@ def plotZScoreProfileAutoHorizontal(ax, cat, koDataframe, night, eventListForTes print(file) head, tail = os.path.split(file) - extension = head[-4:] + extension = tail[-4:] print('extension: ', extension) connection = sqlite3.connect( file ) @@ -1510,7 +1510,7 @@ def plotZScoreProfileAutoHorizontal(ax, cat, koDataframe, night, eventListForTes print("Profile data saved.") # Create a json file to store the computation - with open("profile_data_{}_{}.json".format('over_night', extension), 'w') as fp: + with open( f"profile_data_over_night_{extension}.json", 'w') as fp: json.dump(profileData, fp, indent=4) print(extension) print("json file with profile measurements created.")