13
13
_CONFIG = "-OP-PCOL-01:"
14
14
15
15
16
- APERTURE_SIZES = [20 , 40 , 100 , 3000 ]
17
-
18
-
19
16
class PinColRequest (SubsetEnum ):
20
17
# NOTE. Using subset anum because from the OUT positions should only be used by
21
18
# the beamline scientists from the synoptic.
@@ -26,16 +23,14 @@ class PinColRequest(SubsetEnum):
26
23
PCOL3000 = "3000um"
27
24
28
25
29
- def define_allowed_aperture_requests ():
26
+ def define_allowed_aperture_requests () -> list [ str ] :
30
27
aperture_list = [v .value for v in PinColRequest ]
31
28
aperture_list .append ("OUT" )
32
29
return aperture_list
33
30
34
31
35
32
class PinColConfiguration (StandardReadable ):
36
- def __init__ (
37
- self , prefix : str , apertures : list [int ] = APERTURE_SIZES , name : str = ""
38
- ) -> None :
33
+ def __init__ (self , prefix : str , apertures : list [int ], name : str = "" ) -> None :
39
34
with self .add_children_as_readables ():
40
35
self .selection = epics_signal_rw (PinColRequest , f"{ prefix } " )
41
36
self .pin_x = MAPTConfiguration (prefix , "PINX" , apertures )
@@ -58,10 +53,13 @@ def __init__(
58
53
config_infix : str = _CONFIG ,
59
54
):
60
55
self ._allowed_requests = define_allowed_aperture_requests ()
56
+ self ._aperture_sizes = [self ._get_aperture_size (i ) for i in PinColRequest ]
61
57
with self .add_children_as_readables ():
62
58
self .pinhole = XYStage (f"{ prefix } { pin_infix } " )
63
59
self .collimator = XYStage (f"{ prefix } { col_infix } " )
64
- self .config = PinColConfiguration (f"{ prefix } { config_infix } CONFIG" )
60
+ self .config = PinColConfiguration (
61
+ f"{ prefix } { config_infix } CONFIG" , apertures = self ._aperture_sizes
62
+ )
65
63
super ().__init__ (name = name )
66
64
67
65
def _get_aperture_size (self , request : str ) -> int :
0 commit comments