Fixes for the background detect as required by code review
This commit is contained in:
parent
8e133a978d
commit
13da56f3fd
1 changed files with 5 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
"""Test the scan planning algorithms of the Microscope.
|
"""Test the background detection algorithms.
|
||||||
|
|
||||||
As well as low level function by function tests, this test suite also provides tests
|
This tests both the base class an individual algorithms.
|
||||||
that simulate scanning a sample, checking that the expected path is followed.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
@ -10,7 +9,6 @@ import pytest
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
# Just for testing importing as
|
|
||||||
from openflexure_microscope_server.background_detect import (
|
from openflexure_microscope_server.background_detect import (
|
||||||
MissingBackgroundDataError,
|
MissingBackgroundDataError,
|
||||||
BackgroundDetectAlgorithm,
|
BackgroundDetectAlgorithm,
|
||||||
|
|
@ -154,6 +152,9 @@ def test_colour_channel_luv_save_load(background_image, sample_image):
|
||||||
sample, _ = cc_luv2.image_is_sample(sample_image)
|
sample, _ = cc_luv2.image_is_sample(sample_image)
|
||||||
assert sample
|
assert sample
|
||||||
|
|
||||||
|
# Remove the 2nd detector so we don't accidentally use it!
|
||||||
|
del cc_luv2
|
||||||
|
|
||||||
# One final test that None can be set explicitly to background data as this will
|
# One final test that None can be set explicitly to background data as this will
|
||||||
# happen if loading with background detect not saved.
|
# happen if loading with background detect not saved.
|
||||||
cc_luv3 = ColourChannelDetectLUV()
|
cc_luv3 = ColourChannelDetectLUV()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue