add estimated finish time to progress bar
CI for csaxs_bec / test (pull_request) Successful in 1m30s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m31s

This commit was merged in pull request #229.
This commit is contained in:
x12sa
2026-06-21 09:30:32 +02:00
parent 906e91cc7f
commit 6ed82d2fea
@@ -275,6 +275,18 @@ class flomniGuiTools:
eta_display = "N/A"
# ------------------------------------------------------------------
# --- format estimated finish (wall-clock) time --------------------
finish_str = self.progress.get("estimated_finish_time")
if finish_str is not None:
import datetime as _dt
finish_display = _dt.datetime.fromisoformat(finish_str).strftime(
"%Y-%m-%d %H:%M:%S"
)
else:
finish_display = "N/A"
# ------------------------------------------------------------------
text = (
f"Progress report:\n"
f" Tomo type: {self.progress['tomo_type']}\n"
@@ -285,7 +297,8 @@ class flomniGuiTools:
f" Current projection within subtomo: {self.progress['subtomo_projection']}\n"
f" Total projections per subtomo: {int(self.progress['subtomo_total_projections'])}\n"
f" Scan started: {start_display}\n"
f" Est. remaining: {eta_display}"
f" Est. remaining: {eta_display}\n"
f" Est. finish: {finish_display}"
)
self.progressbar.set_center_label(text)
except Exception as exc: