Commit 3353b97e authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Alignment: output fixes



Signed-off-by: Nicola Vigano's avatarNicola VIGANÒ <nicola.vigano@esrf.fr>
parent 6b7c1886
......@@ -82,7 +82,7 @@ class AlignmentBase(object):
vertex_max_yx = [np.max(fy), np.max(fx)]
if np.any(vertex_yx < vertex_min_yx) or np.any(vertex_yx > vertex_max_yx):
raise ValueError(
"Fitted (y: {}, x: {}) positions are outide the margins of input: y: [{}, {}], x: [{}, {}]".format(
"Fitted (y: {}, x: {}) positions are outide the input margins y: [{}, {}], and x: [{}, {}]".format(
vertex_yx[0], vertex_yx[1], vertex_min_yx[0], vertex_max_yx[0], vertex_min_yx[1], vertex_max_yx[1]
)
)
......@@ -302,7 +302,6 @@ class AlignmentBase(object):
slicing = [slice(None)] * len(img_shape)
for a in axes:
slicing[a] = slice(pad_size[a], cc.shape[a]-pad_size[a])
print(slicing)
cc = cc[tuple(slicing)]
cc = np.fft.ifftshift(cc, axes=axes)
......
......@@ -98,7 +98,7 @@ class TestAlignmentBase(object):
"Error should have been raised about the peak being fitted outside margins, "
+ "other error raised instead:\n%s" % str(ex.value)
)
assert "positions are outide the margins of input" in str(ex.value), message
assert "positions are outide the input margins" in str(ex.value), message
@pytest.mark.usefixtures("bootstrap_cor")
......
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