Skip to content
Snippets Groups Projects
Commit 7b12c20c authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Merge branch 'fix_559' into 'release_2024.2.0'

adds a condition if no side is provided

See merge request tomotools/nabu!531
parents 86c6d5fa 3cf1ebfe
No related branches found
No related tags found
No related merge requests found
...@@ -243,13 +243,13 @@ class CORFinder(CORFinderBase): ...@@ -243,13 +243,13 @@ class CORFinder(CORFinderBase):
# All find_shift() methods in self.search_methods have the same API with "img_1" and "img_2" # All find_shift() methods in self.search_methods have the same API with "img_1" and "img_2"
cor_exec_kwargs = update_func_kwargs(self.cor_finder.find_shift, self.cor_options) cor_exec_kwargs = update_func_kwargs(self.cor_finder.find_shift, self.cor_options)
cor_exec_kwargs["return_relative_to_middle"] = False cor_exec_kwargs["return_relative_to_middle"] = False
# FIXME # ----- FIXME -----
# 'self.cor_options' can contain 'side="from_file"', and we should not modify it directly # 'self.cor_options' can contain 'side="from_file"', and we should not modify it directly
# because it's entered by the user. # because it's entered by the user.
# Either make a copy of self.cor_options, or change the inspect() mechanism # Either make a copy of self.cor_options, or change the inspect() mechanism
if cor_exec_kwargs["side"] == "from_file": if cor_exec_kwargs.get("side", None) == "from_file":
cor_exec_kwargs["side"] = self._lookup_side or "center" cor_exec_kwargs["side"] = self._lookup_side or "center"
# # ------
if self._lookup_side is not None: if self._lookup_side is not None:
cor_exec_kwargs["side"] = self._lookup_side cor_exec_kwargs["side"] = self._lookup_side
self.logger.debug("%s.find_shift(%s)" % (self.cor_finder.__class__.__name__, str(cor_exec_kwargs))) self.logger.debug("%s.find_shift(%s)" % (self.cor_finder.__class__.__name__, str(cor_exec_kwargs)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment