From 03991a18ed16dc34e99b797fbb429c3f08bfe9ce Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 12 Aug 2025 11:17:59 -0400 Subject: [PATCH] new test data files --- testanalysis.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/testanalysis.py b/testanalysis.py index a3747d3..58f62c8 100644 --- a/testanalysis.py +++ b/testanalysis.py @@ -11,8 +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") +INJECTION_FILE = os.path.join(".","out","2025-08-08T11-28-06.txt") DETECTION_FILE = os.path.join(".","out","plotOut.txt") +EXCLUDE_FILES = True def linesplit(line): """ @@ -91,20 +92,22 @@ detections = detections.reset_index(drop=True) summary(2) #five files have SO MANY FALSE POSITIVES so get rid of them here? -remFiles = ["data_2025-04-30_07-53-07", "data_2025-05-01_07-47-34", "data_2025-04-24_07-36-04", "data_2025-04-29_07-50-16", "data_2025-04-30_08-18-17"] -logger.info("Filtering out the five problem files...") -remMask = [True] * len(detections['dm']) -for detection in detections.itertuples(): - if detection.file in remFiles: - remMask[detection.Index] = False -detections = detections[remMask] -detections = detections.reset_index(drop=True) -summary(3) +if EXCLUDE_FILES: + remFiles = ["data_2025-04-30_07-53-07", "data_2025-05-01_07-47-34", "data_2025-04-24_07-36-04", "data_2025-04-29_07-50-16", "data_2025-04-30_08-18-17"] + logger.info("Filtering out the five problem files...") + remMask = [True] * len(detections['dm']) + for detection in detections.itertuples(): + if detection.file in remFiles: + remMask[detection.Index] = False + detections = detections[remMask] + detections = detections.reset_index(drop=True) + summary(3) -postFilterCount = len(detections['dm']) -logger.info(f"Removed {preFilterCount-postFilterCount} detections by filtering the following:") -for file in remFiles: - logger.info(file+"_injected.fil") + postFilterCount = len(detections['dm']) + + logger.info(f"Removed {preFilterCount-postFilterCount} detections by filtering the following:") + for file in remFiles: + logger.info(file+"_injected.fil") #Let's do detection matching! Yaaaay! #What detections line up to which injections? This will determine which ones got missed entirely.