From 40e497297d84fd00bb1a247206f3a4567c761d87 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Fri, 8 Aug 2025 16:24:24 -0400 Subject: [PATCH] moved file declarations to top of script --- testanalysis.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testanalysis.py b/testanalysis.py index 6792be6..a3747d3 100644 --- a/testanalysis.py +++ b/testanalysis.py @@ -11,6 +11,9 @@ import pandas as pd logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) #change for debug prints +INJECTION_FILE = os.path.join(".","out","2025-07-31T17-25-54.txt") +DETECTION_FILE = os.path.join(".","out","plotOut.txt") + def linesplit(line): """ Splits line of file into useful components. @@ -49,14 +52,14 @@ detectedDic = { } #load injected data into dataframe -with open(os.path.join(".","out","2025-07-31T17-25-54.txt"), "r") as file: +with open(INJECTION_FILE, "r") as file: lines = file.readlines() updateDic(lines, injectedDic) injections = pd.DataFrame(data=injectedDic) #this is our main object for injection data #load detection data into dataframe -with open(os.path.join(".","out","plotOut.txt"), "r") as file: +with open(DETECTION_FILE, "r") as file: lines = file.readlines() updateDic(lines, detectedDic)