Complete first pass (untested on hardware) of bg detect refactor.
This commit is contained in:
parent
2245d9357d
commit
fe1b84a922
10 changed files with 90 additions and 88 deletions
|
|
@ -1,4 +1,4 @@
|
|||
"""Testing submodule with mock Background Detect Things.
|
||||
"""Testing submodule with mock Camera Things.
|
||||
|
||||
These mocks are designed to be inserted as dependencies to provide specific
|
||||
functionality and return values.
|
||||
|
|
@ -7,10 +7,13 @@ The mocks do not subclass Things. Instead, they return predefined
|
|||
answers to functions.
|
||||
"""
|
||||
|
||||
from openflexure_microscope_server.things.background_detect import ChannelDistributions
|
||||
from openflexure_microscope_server.background_detect import (
|
||||
BackgroundDetectorStatus,
|
||||
ColourChannelDetectSettings,
|
||||
)
|
||||
|
||||
|
||||
class MockBackgroundDetectThing:
|
||||
class MockCameraThing:
|
||||
"""A mock background detect Thing that imports no code from BackgroundDetectThing.
|
||||
|
||||
The class needs functionality added to it over time as more complex
|
||||
|
|
@ -18,8 +21,8 @@ class MockBackgroundDetectThing:
|
|||
is not artificially inflated.
|
||||
"""
|
||||
|
||||
background_distributions = ChannelDistributions(
|
||||
means=[128.0, 128.0, 128.0],
|
||||
standard_deviations=[3.0, 3.0, 3.0],
|
||||
colorspace="LUV",
|
||||
background_detector_status = BackgroundDetectorStatus(
|
||||
ready=True,
|
||||
settings=ColourChannelDetectSettings(),
|
||||
settings_schema={"fake": "schema"},
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue