Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
To explain the checks and launch the tests
  • Loading branch information
dancergraham committed Apr 11, 2024
1 parent c7e2aad commit fda9bf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pye57/e57.py
Expand Up @@ -234,6 +234,7 @@ def write_scan_raw(self, data: Dict, *, name=None, rotation=None, translation=No
scan_node = libe57.StructureNode(self.image_file)
scan_node.set("guid", libe57.StringNode(self.image_file, "{%s}" % uuid.uuid4()))
scan_node.set("name", libe57.StringNode(self.image_file, name))
# Ignore optional fields
if "temperature" in data:
temperature = scan_header.temperature
scan_node.set("temperature", libe57.FloatNode(self.image_file, temperature))
Expand Down Expand Up @@ -327,6 +328,7 @@ def write_scan_raw(self, data: Dict, *, name=None, rotation=None, translation=No

acquisition_start = libe57.StructureNode(self.image_file)
scan_node.set("acquisitionStart", acquisition_start)
# Ignore optional fields
if "acquisitionStart_dateTimeValue" in data:
start_datetime = getattr(scan_header, "acquisitionStart_dateTimeValue", 0)
acquisition_start.set("dateTimeValue", libe57.FloatNode(self.image_file, start_datetime))
Expand Down

0 comments on commit fda9bf3

Please sign in to comment.