feat: add camera and power supply ophyd classes
This commit is contained in:
@@ -49,12 +49,44 @@ nidaq:
|
||||
# onFailure: retry
|
||||
# enabled: true
|
||||
# softwareTrigger: false
|
||||
# ic2:
|
||||
# readoutPriority: baseline
|
||||
# description: Ionization chamber 2
|
||||
# deviceClass: debye_bec.devices.ionization_chambers.ionization_chamber.IonizationChamber2
|
||||
|
||||
# HV power supplies
|
||||
hv_supplies:
|
||||
readoutPriority: async
|
||||
description: HV power supplies
|
||||
deviceClass: debye_bec.devices.hv_supplies.HVSupplies
|
||||
deviceConfig:
|
||||
prefix: "X01DA-"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
softwareTrigger: false
|
||||
|
||||
beam_monitor_1:
|
||||
readoutPriority: async
|
||||
description: Beam monitor 1
|
||||
deviceClass: debye_bec.devices.cameras.prosilica_cam.ProsilicaCam
|
||||
deviceConfig:
|
||||
prefix: "X01DA-OP-GIGE01:"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
softwareTrigger: false
|
||||
|
||||
beam_monitor_2:
|
||||
readoutPriority: async
|
||||
description: Beam monitor 2
|
||||
deviceClass: debye_bec.devices.cameras.prosilica_cam.ProsilicaCam
|
||||
deviceConfig:
|
||||
prefix: "X01DA-OP-GIGE02:"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
softwareTrigger: false
|
||||
|
||||
# xray_eye:
|
||||
# readoutPriority: async
|
||||
# description: X-ray eye
|
||||
# deviceClass: debye_bec.devices.cameras.basler_cam.BaslerCam
|
||||
# deviceConfig:
|
||||
# prefix: "X01DA-"
|
||||
# prefix: "X01DA-ES-XRAYEYE:"
|
||||
# onFailure: retry
|
||||
# enabled: true
|
||||
# softwareTrigger: false
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
# from ophyd_devices.sim.sim_signals import SetableSignal
|
||||
# from ophyd_devices.utils.psi_component import PSIComponent, SignalType
|
||||
import numpy as np
|
||||
from ophyd import ADBase
|
||||
from ophyd import ADComponent as ADCpt
|
||||
from ophyd import Kind
|
||||
from ophyd_devices.devices.areadetector.cam import AravisDetectorCam
|
||||
from ophyd import Component as Cpt
|
||||
from ophyd import Device
|
||||
from ophyd_devices.devices.areadetector.cam import ProsilicaDetectorCam
|
||||
from ophyd_devices.devices.areadetector.plugins import ImagePlugin_V35
|
||||
from ophyd_devices.interfaces.base_classes.psi_device_base import PSIDeviceBase
|
||||
|
||||
|
||||
class BaslerDetectorCam(ProsilicaDetectorCam):
|
||||
|
||||
ps_bad_frame_counter = None
|
||||
|
||||
|
||||
class BaslerCamBase(ADBase):
|
||||
cam1 = ADCpt(AravisDetectorCam, "cam1:")
|
||||
cam1 = ADCpt(BaslerDetectorCam, "cam1:")
|
||||
image1 = ADCpt(ImagePlugin_V35, "image1:")
|
||||
|
||||
|
||||
class BaslerCam(PSIDeviceBase, BaslerCamBase):
|
||||
|
||||
# preview_2d = PSIComponent(SetableSignal, signal_type=SignalType.PREVIEW, ndim=2, kind=Kind.omitted)
|
||||
|
||||
def emit_to_bec(self, *args, obj=None, old_value=None, value=None, **kwargs):
|
||||
width = self.image1.array_size.width.get()
|
||||
height = self.image1.array_size.height.get()
|
||||
data = np.reshape(value, (height, width))
|
||||
# self.preview_2d.put(data)
|
||||
self._run_subs(sub_type=self.SUB_DEVICE_MONITOR_2D, value=data)
|
||||
|
||||
def on_connected(self):
|
||||
|
||||
Reference in New Issue
Block a user