Skip to content

Commit 1a51f5f

Browse files
committed
new autofocus api in cytation docs
1 parent a1d61b7 commit 1a51f5f

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

docs/user_guide/02_analytical/plate-reading/cytation5.ipynb

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
"res = await pr.capture(\n",
346346
" well=(1, 2),\n",
347347
" mode=ImagingMode.BRIGHTFIELD,\n",
348-
" objective=Objective.O_4x_PL_FL_PHASE,\n",
348+
" objective=Objective.O_4X_PL_FL_Phase,\n",
349349
" focal_height=0.833,\n",
350350
" exposure_time=5,\n",
351351
" gain=16,\n",
@@ -363,15 +363,6 @@
363363
"Auto-focus can be configured with `pr.backend.set_auto_focus_search_range` where the parameters are the minimum and maximum focus heights in mm respectively."
364364
]
365365
},
366-
{
367-
"cell_type": "code",
368-
"execution_count": 33,
369-
"metadata": {},
370-
"outputs": [],
371-
"source": [
372-
"pr.backend.set_auto_focus_search_range(0.6, 1)"
373-
]
374-
},
375366
{
376367
"cell_type": "code",
377368
"execution_count": null,
@@ -399,11 +390,19 @@
399390
}
400391
],
401392
"source": [
393+
"from pylabrobot.plate_reading.standard import AutoFocus\n",
394+
"from pylabrobot.plate_reading.imager import evaluate_focus_nvmg_sobel\n",
395+
"\n",
402396
"res = await pr.capture(\n",
403397
" well=(1, 2),\n",
404398
" mode=ImagingMode.BRIGHTFIELD,\n",
405-
" objective=Objective.O_4x_PL_FL_PHASE,\n",
406-
" focal_height=\"auto\", # <----- auto focus\n",
399+
" objective=Objective.O_4X_PL_FL_Phase,\n",
400+
" focal_height=AutoFocus(\n",
401+
" low=1.8,\n",
402+
" high=2.0,\n",
403+
" evaluate_focus=evaluate_focus_nvmg_sobel,\n",
404+
" timeout=30,\n",
405+
" ),\n",
407406
" exposure_time=5,\n",
408407
" gain=16,\n",
409408
" led_intensity=10\n",
@@ -513,7 +512,7 @@
513512
"res = await pr.capture(\n",
514513
" well=(1, 2),\n",
515514
" mode=ImagingMode.BRIGHTFIELD,\n",
516-
" objective=Objective.O_4x_PL_FL_PHASE,\n",
515+
" objective=Objective.O_4X_PL_FL_Phase,\n",
517516
" focal_height=0.833,\n",
518517
" exposure_time=5,\n",
519518
" gain=16,\n",

pylabrobot/plate_reading/biotek_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import re
77
import time
88
from dataclasses import dataclass
9-
from typing import Any, Callable, Coroutine, Dict, List, Literal, Optional, Tuple, Union, cast
9+
from typing import List, Literal, Optional, Tuple, Union, cast
1010

1111
from pylabrobot.resources.plate import Plate
1212

0 commit comments

Comments
 (0)