diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index f416cca..9d8c46f 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -2489,8 +2489,16 @@ class Flomni( for scan_nr in range(start_scan_number, end_scan_number): self._write_tomo_scan_number(scan_nr, angle, subtomo_number=0) - def tomo_scan(self, subtomo_start=1, start_angle=None, projection_number=None): - """start a tomo scan""" + def tomo_scan( + self, subtomo_start=1, start_angle=None, projection_number=None, interactive: bool = True + ): + """start a tomo scan + + Args: + interactive: accepted for signature compatibility with + LamNI.tomo_scan() (tomo_queue_execute() calls both the same + way) -- unused here, FlOMNI has no fine-alignment gate. + """ if not self._check_eye_out_and_optics_in(): print( @@ -2519,18 +2527,19 @@ class Flomni( ): # pylint: disable=undefined-variable - if bec.active_account != "": - self.tomo_id = self.add_sample_database( - self.sample_name, - str(datetime.date.today()), - bec.active_account, - bec.queue.next_scan_number, - "flomni", - "test additional info", - "BEC", - ) - else: - self.tomo_id = 0 + # Always attempt registration (even for an empty/test account) + # and let add_sample_database() -> TomoIDManager.register() + # decide production vs. test-server vs. genuine-failure fallback + # -- see LamNI.tomo_scan()'s equivalent change for why. + self.tomo_id = self.add_sample_database( + self.sample_name, + str(datetime.date.today()), + bec.active_account or "", + bec.queue.next_scan_number, + "flomni", + "test additional info", + "BEC", + ) self.write_pdf_report() self.progress["tomo_start_time"] = datetime.datetime.now().isoformat() # reset stale estimates from any previous scan, otherwise the GUI