|
345 | 345 | "res = await pr.capture(\n", |
346 | 346 | " well=(1, 2),\n", |
347 | 347 | " mode=ImagingMode.BRIGHTFIELD,\n", |
348 | | - " objective=Objective.O_4x_PL_FL_PHASE,\n", |
| 348 | + " objective=Objective.O_4X_PL_FL_Phase,\n", |
349 | 349 | " focal_height=0.833,\n", |
350 | 350 | " exposure_time=5,\n", |
351 | 351 | " gain=16,\n", |
|
363 | 363 | "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." |
364 | 364 | ] |
365 | 365 | }, |
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 | | - }, |
375 | 366 | { |
376 | 367 | "cell_type": "code", |
377 | 368 | "execution_count": null, |
|
399 | 390 | } |
400 | 391 | ], |
401 | 392 | "source": [ |
| 393 | + "from pylabrobot.plate_reading.standard import AutoFocus\n", |
| 394 | + "from pylabrobot.plate_reading.imager import evaluate_focus_nvmg_sobel\n", |
| 395 | + "\n", |
402 | 396 | "res = await pr.capture(\n", |
403 | 397 | " well=(1, 2),\n", |
404 | 398 | " 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", |
407 | 406 | " exposure_time=5,\n", |
408 | 407 | " gain=16,\n", |
409 | 408 | " led_intensity=10\n", |
|
513 | 512 | "res = await pr.capture(\n", |
514 | 513 | " well=(1, 2),\n", |
515 | 514 | " mode=ImagingMode.BRIGHTFIELD,\n", |
516 | | - " objective=Objective.O_4x_PL_FL_PHASE,\n", |
| 515 | + " objective=Objective.O_4X_PL_FL_Phase,\n", |
517 | 516 | " focal_height=0.833,\n", |
518 | 517 | " exposure_time=5,\n", |
519 | 518 | " gain=16,\n", |
|
0 commit comments