feat(flomni): include measurement ID in end-of-tomo scilog summary
This commit is contained in:
@@ -2674,12 +2674,25 @@ class Flomni(
|
||||
).total_seconds()
|
||||
except (ValueError, TypeError):
|
||||
elapsed_s = None
|
||||
timing_lines = [
|
||||
"Tomoscan finished.",
|
||||
f"Measurement ID: {self.tomo_id}",
|
||||
f"Sample: {self.sample_name}",
|
||||
]
|
||||
if elapsed_s is not None:
|
||||
print(f"Total measurement time: {self._format_duration(elapsed_s)}")
|
||||
print(
|
||||
timing_lines.append(f"Total measurement time: {self._format_duration(elapsed_s)}")
|
||||
timing_lines.append(
|
||||
f"Total measurement time excluding detected gaps: {self._format_duration(elapsed_s - idle_s)}"
|
||||
)
|
||||
print(f"Total measurement time lost to detected gaps: {self._format_duration(idle_s)}")
|
||||
timing_lines.append(
|
||||
f"Total measurement time lost to detected gaps: {self._format_duration(idle_s)}"
|
||||
)
|
||||
for line in timing_lines[3:]:
|
||||
print(line)
|
||||
timing_content = "\n".join(timing_lines)
|
||||
bec.messaging.scilog.new().add_text(timing_content.replace("\n", "<br>")).add_tags(
|
||||
"tomoscan"
|
||||
).send()
|
||||
|
||||
def tomo_scan_resume(self) -> None:
|
||||
"""Resume a tomo_scan() that crashed or was interrupted, picking up
|
||||
|
||||
Reference in New Issue
Block a user