Skip to content

Commit 1ee4847

Browse files
committed
Remove global
1 parent 081d145 commit 1ee4847

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/dodal/devices/i19/pin_col_stages.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
_CONFIG = "-OP-PCOL-01:"
1414

1515

16-
APERTURE_SIZES = [20, 40, 100, 3000]
17-
18-
1916
class PinColRequest(SubsetEnum):
2017
# NOTE. Using subset anum because from the OUT positions should only be used by
2118
# the beamline scientists from the synoptic.
@@ -26,16 +23,14 @@ class PinColRequest(SubsetEnum):
2623
PCOL3000 = "3000um"
2724

2825

29-
def define_allowed_aperture_requests():
26+
def define_allowed_aperture_requests() -> list[str]:
3027
aperture_list = [v.value for v in PinColRequest]
3128
aperture_list.append("OUT")
3229
return aperture_list
3330

3431

3532
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:
3934
with self.add_children_as_readables():
4035
self.selection = epics_signal_rw(PinColRequest, f"{prefix}")
4136
self.pin_x = MAPTConfiguration(prefix, "PINX", apertures)
@@ -58,10 +53,13 @@ def __init__(
5853
config_infix: str = _CONFIG,
5954
):
6055
self._allowed_requests = define_allowed_aperture_requests()
56+
self._aperture_sizes = [self._get_aperture_size(i) for i in PinColRequest]
6157
with self.add_children_as_readables():
6258
self.pinhole = XYStage(f"{prefix}{pin_infix}")
6359
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+
)
6563
super().__init__(name=name)
6664

6765
def _get_aperture_size(self, request: str) -> int:

0 commit comments

Comments
 (0)