|
1 | | -from enum import IntEnum |
2 | | - |
3 | 1 | from ophyd import ADComponent as ADC |
4 | 2 | from ophyd import ( |
5 | 3 | AreaDetector, |
|
13 | 11 | ROIPlugin, |
14 | 12 | ) |
15 | 13 |
|
| 14 | +from dodal.devices.areadetector.plugins.MXSC import MXSC |
16 | 15 | from dodal.devices.oav.grid_overlay import SnapshotWithGrid |
17 | 16 |
|
18 | 17 |
|
19 | | -class ColorMode(IntEnum): |
20 | | - """ |
21 | | - Enum to store the various color modes of the camera. We use RGB1. |
22 | | - """ |
23 | | - |
24 | | - MONO = 0 |
25 | | - BAYER = 1 |
26 | | - RGB1 = 2 |
27 | | - RGB2 = 3 |
28 | | - RGB3 = 4 |
29 | | - YUV444 = 5 |
30 | | - YUV422 = 6 |
31 | | - YUV421 = 7 |
32 | | - |
33 | | - |
34 | 18 | class ZoomController(Device): |
35 | 19 | """ |
36 | 20 | Device to control the zoom level, this is unfortunately on a different prefix |
@@ -62,51 +46,6 @@ def allowed_zoom_levels(self): |
62 | 46 | ] |
63 | 47 |
|
64 | 48 |
|
65 | | -class EdgeOutputArrayImageType(IntEnum): |
66 | | - """ |
67 | | - Enum to store the types of image to tweak the output array. We use Original. |
68 | | - """ |
69 | | - |
70 | | - ORIGINAL = 0 |
71 | | - GREYSCALE = 1 |
72 | | - PREPROCESSED = 2 |
73 | | - CANNY_EDGES = 3 |
74 | | - CLOSED_EDGES = 4 |
75 | | - |
76 | | - |
77 | | -class MXSC(Device): |
78 | | - """ |
79 | | - Device for edge detection plugin. |
80 | | - """ |
81 | | - |
82 | | - input_plugin_pv: EpicsSignal = Component(EpicsSignal, "NDArrayPort") |
83 | | - enable_callbacks_pv: EpicsSignal = Component(EpicsSignal, "EnableCallbacks") |
84 | | - min_callback_time_pv: EpicsSignal = Component(EpicsSignal, "MinCallbackTime") |
85 | | - blocking_callbacks_pv: EpicsSignal = Component(EpicsSignal, "BlockingCallbacks") |
86 | | - read_file: EpicsSignal = Component(EpicsSignal, "ReadFile") |
87 | | - py_filename: EpicsSignal = Component(EpicsSignal, "Filename", string=True) |
88 | | - preprocess_operation: EpicsSignal = Component(EpicsSignal, "Preprocess") |
89 | | - preprocess_ksize: EpicsSignal = Component(EpicsSignal, "PpParam1") |
90 | | - canny_upper_threshold: EpicsSignal = Component(EpicsSignal, "CannyUpper") |
91 | | - canny_lower_threshold: EpicsSignal = Component(EpicsSignal, "CannyLower") |
92 | | - close_ksize: EpicsSignal = Component(EpicsSignal, "CloseKsize") |
93 | | - sample_detection_scan_direction: EpicsSignal = Component( |
94 | | - EpicsSignal, "ScanDirection" |
95 | | - ) |
96 | | - sample_detection_min_tip_height: EpicsSignal = Component( |
97 | | - EpicsSignal, "MinTipHeight" |
98 | | - ) |
99 | | - tip_x: EpicsSignal = Component(EpicsSignal, "TipX") |
100 | | - tip_y: EpicsSignal = Component(EpicsSignal, "TipY") |
101 | | - top: EpicsSignal = Component(EpicsSignal, "Top") |
102 | | - bottom: EpicsSignal = Component(EpicsSignal, "Bottom") |
103 | | - output_array: EpicsSignal = Component(EpicsSignal, "OutputArray") |
104 | | - draw_tip: EpicsSignal = Component(EpicsSignal, "DrawTip") |
105 | | - draw_edges: EpicsSignal = Component(EpicsSignal, "DrawEdges") |
106 | | - waveform_size_x: EpicsSignal = Component(EpicsSignal, "ArraySize1_RBV") |
107 | | - waveform_size_y: EpicsSignal = Component(EpicsSignal, "ArraySize2_RBV") |
108 | | - |
109 | | - |
110 | 49 | class OAV(AreaDetector): |
111 | 50 | cam: CamBase = ADC(CamBase, "-DI-OAV-01:CAM:") |
112 | 51 | roi: ADC = ADC(ROIPlugin, "-DI-OAV-01:ROI:") |
|
0 commit comments