diff --git a/tomcat_bec/devices/pco_edge/pcoedgecamera.py b/tomcat_bec/devices/pco_edge/pcoedgecamera.py index 417ffad..1900536 100644 --- a/tomcat_bec/devices/pco_edge/pcoedgecamera.py +++ b/tomcat_bec/devices/pco_edge/pcoedgecamera.py @@ -70,6 +70,12 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): analysis_signal = Cpt(Signal, name="analysis_signal", kind=Kind.hinted, doc="Analysis Signal") analysis_signal2 = Cpt(Signal, name="analysis_signal2", kind=Kind.hinted, doc="Analysis Signal") preview = Cpt(PreviewSignal, ndim=2, name="preview", doc="Camera raw data preview signal") + preview_corrected = Cpt( + PreviewSignal, + ndim=2, + name="preview_corrected", + doc="Camera preview signal with flat and dark correction", + ) progress = Cpt( ProgressSignal, name="progress", @@ -207,8 +213,8 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): def _on_preview_update(self, img: np.ndarray): corrected_img = self.live_processing.apply_flat_dark_correction(img) self.live_processing.on_new_data(corrected_img) - self.preview.put(corrected_img) - self._run_subs(sub_type=self.SUB_DEVICE_MONITOR_2D, obj=self, value=corrected_img) + self.preview.put(img) + self.preview_corrected.put(corrected_img) def _on_count_update(self, count: int): """ @@ -246,7 +252,7 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): name: str, file_path: str = "", file_name: str | None = None, - file_suffix:str = "", + file_suffix: str = "", num_images: int | None = None, frames_per_trigger: int | None = None, ) -> StatusBase: @@ -266,7 +272,7 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): """ if file_name is not None and file_suffix: raise ValueError("Both file_name and file_suffix are specified. Please choose one.") - + self.acq_configs[name] = {} conf = {} if file_path: @@ -376,7 +382,9 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase): status = DeviceStatus(self) if self.backend.status != StdDaqStatus.IDLE: self.backend.add_status_callback( - status, success=[StdDaqStatus.IDLE], error=[StdDaqStatus.REJECTED, StdDaqStatus.ERROR] + status, + success=[StdDaqStatus.IDLE], + error=[StdDaqStatus.REJECTED, StdDaqStatus.ERROR], ) self.backend.stop() else: