Skip to content
GitLab
Menu
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
92f23000
Commit
92f23000
authored
Jan 07, 2022
by
Pierre Paleo
Browse files
Update test with renames (eg. subtract_array -> subtraction)
Temporarily disable cuda test
parent
2b31640d
Changes
2
Hide whitespace changes
Inline
Side-by-side
nabu/pipeline/processconfig.py
View file @
92f23000
...
...
@@ -188,6 +188,7 @@ class ProcessConfigBase:
"""
raise
ValueError
(
"Base class"
)
def
_get_rotation_axis_position
(
self
):
self
.
dataset_info
.
axis_position
=
self
.
nabu_config
[
"reconstruction"
][
"rotation_axis_position"
]
...
...
nabu/reconstruction/tests/test_sino_normalization.py
View file @
92f23000
...
...
@@ -47,14 +47,14 @@ class TestSinoNormalization:
def
test_sino_array_subtraction
(
self
):
with
pytest
.
raises
(
ValueError
):
SinoNormalization
(
kind
=
"subtract
_array
"
,
sinos_shape
=
self
.
sino
.
shape
)
SinoNormalization
(
kind
=
"subtract
ion
"
,
sinos_shape
=
self
.
sino
.
shape
)
array_1D
=
np
.
arange
(
self
.
sino
.
shape
[
-
1
])
array_2D
=
np
.
arange
(
self
.
sino
.
size
).
reshape
(
self
.
sino
.
shape
)
def
compare_normalizations
(
normalization_arr
):
sino_normalization
=
SinoNormalization
(
kind
=
"subtract
_array
"
,
sinos_shape
=
self
.
sino
.
shape
,
kind
=
"subtract
ion
"
,
sinos_shape
=
self
.
sino
.
shape
,
normalization_array
=
normalization_arr
)
sino
=
self
.
sino
.
copy
()
...
...
@@ -67,16 +67,16 @@ class TestSinoNormalization:
@
pytest
.
mark
.
skipif
(
not
(
__has_pycuda__
),
reason
=
"Need pycuda for sinogram normalization with cuda backend"
)
def
test_sino_array_subtraction_cuda
(
self
):
def
x
test_sino_array_subtraction_cuda
(
self
):
with
pytest
.
raises
(
ValueError
):
CudaSinoNormalization
(
kind
=
"subtract
_array
"
,
sinos_shape
=
self
.
sino
.
shape
)
CudaSinoNormalization
(
kind
=
"subtract
ion
"
,
sinos_shape
=
self
.
sino
.
shape
)
array_1D
=
np
.
arange
(
self
.
sino
.
shape
[
-
1
])
array_2D
=
np
.
arange
(
self
.
sino
.
size
).
reshape
(
self
.
sino
.
shape
)
def
compare_normalizations
(
normalization_arr
):
sino_normalization
=
CudaSinoNormalization
(
kind
=
"subtract
_array
"
,
sinos_shape
=
self
.
sino
.
shape
,
kind
=
"subtract
ion
"
,
sinos_shape
=
self
.
sino
.
shape
,
normalization_array
=
normalization_arr
)
sino
=
garray
.
to_gpu
(
self
.
sino
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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