feat(wafer): introduce layout metadata modeling and shape resolution helpers

- Define WaferLayout subclass to wrap sensor lists with shape and size attributes.
- Add resolve_shape_and_size resolver to infer wafer shape/size from filename prefix or sensor count.
- Update Sensor dataclass to support dynamic side alignments and coordinates offsets.
- Expose waferShape and waferSize properties from SessionController for QML data-bindings.
This commit is contained in:
jack
2026-06-15 11:19:32 -07:00
parent 5b186df888
commit cea4fb782e
5 changed files with 217 additions and 37 deletions
+4 -3
View File
@@ -25,8 +25,8 @@ class CSVFileMetadata:
try:
return datetime.strptime(self.date, date_format)
except (ValueError, TypeError):
# If format is wrong or date is None, return current time
return datetime.now()
# If format is wrong or date is None, return None
return None
# ===== Formatting =====
@staticmethod
@@ -48,4 +48,5 @@ class CSVFileMetadata:
def string_date_format(self) -> str:
"""Helper to ensure the date is always a string for JSON."""
return self.format_date(self.get_date())
dt = self.get_date()
return self.format_date(dt) if dt else self.date