Skip to content

Commit 15a6a27

Browse files
committed
update type
1 parent 7c3fa78 commit 15a6a27

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

pylabrobot/plate_reading/byonoy/byonoy_backend.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from pylabrobot.io.hid import HID
1010
from pylabrobot.plate_reading.backend import PlateReaderBackend
11-
from pylabrobot.resources.plate import Plate
11+
from pylabrobot.resources import Plate, Well
1212
from pylabrobot.utils.list import reshape_2d
1313

1414

@@ -128,7 +128,9 @@ class ByonoyAbsorbance96AutomateBackend(_ByonoyBase):
128128
def __init__(self) -> None:
129129
super().__init__(pid=0x1199, device_type=_ByonoyDevice.ABSORBANCE_96)
130130

131-
async def read_luminescence(self, plate: Plate, focal_height: float) -> List[List[float]]:
131+
async def read_luminescence(
132+
self, plate: Plate, wells: List[Well], focal_height: float
133+
) -> List[List[Optional[float]]]:
132134
raise NotImplementedError("Absorbance plate reader does not support luminescence reading.")
133135

134136
async def get_available_absorbance_wavelengths(self) -> List[float]:
@@ -145,7 +147,9 @@ async def get_available_absorbance_wavelengths(self) -> List[float]:
145147
available_wavelengths = [w for w in available_wavelengths if w != 0]
146148
return available_wavelengths
147149

148-
async def read_absorbance(self, plate: Plate, wavelength: int) -> List[List[float]]:
150+
async def read_absorbance(
151+
self, plate: Plate, wells: List[Well], wavelength: int
152+
) -> List[List[Optional[float]]]:
149153
"""Read the absorbance from the plate reader. This should return a list of lists, where the
150154
outer list is the columns of the plate and the inner list is the rows of the plate."""
151155

@@ -216,25 +220,26 @@ async def read_absorbance(self, plate: Plate, wavelength: int) -> List[List[floa
216220
async def read_fluorescence(
217221
self,
218222
plate: Plate,
223+
wells,
219224
excitation_wavelength: int,
220225
emission_wavelength: int,
221226
focal_height: float,
222-
) -> List[List[float]]:
227+
) -> List[List[Optional[float]]]:
223228
raise NotImplementedError("Absorbance plate reader does not support fluorescence reading.")
224229

225230

226231
class ByonoyLuminescence96AutomateBackend(_ByonoyBase):
227232
def __init__(self) -> None:
228233
super().__init__(pid=0x119B, device_type=_ByonoyDevice.LUMINESCENCE_96)
229234

230-
async def read_absorbance(self, plate, wavelength):
235+
async def read_absorbance(self, plate, wells, wavelength):
231236
raise NotImplementedError(
232237
"Luminescence plate reader does not support absorbance reading. Use ByonoyAbsorbance96Automate instead."
233238
)
234239

235240
async def read_luminescence(
236-
self, plate: Plate, focal_height: float, integration_time: float = 2
237-
) -> List[List[float]]:
241+
self, plate: Plate, wells: List[Well], focal_height: float, integration_time: float = 2
242+
) -> List[List[Optional[float]]]:
238243
"""integration_time: in seconds, default 2 s"""
239244

240245
await self.send_command(
@@ -303,8 +308,9 @@ async def read_luminescence(
303308
async def read_fluorescence(
304309
self,
305310
plate: Plate,
311+
wells,
306312
excitation_wavelength: int,
307313
emission_wavelength: int,
308314
focal_height: float,
309-
) -> List[List[float]]:
315+
) -> List[List[Optional[float]]]:
310316
raise NotImplementedError("Fluorescence plate reader does not support fluorescence reading.")

0 commit comments

Comments
 (0)