Skip to content

Commit fcfc5c6

Browse files
committed
Extract more fields from the FIB AutoTEM metadata
1 parent 678a2a3 commit fcfc5c6

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

  • src/murfey/client/contexts

src/murfey/client/contexts/fib.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,11 @@
7373
STAGE_POSITION_NAMES = {
7474
# Map class attribute to element name
7575
# Paths are relative to the "Site" node
76-
"thinning": "ThinningSiteLocation/StagePosition/StagePosition",
77-
# These stage position fields are also present
78-
# but it's unclear which milling steps they correspond to
79-
"chunk_coincidence": "Parameters/ChunkCoincidenceStagePosition/StagePosition",
80-
"thinning_stage": "Parameters/ThinningStagePosition/StagePosition",
8176
"preparation": "PreparationSiteLocation/StagePosition/StagePosition",
82-
"chunk_site": "ChunkSiteLocation/StagePosition/StagePosition",
77+
"chunk_coincidence": "Parameters/ChunkCoincidenceStagePosition/StagePosition",
78+
"chunk": "ChunkSiteLocation/StagePosition/StagePosition",
79+
"thinning_1": "Parameters/ThinningStagePosition/StagePosition",
80+
"thinning_2": "ThinningSiteLocation/StagePosition/StagePosition",
8381
}
8482

8583

@@ -490,7 +488,9 @@ def _parse_autotem_metadata(self, file: Path):
490488

491489
# Create a unique name based on recipe and activity names
492490
unique_name = f"{recipe_name} - {activity_name}"
493-
step_info = MillingStepInfo()
491+
step_info = MillingStepInfo(
492+
step_name=activity_name, recipe_name=recipe_name
493+
)
494494

495495
# Update the corresponding milling activity field
496496
step_info.is_enabled = _parse_xml_text(
@@ -504,10 +504,12 @@ def _parse_autotem_metadata(self, file: Path):
504504
)
505505

506506
# Additional metadata extraction if elements are present
507-
if activity.find("DepthCorrection") is not None:
508-
step_info.depth_correction = _parse_xml_text(
509-
activity, "DepthCorrection", float
510-
)
507+
step_info.site_location_type = _parse_xml_text(
508+
activity, "SiteLocationType", str
509+
)
510+
step_info.depth_correction = _parse_xml_text(
511+
activity, "DepthCorrection", float
512+
)
511513
# Lamella milling geometries
512514
for value_name, value_path in LAMELLA_MILLING_VALUES.items():
513515
step_info.__setattr__(

0 commit comments

Comments
 (0)