Remove the overwriting of internal globals, requires removing future annoations
This commit is contained in:
parent
7435d15b65
commit
be07966631
1 changed files with 7 additions and 10 deletions
|
|
@ -6,7 +6,6 @@ camera together to perform an autofocus routine.
|
|||
See repository root for licensing information.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
from contextlib import contextmanager
|
||||
import logging
|
||||
import time
|
||||
|
|
@ -37,9 +36,14 @@ CaptureDep = direct_thing_client_dependency(CaptureThing, "/capture/")
|
|||
SETTLING_TIME = 0.3
|
||||
|
||||
|
||||
class JPEGSharpnessMonitor:
|
||||
__globals__ = globals() # Required for FastAPI dependency
|
||||
class SharpnessDataArrays(BaseModel):
|
||||
jpeg_times: NDArray
|
||||
jpeg_sizes: NDArray
|
||||
stage_times: NDArray
|
||||
stage_positions: list[dict[str, int]]
|
||||
|
||||
|
||||
class JPEGSharpnessMonitor:
|
||||
def __init__(self, stage: Stage, camera: Camera, portal: BlockingPortal):
|
||||
self.camera = camera
|
||||
self.stage = stage
|
||||
|
|
@ -140,13 +144,6 @@ class JPEGSharpnessMonitor:
|
|||
SharpnessMonitorDep = Annotated[JPEGSharpnessMonitor, Depends()]
|
||||
|
||||
|
||||
class SharpnessDataArrays(BaseModel):
|
||||
jpeg_times: NDArray
|
||||
jpeg_sizes: NDArray
|
||||
stage_times: NDArray
|
||||
stage_positions: list[dict[str, int]]
|
||||
|
||||
|
||||
class AutofocusThing(Thing):
|
||||
"""The Thing concerned with combinations of z axis movements and the camera.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue