Further testing with partial data runs

This commit is contained in:
2025-01-15 12:35:15 -07:00
parent e37d9757ec
commit 784471c5ce
14 changed files with 107 additions and 57 deletions

View File

@ -46,6 +46,40 @@ public class Wafer
Recipe = recipe;
}
private static Wafer? Get(string id) =>
new(date: string.Empty,
id: id,
comments: string.Empty,
sort: string.Empty,
lPDCount: string.Empty,
lPDCM2: string.Empty,
bin1: string.Empty,
bin2: string.Empty,
bin3: string.Empty,
bin4: string.Empty,
bin5: string.Empty,
bin6: string.Empty,
bin7: string.Empty,
bin8: string.Empty,
mean: string.Empty,
stdDev: string.Empty,
areaCount: string.Empty,
areaTotal: string.Empty,
scratchCount: string.Empty,
scratchTotal: string.Empty,
sumOfDefects: string.Empty,
hazeRegion: string.Empty,
hazeAverage: string.Empty,
hazePeak: string.Empty,
laser: string.Empty,
gain: string.Empty,
diameter: string.Empty,
thresh: string.Empty,
exclusion: string.Empty,
hazeRng: string.Empty,
thruput: string.Empty,
recipe: string.Empty);
public string Date { get; }
public string Id { get; }
public string Comments { get; }
@ -79,9 +113,9 @@ public class Wafer
public string Thruput { get; }
public string Recipe { get; }
internal static ReadOnlyCollection<Wafer> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
internal static ReadOnlyDictionary<string, Wafer> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
{
List<Wafer> results = new();
Dictionary<string, Wafer> results = new();
Wafer wafer;
string? text;
List<string> stringList;
@ -105,6 +139,8 @@ public class Wafer
if (id.Length > 5)
id = string.Concat(id.Substring(0, 5), "... - ***");
id = id.Replace("*", "");
if (results.ContainsKey(id))
continue;
Header.ScanPast(text, i, "Comments:");
string comments = Header.GetToEOL(text, i);
Header.ScanPast(text, i, "Sort:");
@ -186,6 +222,23 @@ public class Wafer
hazeRng: hazeRng,
thruput: thruput,
recipe: recipe);
results.Add(id, wafer);
}
return new(results);
}
internal static ReadOnlyCollection<Wafer> Get(ReadOnlyCollection<string> waferIds, ReadOnlyDictionary<string, Wafer> keyValuePairs)
{
List<Wafer> results = new();
string id;
Wafer? wafer;
for (int i = 0; i < waferIds.Count; i++)
{
id = waferIds[i];
if (!keyValuePairs.TryGetValue(id, out wafer))
wafer = Get(id);
if (wafer is null)
break;
results.Add(wafer);
}
return results.AsReadOnly();