diff --git a/src/openflexure_microscope_server/things/autofocus.py b/src/openflexure_microscope_server/things/autofocus.py index a85b0d77..306a928c 100644 --- a/src/openflexure_microscope_server/things/autofocus.py +++ b/src/openflexure_microscope_server/things/autofocus.py @@ -253,22 +253,6 @@ class AutofocusThing(Thing): stage.move_absolute(z=peak_height) return heights.tolist(), sizes.tolist() - @thing_action - def verify_focus_sharpness( - self, sweep_sizes: list, camera: WrappedCamera, threshold: float = 0.95 - ): - """Take the sharpness curve of the autofocus, and the size of the current frame - to see if the autofocus completed successfully. Returns True if current sharpness - is within "leniency" number of frames from the peak of the autofocus""" - - current_sharpness = camera.grab_jpeg_size(stream_name="lores") - - peak = np.max(sweep_sizes) - base = np.min(sweep_sizes) - cutoff = threshold * (peak - base) - - return current_sharpness >= base + cutoff - @thing_property def stack_images_to_capture(self) -> int: """The number of images to capture and save in a stack