add estimated finish time to progress bar #229
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user