From 5dcbf1ff79c92291dd6fb34cf194ca112ed1eaa0 Mon Sep 17 00:00:00 2001 From: "phares@iscn5cg20977xq" Date: Wed, 15 Oct 2025 07:24:15 -0700 Subject: [PATCH] Handle center point zero readings --- Adaptation/FileHandlers/Stratus/Run.cs | 14 ++++++++------ Adaptation/FileHandlers/txt/Run.cs | 25 +++++++++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Adaptation/FileHandlers/Stratus/Run.cs b/Adaptation/FileHandlers/Stratus/Run.cs index f01361e..846edd2 100644 --- a/Adaptation/FileHandlers/Stratus/Run.cs +++ b/Adaptation/FileHandlers/Stratus/Run.cs @@ -37,18 +37,20 @@ internal class Run result = null; else { - ReadOnlyCollection wafers = Wafer.Get(constant, groups); - if (wafers.Count == 0) + Grade? grade = Grade.Get(constant, groups); + if (grade is null) result = null; else { - Grade? grade = Grade.Get(constant, groups); - if (grade is null) + ReadOnlyCollection wafers = Wafer.Get(constant, groups); + if (wafers.Count == 0 && grade.MeanThickness != "0") result = null; else + { result = new(header, wafers, grade); - // WriteJson(logistics, fileInfoCollection, result); - // WriteCommaSeparatedValues(logistics, result); + // WriteJson(logistics, fileInfoCollection, result); + // WriteCommaSeparatedValues(logistics, result); + } } } } diff --git a/Adaptation/FileHandlers/txt/Run.cs b/Adaptation/FileHandlers/txt/Run.cs index 148d4aa..06e9c7b 100644 --- a/Adaptation/FileHandlers/txt/Run.cs +++ b/Adaptation/FileHandlers/txt/Run.cs @@ -132,19 +132,28 @@ internal class Run { i = new int[] { 0 }; Header? header = Header.Get(text, constant, i); - if (header is not null) + if (header is null) + continue; + else { ReadOnlyCollection groups = Wafer.GetGroups(text, constant, i); - if (groups.Count > 0) + if (groups.Count == 0) + continue; + else { - ReadOnlyCollection wafers = Wafer.Get(constant, groups); - if (wafers.Count > 0) + Grade? grade = Grade.Get(constant, groups); + if (grade is null) + continue; + else { - Grade? grade = Grade.Get(constant, groups); - if (grade is null) + ReadOnlyCollection wafers = Wafer.Get(constant, groups); + if (wafers.Count == 0 && grade.MeanThickness != "0") continue; - run = new(header, wafers, grade); - results.Add(run); + else + { + run = new(header, wafers, grade); + results.Add(run); + } } } }