Skip to content
Snippets Groups Projects
Commit 4d44e620 authored by Marius Retegan's avatar Marius Retegan
Browse files

Switch to union mode if intersection fails

parent 49c3f29a
No related branches found
No related tags found
No related merge requests found
Pipeline #186947 passed
......@@ -453,10 +453,20 @@ class Scans:
f"size = {axis.size:d}, step = {step(axis):.8f}."
)
logger.debug(message)
if np.array_equal(common_axis, axis):
continue
common_axis = arrays.merge(common_axis, axis, mode=mode)
if common_axis.size == 0 and mode == "intersection":
message = (
f"Common axis is empty after merging scan {self.scans[i].label}. "
"Switching to union mode in common axis search."
)
logger.warning(message)
return self.get_common_axis(label, mode="union")
message = (
f"Common axis parameters using {mode} mode: "
f"start = {common_axis[0]:.8f}, stop = {common_axis[-1]:.8f}, "
......
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