wip
This commit is contained in:
@@ -70,6 +70,12 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
|||||||
analysis_signal = Cpt(Signal, name="analysis_signal", kind=Kind.hinted, doc="Analysis Signal")
|
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")
|
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 = 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(
|
progress = Cpt(
|
||||||
ProgressSignal,
|
ProgressSignal,
|
||||||
name="progress",
|
name="progress",
|
||||||
@@ -207,8 +213,8 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
|||||||
def _on_preview_update(self, img: np.ndarray):
|
def _on_preview_update(self, img: np.ndarray):
|
||||||
corrected_img = self.live_processing.apply_flat_dark_correction(img)
|
corrected_img = self.live_processing.apply_flat_dark_correction(img)
|
||||||
self.live_processing.on_new_data(corrected_img)
|
self.live_processing.on_new_data(corrected_img)
|
||||||
self.preview.put(corrected_img)
|
self.preview.put(img)
|
||||||
self._run_subs(sub_type=self.SUB_DEVICE_MONITOR_2D, obj=self, value=corrected_img)
|
self.preview_corrected.put(corrected_img)
|
||||||
|
|
||||||
def _on_count_update(self, count: int):
|
def _on_count_update(self, count: int):
|
||||||
"""
|
"""
|
||||||
@@ -246,7 +252,7 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
|||||||
name: str,
|
name: str,
|
||||||
file_path: str = "",
|
file_path: str = "",
|
||||||
file_name: str | None = None,
|
file_name: str | None = None,
|
||||||
file_suffix:str = "",
|
file_suffix: str = "",
|
||||||
num_images: int | None = None,
|
num_images: int | None = None,
|
||||||
frames_per_trigger: int | None = None,
|
frames_per_trigger: int | None = None,
|
||||||
) -> StatusBase:
|
) -> StatusBase:
|
||||||
@@ -266,7 +272,7 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
|||||||
"""
|
"""
|
||||||
if file_name is not None and file_suffix:
|
if file_name is not None and file_suffix:
|
||||||
raise ValueError("Both file_name and file_suffix are specified. Please choose one.")
|
raise ValueError("Both file_name and file_suffix are specified. Please choose one.")
|
||||||
|
|
||||||
self.acq_configs[name] = {}
|
self.acq_configs[name] = {}
|
||||||
conf = {}
|
conf = {}
|
||||||
if file_path:
|
if file_path:
|
||||||
@@ -376,7 +382,9 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
|||||||
status = DeviceStatus(self)
|
status = DeviceStatus(self)
|
||||||
if self.backend.status != StdDaqStatus.IDLE:
|
if self.backend.status != StdDaqStatus.IDLE:
|
||||||
self.backend.add_status_callback(
|
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()
|
self.backend.stop()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user