Commit b2794cf5 authored by myron's avatar myron Committed by Pierre Paleo
Browse files

added documentation for global search

parent a1ae1f9d
......@@ -95,13 +95,9 @@ class AlignmentBase(object):
shape_1 = np.squeeze(img_1).shape
shape_2 = np.squeeze(img_2).shape
if not len(shape_1) == 2:
raise ValueError(
"Images need to be 2-dimensional. Shape of image #1: %s" % (" ".join(("%d" % x for x in shape_1)))
)
raise ValueError("Images need to be 2-dimensional. Shape of image #1: %s" % (" ".join(("%d" % x for x in shape_1))))
if not len(shape_2) == 2:
raise ValueError(
"Images need to be 2-dimensional. Shape of image #2: %s" % (" ".join(("%d" % x for x in shape_2)))
)
raise ValueError("Images need to be 2-dimensional. Shape of image #2: %s" % (" ".join(("%d" % x for x in shape_2))))
if not np.all(shape_1 == shape_2):
raise ValueError(
"Images need to be of the same shape. Shape of image #1: %s, image #2: %s"
......@@ -240,9 +236,7 @@ class AlignmentBase(object):
upper_bound_ok = vertex_x < vertex_max_x
if not np.all(lower_bound_ok * upper_bound_ok):
if len(f_vals.shape) == 1:
message = "Fitted position {} is outide the input margins [{}, {}]".format(
vertex_x, vertex_min_x, vertex_max_x
)
message = "Fitted position {} is outide the input margins [{}, {}]".format(vertex_x, vertex_min_x, vertex_max_x)
else:
message = "Fitted positions outide the input margins [{}, {}]: %d below and %d above".format(
vertex_min_x, vertex_max_x, np.sum(1 - lower_bound_ok), np.sum(1 - upper_bound_ok),
......@@ -582,6 +576,9 @@ class CenterOfRotation(AlignmentBase):
half_tomo_cor_guess: float or None
The approximate position of the rotation axis from the image center. Optional.
When given a special algorithm is used which can work also in half-tomo conditions
global_search: False, True or a couple of floats
If True a global search is done on on the detector span without assuming centered scan conditions.
If (lim1,lim2) the search is done between lim1 and lim2
Raises
------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment