fix(tomo): drop extra scilog entry for tomo type 4 (flomni, LamNI)
Type 4 wrote a separate scilog entry dumping the whole angle list at scan start. The regular start entry already names the angle file, so remove the extra entry and the now-unused _scilog_angle_file_record/_angle_file_scilog. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYAZk48UNnhKsnzdz7nJNR
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
533467775d
commit
ae3045322b
@@ -1075,9 +1075,6 @@ class LamNI(
|
||||
return None
|
||||
return scilog
|
||||
|
||||
def _angle_file_scilog(self, text: str) -> None:
|
||||
self.write_to_scilog(text, ["tomoscan"])
|
||||
|
||||
def write_to_scilog(self, content, tags: list = None) -> bool:
|
||||
"""Write a text entry to scilog, tolerating scilog being disabled or
|
||||
unreachable. This is documentation of a scan, not part of the scan
|
||||
@@ -2125,7 +2122,6 @@ class LamNI(
|
||||
self._reset_progress_for_new_scan()
|
||||
if file_angles is not None:
|
||||
self._init_angle_file_progress(file_angles, projection_number)
|
||||
self._scilog_angle_file_record(file_angles)
|
||||
# Unconditional single 0-degree reference projection at the very
|
||||
# start of a new tomogram, independent of
|
||||
# zero_deg_reference_at_each_subtomo /
|
||||
|
||||
@@ -11,7 +11,6 @@ Host-class contract:
|
||||
* _TOMO_PARAMS_ERROR exception class raised on any problem
|
||||
* _ANGLE_FILE_OPPOSITE_WARNING bool, report 180-deg-opposite/duplicate angles
|
||||
(parallel-beam redundancy -- off for laminography)
|
||||
* _angle_file_scilog(text) write a scilog entry (setup specific)
|
||||
* _tomo_scan_at_angle(angle, subtomo_number, **overrides)
|
||||
* progress, OMNYTools, client, at_each_angle_hook
|
||||
"""
|
||||
@@ -162,9 +161,6 @@ class TomoAngleFileMixin:
|
||||
"""Upper limit for tomo types 1-3; flomni overrides (tomo_angle_range)."""
|
||||
return 360
|
||||
|
||||
def _angle_file_scilog(self, text: str) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
def _start_angle_file_scan(self, projection_number) -> AngleFileResult:
|
||||
"""Read + report the angle file at tomo_scan() start (before any gate
|
||||
or motion), so a missing/malformed file fails immediately -- and, in
|
||||
@@ -200,15 +196,6 @@ class TomoAngleFileMixin:
|
||||
if projection_number is None:
|
||||
self.progress["subtomo"] = 1
|
||||
|
||||
def _scilog_angle_file_record(self, file_angles: AngleFileResult) -> None:
|
||||
"""Record of the angles known at scan start -- the file itself may be
|
||||
edited, deleted, or grow further after this point."""
|
||||
self._angle_file_scilog(
|
||||
f"Tomo type 4, angle file {self.tomo_angle_file}\n"
|
||||
f"{describe_summary(summarize_angles(file_angles.angles))}\n"
|
||||
"angle subtomo\n" + "\n".join(self._format_angle_entry(e) for e in file_angles.angles)
|
||||
)
|
||||
|
||||
def _run_angle_file_loop(self, file_angles: AngleFileResult, projection_number) -> None:
|
||||
"""Acquire the angles of tomo_type 4 in file order (no extra 0-deg
|
||||
damage-estimation shots: sub-tomogram numbers in a user file are just
|
||||
|
||||
@@ -2849,8 +2849,6 @@ class Flomni(
|
||||
status="started",
|
||||
)
|
||||
self.write_pdf_report()
|
||||
if file_angles is not None:
|
||||
self._scilog_angle_file_record(file_angles)
|
||||
# estimated_remaining_time/estimated_finish_time/accumulated_idle_time/
|
||||
# heartbeat/subtomo/projection/angle/... were already cleared by the
|
||||
# self.progress.reset() above, before the gates -- only the actual
|
||||
@@ -3200,9 +3198,6 @@ class Flomni(
|
||||
return f"{m}m {s:02d}s"
|
||||
return f"{s}s"
|
||||
|
||||
def _angle_file_scilog(self, text: str) -> None:
|
||||
self._scilog_write(text, "tomoscan")
|
||||
|
||||
def _scilog_write(self, text: str, tags: str | list) -> bool:
|
||||
"""Write a text entry to scilog, tolerating scilog being disabled or
|
||||
unreachable. This is documentation of a scan, not part of the scan
|
||||
|
||||
Reference in New Issue
Block a user