Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
284b7138
Commit
284b7138
authored
Jun 23, 2020
by
Nicola Vigano
Browse files
Alignment: fixed shifts in test
Signed-off-by:
Nicola VIGANÒ
<
nicola.vigano@esrf.fr
>
parent
37713ab9
Pipeline
#28030
passed with stages
in 4 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/preproc/tests/test_alignment.py
View file @
284b7138
...
...
@@ -35,14 +35,14 @@ def bootstrap_dtr(request):
cls
.
align_images
=
align_imgs
-
dark_img
cls
.
img_pos
=
(
1
+
np
.
arange
(
6
))
*
0.01
cls
.
expected_shifts_vh
=
np
.
array
((
255
1.25
,
308.9
))
cls
.
expected_shifts_vh
=
np
.
array
((
31
1.25
,
308.9
))
cls
.
reference_shifts_list
=
[
[
-
121.39034751
,
11.29
080154
],
[
-
117.01864405
,
3.81080018
],
[
-
115.66542712
,
9.73375546
],
[
-
116.72357645
,
16.71
435394
],
[
6.02
4768
,
20.28
406386
],
[
-
9.39
,
11.29
],
[
-
5.02
,
3.81
],
[
-
3.67
,
9.73
],
[
-
4.72
,
16.71
],
[
6.02
,
20.28
],
]
...
...
@@ -220,11 +220,11 @@ class TestDetectorTranslation(object):
shifts_v
,
shifts_h
,
found_shifts_list
=
T_calc
.
find_shift
(
self
.
align_images
,
self
.
img_pos
,
return_shifts
=
True
)
message
=
"Computed shifts coefficients %s and
found ones
%s do not coincide"
%
(
message
=
"Computed shifts coefficients %s and
expected
%s do not coincide"
%
(
(
shifts_v
,
shifts_h
),
self
.
expected_shifts_vh
,
)
assert
np
.
all
(
np
.
isclose
(
self
.
expected_shifts_vh
,
[
shifts_v
,
shifts_h
],
atol
=
self
.
abs_tol
)),
message
message
=
"Computed shifts %s and
found ones
%s do not coincide"
%
(
found_shifts_list
,
self
.
reference_shifts_list
)
message
=
"Computed shifts %s and
expected
%s do not coincide"
%
(
found_shifts_list
,
self
.
reference_shifts_list
)
assert
np
.
all
(
np
.
isclose
(
found_shifts_list
,
self
.
reference_shifts_list
,
atol
=
self
.
abs_tol
)),
message
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment