Skip to content

Commit 156fc8f

Browse files
committed
excitation_wavelength > emission_wavelength warning
1 parent 55b8710 commit 156fc8f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pylabrobot/plate_reading/plate_reader.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
from typing import List, Optional, cast
23

34
from pylabrobot.machines.machine import Machine, need_setup_finished
@@ -6,6 +7,8 @@
67
from pylabrobot.resources import Coordinate, Plate, Resource
78
from pylabrobot.resources.resource_holder import ResourceHolder
89

10+
logger = logging.getLogger(__name__)
11+
912

1013
class PlateReader(ResourceHolder, Machine):
1114
"""The front end for plate readers. Plate readers are devices that can read luminescence,
@@ -105,6 +108,11 @@ async def read_fluorescence(
105108
focal_height: The focal height to read the fluorescence at, in micrometers.
106109
"""
107110

111+
if excitation_wavelength > emission_wavelength:
112+
logger.warning(
113+
"Excitation wavelength is greater than emission wavelength. This is unusual and may indicate an error."
114+
)
115+
108116
return await self.backend.read_fluorescence(
109117
plate=self.get_plate(),
110118
excitation_wavelength=excitation_wavelength,

0 commit comments

Comments
 (0)