Fix UI workflow test as order changed
This commit is contained in:
parent
f1845c3039
commit
1f01717a1b
2 changed files with 22 additions and 4 deletions
|
|
@ -548,10 +548,26 @@ class RectangleWorkflow(ScanWorkflow[TypeSettings], Generic[TypeSettings]):
|
|||
|
||||
# Shared scan settings
|
||||
autofocus_dz: int = lt.setting(default=1000, ge=200, le=2000)
|
||||
overlap: float = lt.setting(default=0.45, ge=0.1, le=0.7)
|
||||
x_count: int = lt.setting(default=3)
|
||||
y_count: int = lt.setting(default=2)
|
||||
|
||||
"""The z distance to perform an autofocus in steps.
|
||||
|
||||
Must be greater than or equal to 200, and less than or equal to 2000.
|
||||
"""
|
||||
|
||||
overlap: float = lt.setting(default=0.45, ge=0.1, le=0.7)
|
||||
"""The fraction that adjacent images should overlap in x or y.
|
||||
|
||||
This must be between 0.1 and 0.7.
|
||||
"""
|
||||
|
||||
x_count: int = lt.setting(default=3, ge=1)
|
||||
y_count: int = lt.setting(default=2, ge=1)
|
||||
"""The number of columns and rows in the scan.
|
||||
Must be at least 1.
|
||||
"""
|
||||
|
||||
# The noqa statement is because scan_name is unused but is needed for equivalence
|
||||
# with other workflows that may want to validate the scan name.
|
||||
def check_before_start(self, scan_name: str) -> None: # noqa: ARG002
|
||||
"""Before starting a scan, check that camera-stage-mapping is set.
|
||||
|
||||
|
|
@ -601,6 +617,8 @@ class RectangleWorkflow(ScanWorkflow[TypeSettings], Generic[TypeSettings]):
|
|||
"""Perform these steps before starting the scan.
|
||||
|
||||
In this case, only autofocus.
|
||||
|
||||
:param settings: The settings for this scan as as the relevant SettingsModel type.
|
||||
"""
|
||||
self._autofocus.looping_autofocus(dz=settings.autofocus_dz, start="centre")
|
||||
|
||||
|
|
|
|||
|
|
@ -342,11 +342,11 @@ def test_histo_workflow_settings_ui(histo_workflow):
|
|||
names = [el.property_name for el in ui]
|
||||
expected_names = [
|
||||
"overlap",
|
||||
"skip_background",
|
||||
"stack_images_to_save",
|
||||
"stack_min_images_to_test",
|
||||
"stack_dz",
|
||||
"autofocus_dz",
|
||||
"max_range",
|
||||
"skip_background",
|
||||
]
|
||||
assert names == expected_names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue