The problem I am having is that camera/stage mapping fails. Here is what I’m doing and my setup:
I have some onion membrane on the delta stage microscope on a slide, in focus, in view (camera has been calibrated earlier). This is the image I have as per below (no cover slip atm nor immersion oil … still in the mail). The objective is 100x magnification. I can move the stage around, all 3 motors move when I change the Z height (all motors are working). Moving in XY results in diagonal movement, hence wishing to do the mapping calibration. I’ve set the stage as SangaStage Delta
in settings.
I have tried the camera/stage mapping procedure with 100, 10, and 1 as step size but it fails every time.
Here is the log output:
1/10/2022 4:07:05 pm
ERROR: Traceback (most recent call last):
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py", line 255, in wrapped
self._return_value = f(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/flask/ctx.py", line 158, in wrapper
return f(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/api/default_extensions/camera_stage_mapping.py", line 295, in post
return self.extension.calibrate_xy()
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/api/default_extensions/camera_stage_mapping.py", line 189, in calibrate_xy
cal_x: dict = self.calibrate_1d((1, 0, 0))
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/api/default_extensions/camera_stage_mapping.py", line 182, in calibrate_1d
result: dict = calibrate_backlash_1d(tracker, move, direction_array)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/camera_stage_mapping/camera_stage_calibration_1d.py", line 227, in calibrate_backlash_1d
raise e
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/camera_stage_mapping/camera_stage_calibration_1d.py", line 211, in calibrate_backlash_1d
res = fit_backlash(linear_moves)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/camera_stage_mapping/camera_stage_calibration_1d.py", line 129, in fit_backlash
raise ValueError("The fit didn't look successful")
ValueError: The fit didn't look successful
Looking a little further, I notice that only 2 of the motors move when this procedure is running. The image tends to go out of focus when it is running. So at a glance I’m guessing that delta stages aren’t supported yet?
Thanks for your time
I might have to modify the code so that when the calibration fails, it does return it to where it was when it started. Atm it leaves it somewhere else, and puts the shown coordinates out of sync with where it actually is.