Skip to content

Commit 29564b4

Browse files
committed
[cytation5] improve autofocus effiency by rounding cache key to tol
1 parent 910e529 commit 29564b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pylabrobot/plate_reading/biotek_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async def _golden_ratio_search(
7070
cache: Dict[float, float] = {}
7171

7272
async def cached_func(x: float) -> float:
73+
x = round(x / tol) * tol # round x to units of tol
7374
if x not in cache:
7475
cache[x] = await func(x)
7576
return cache[x]

0 commit comments

Comments
 (0)