Fixing bug related to focus finding in stack with only one slice. in_focus_index=0 should be returned by focus_from_transverse_band, not _check_focus_inputs. _check_focus_inputs could also be refactored into two functions that 1. check the inputs and 2. determine the correct optimization function. This will remove possible confusion on _check_focus_inputs returning a callable.
Thanks for catching and fixing, @ieivanov. I followed your refactoring suggestion, and I moved the single-slice check to the top level so that it can return 0 directly.
Fixing bug related to focus finding in stack with only one slice.
in_focus_index=0
should be returned byfocus_from_transverse_band
, not_check_focus_inputs
._check_focus_inputs
could also be refactored into two functions that 1. check the inputs and 2. determine the correct optimization function. This will remove possible confusion on_check_focus_inputs
returning a callable.