Slot from Stratus

This commit is contained in:
Mike Phares 2023-05-09 16:39:52 -07:00
parent 066d9433c1
commit 8e5c8a24a1
4 changed files with 17 additions and 24 deletions

View File

@ -5,20 +5,6 @@ public class Footer
public string Line { get; set; } public string Line { get; set; }
public string RadialVariationThickness { get; set; } public string RadialVariationThickness { get; set; }
public string Slot { get; set; }
} }
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
// operator: J batch: BIORAD#2
// cassette: wafer: 52-589368-4445
// --------------------------------------------------------------------------------
// position thickness position thickness position thickness
// 1 45.735 2 46.536 3 46.742
// 4 46.015 5 46.648 6 45.366
// 7 46.263 8 46.512 9 46.373
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
// ================================================================================
// Radial variation (computation B) PASS:
// thickness -2.7474

View File

@ -250,9 +250,13 @@ public partial class ProcessData : IProcessData
#pragma warning restore IDE0060 #pragma warning restore IDE0060
{ {
TXT result; TXT result;
string[] files = Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), string.Concat(originalDataBioRad, logistics.Sequence, "*"), SearchOption.TopDirectoryOnly); List<string> moveFiles = new();
foreach (string file in files) string directoryName = Path.GetDirectoryName(logistics.ReportFullPath);
fileInfoCollection.Add(new FileInfo(file)); string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", logistics.Sequence, "*"), SearchOption.TopDirectoryOnly));
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", fileNameWithoutExtension.Split('_').Last(), "*"), SearchOption.TopDirectoryOnly));
foreach (string moveFile in moveFiles.Distinct())
fileInfoCollection.Add(new FileInfo(moveFile));
string receivedData = File.ReadAllText(logistics.ReportFullPath); string receivedData = File.ReadAllText(logistics.ReportFullPath);
// occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs. // occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs.
int index = receivedData.LastIndexOf("Bio-Rad"); int index = receivedData.LastIndexOf("Bio-Rad");
@ -263,8 +267,7 @@ public partial class ProcessData : IProcessData
else else
{ {
result = new TXT(receivedData); result = new TXT(receivedData);
string directory = Path.GetDirectoryName(logistics.ReportFullPath); string fileName = Path.Combine(directoryName, $"{Path.GetFileNameWithoutExtension(logistics.ReportFullPath)}.json");
string fileName = Path.Combine(directory, $"{Path.GetFileNameWithoutExtension(logistics.ReportFullPath)}.json");
string json = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true }); string json = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText(fileName, json); File.WriteAllText(fileName, json);
fileInfoCollection.Add(new(fileName)); fileInfoCollection.Add(new(fileName));
@ -359,11 +362,11 @@ public partial class ProcessData : IProcessData
UniqueId = uniqueId; UniqueId = uniqueId;
JobID = logistics.JobID; JobID = logistics.JobID;
StdDev = txt.Body.StdDev; StdDev = txt.Body.StdDev;
Slot = slot.ToString("00");
PassFail = txt.Body.PassFail; PassFail = txt.Body.PassFail;
Title = titleFixed.ToString(); Title = titleFixed.ToString();
Wafer = waferFixed.ToString(); Wafer = waferFixed.ToString();
MeanThickness = txt.Body.WaferMeanThickness; Slot = string.IsNullOrEmpty(txt.Footer.Slot) ? slot.ToString("00") : txt.Footer.Slot;
MeanThickness = string.IsNullOrEmpty(txt.Body.WaferMeanThickness) && txt.Body.Sites.Count == 1 ? txt.Body.Sites.First().Thickness : txt.Body.WaferMeanThickness;
RVThickness = txt.Footer.RadialVariationThickness; RVThickness = txt.Footer.RadialVariationThickness;
foreach (Site site in txt.Body.Sites) foreach (Site site in txt.Body.Sites)
{ {

View File

@ -64,6 +64,9 @@ public class TXT
string line = GetToEOL(); string line = GetToEOL();
ScanPast("thickness"); ScanPast("thickness");
string radialVariationThickness = GetToEOL(); string radialVariationThickness = GetToEOL();
_ = GetToEOL();
ScanPast("Slot:");
string slot = GetBefore(";");
Header = new() Header = new()
{ {
Title = title, Title = title,
@ -85,6 +88,7 @@ public class TXT
{ {
Line = line, Line = line,
RadialVariationThickness = radialVariationThickness, RadialVariationThickness = radialVariationThickness,
Slot = slot,
}; };
} }

View File

@ -165,7 +165,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType); Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType);
} }
if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind)) if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind))
throw new Exception(string.Concat('{', jsonProperty.Value.ValueKind, "} is not mapped!")); throw new Exception(string.Concat('<', jsonProperty.Name, "> {", jsonProperty.Value.ValueKind, "} is not mapped!"));
} }
foreach (JsonProperty jsonProperty in jsonProperties) foreach (JsonProperty jsonProperty in jsonProperties)
{ {