diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/gui_tools.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/gui_tools.py index ed118fe..e5efa97 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/gui_tools.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/gui_tools.py @@ -250,6 +250,15 @@ class LamniGuiTools: else: eta_display = "N/A" + # Format estimated finish (wall-clock) time + finish_str = self.progress.get("estimated_finish_time") + if finish_str is not None: + finish_display = datetime.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" @@ -260,8 +269,15 @@ class LamniGuiTools: 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._describe_active_hook() comes from LamNI itself (this is a + # mixin, always combined with it) -- shown only when a hook is + # actually active, mirrors Flomni's identical center-label note. + hook_description = self._describe_active_hook() + if hook_description: + text += f"\n Hook: {hook_description}" self.progressbar.set_center_label(text)