Import custom Mapping error from camera_stage_mapping
This commit is contained in:
parent
67443ff939
commit
9995e5b3bb
1 changed files with 2 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ from camera_stage_mapping.camera_stage_calibration_1d import (
|
||||||
calibrate_backlash_1d,
|
calibrate_backlash_1d,
|
||||||
image_to_stage_displacement_from_1d,
|
image_to_stage_displacement_from_1d,
|
||||||
)
|
)
|
||||||
|
from camera_stage_mapping.exceoptions import MappingError
|
||||||
from labthings_fastapi.dependencies.invocation import (
|
from labthings_fastapi.dependencies.invocation import (
|
||||||
InvocationCancelledError,
|
InvocationCancelledError,
|
||||||
InvocationLogger,
|
InvocationLogger,
|
||||||
|
|
@ -206,7 +207,7 @@ class CameraStageMapper(Thing):
|
||||||
result: dict = calibrate_backlash_1d(
|
result: dict = calibrate_backlash_1d(
|
||||||
tracker, move, direction_array, logger=logger
|
tracker, move, direction_array, logger=logger
|
||||||
)
|
)
|
||||||
except (InvocationCancelledError, ValueError) as e:
|
except (InvocationCancelledError, MappingError) as e:
|
||||||
logger.info("Returning to starting position")
|
logger.info("Returning to starting position")
|
||||||
stage.move_absolute(**starting_position, block_cancellation=True)
|
stage.move_absolute(**starting_position, block_cancellation=True)
|
||||||
raise e
|
raise e
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue