Change all CameraDeps to CameraClients
This commit is contained in:
parent
473a09442a
commit
bd115e0023
3 changed files with 13 additions and 13 deletions
|
|
@ -20,8 +20,8 @@ from pydantic import BaseModel
|
|||
import labthings_fastapi as lt
|
||||
from labthings_fastapi.types.numpy import NDArray
|
||||
|
||||
from .camera import RawCameraDependency as Camera
|
||||
from .camera import CameraDependency as WrappedCamera
|
||||
from .camera import RawCameraDependency as RawCamera
|
||||
from .camera import CameraDependency as CameraClient
|
||||
from .stage import StageDependency as Stage
|
||||
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ class JPEGSharpnessMonitor:
|
|||
SharpnessMonitorDep as an argument is called.
|
||||
"""
|
||||
|
||||
def __init__(self, stage: Stage, camera: Camera, portal: lt.deps.BlockingPortal):
|
||||
def __init__(self, stage: Stage, camera: RawCamera, portal: lt.deps.BlockingPortal):
|
||||
"""Initialise a new JPEGSharpnessMonitor. The args are injected automatically.
|
||||
|
||||
:param stage: A direct_thing_client dependency for the the microscope stage.
|
||||
|
|
@ -470,7 +470,7 @@ class AutofocusThing(lt.Thing):
|
|||
@lt.thing_action
|
||||
def run_smart_stack(
|
||||
self,
|
||||
cam: WrappedCamera,
|
||||
cam: CameraClient,
|
||||
stage: Stage,
|
||||
sharpness_monitor: SharpnessMonitorDep,
|
||||
images_dir: str,
|
||||
|
|
@ -574,7 +574,7 @@ class AutofocusThing(lt.Thing):
|
|||
sharpest_id: int,
|
||||
captures: list[list],
|
||||
stack_parameters: StackParams,
|
||||
cam: WrappedCamera,
|
||||
cam: CameraClient,
|
||||
) -> int:
|
||||
"""Save the required captures to disk.
|
||||
|
||||
|
|
@ -604,7 +604,7 @@ class AutofocusThing(lt.Thing):
|
|||
def z_stack(
|
||||
self,
|
||||
stack_parameters: StackParams,
|
||||
cam: WrappedCamera,
|
||||
cam: CameraClient,
|
||||
stage: Stage,
|
||||
) -> tuple[bool, list[CaptureInfo], Optional[int]]:
|
||||
"""Capture a series of images checking that sharpest image central.
|
||||
|
|
@ -669,7 +669,7 @@ class AutofocusThing(lt.Thing):
|
|||
|
||||
def capture_stack_image(
|
||||
self,
|
||||
cam: WrappedCamera,
|
||||
cam: CameraClient,
|
||||
stage: Stage,
|
||||
buffer_max: int,
|
||||
) -> CaptureInfo:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import labthings_fastapi as lt
|
|||
from labthings_fastapi.types.numpy import DenumpifyingDict
|
||||
|
||||
from camera_stage_mapping.camera_stage_tracker import Tracker
|
||||
from .camera import CameraDependency as Camera
|
||||
from .camera import CameraDependency as CameraClient
|
||||
from .stage import StageDependency as Stage
|
||||
|
||||
CoordinateType = Tuple[float, float, float]
|
||||
|
|
@ -120,7 +120,7 @@ class CameraStageMapper(lt.Thing):
|
|||
@lt.thing_action
|
||||
def calibrate_1d(
|
||||
self,
|
||||
camera: Camera,
|
||||
camera: CameraClient,
|
||||
stage: Stage,
|
||||
logger: lt.deps.InvocationLogger,
|
||||
direction: Tuple[float, float, float],
|
||||
|
|
@ -155,7 +155,7 @@ class CameraStageMapper(lt.Thing):
|
|||
|
||||
@lt.thing_action
|
||||
def calibrate_xy(
|
||||
self, camera: Camera, stage: Stage, logger: lt.deps.InvocationLogger
|
||||
self, camera: CameraClient, stage: Stage, logger: lt.deps.InvocationLogger
|
||||
) -> DenumpifyingDict:
|
||||
"""Move the microscope's stage in X and Y, to calibrate its relationship to the camera.
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ from openflexure_microscope_server import stitching
|
|||
# Things
|
||||
from .autofocus import AutofocusThing
|
||||
from .camera_stage_mapping import CameraStageMapper
|
||||
from .camera import CameraDependency as CamDep
|
||||
from .camera import CameraDependency as CameraClient
|
||||
from .stage import StageDependency as StageDep
|
||||
|
||||
CSMDep = lt.deps.direct_thing_client_dependency(
|
||||
|
|
@ -95,7 +95,7 @@ class SmartScanThing(lt.Thing):
|
|||
self._cancel: Optional[lt.deps.CancelHook] = None
|
||||
self._autofocus: Optional[AutofocusDep] = None
|
||||
self._stage: Optional[StageDep] = None
|
||||
self._cam: Optional[CamDep] = None
|
||||
self._cam: Optional[CameraClient] = None
|
||||
self._csm: Optional[CSMDep] = None
|
||||
|
||||
self._ongoing_scan: Optional[scan_directories.ScanDirectory] = None
|
||||
|
|
@ -109,7 +109,7 @@ class SmartScanThing(lt.Thing):
|
|||
logger: lt.deps.InvocationLogger,
|
||||
autofocus: AutofocusDep,
|
||||
stage: StageDep,
|
||||
cam: CamDep,
|
||||
cam: CameraClient,
|
||||
csm: CSMDep,
|
||||
scan_name: str = "",
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue