7373STAGE_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