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
tomoscan
Commits
c3cf2061
Commit
c3cf2061
authored
Mar 16, 2020
by
Pierre Paleo
Browse files
Add test for projections_compacted
parent
d16d6356
Pipeline
#22957
failed with stages
in 1 minute and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tomoscan/esrf/test/test_hdf5scan.py
View file @
c3cf2061
...
@@ -202,6 +202,21 @@ class TestHDF5Scan(HDF5TestBaseClass):
...
@@ -202,6 +202,21 @@ class TestHDF5Scan(HDF5TestBaseClass):
self
.
assertTrue
(
numpy
.
isclose
(
self
.
scan
.
get_distance
(
unit
=
'cm'
),
-
1997.35
))
self
.
assertTrue
(
numpy
.
isclose
(
self
.
scan
.
get_distance
(
unit
=
'cm'
),
-
1997.35
))
def
testCompactedProjs
(
self
):
projs_compacted
=
self
.
scan
.
projections_compacted
self
.
assertTrue
(
projs_compacted
.
keys
()
==
self
.
scan
.
projections
.
keys
())
# ~ print(set(map(str, list(projs_compacted.values()))))
for
i
in
range
(
22
,
1520
+
1
):
self
.
assertTrue
(
projs_compacted
[
i
].
data_slice
()
==
slice
(
22
,
1521
,
None
)
)
for
i
in
range
(
1542
,
1543
):
self
.
assertTrue
(
projs_compacted
[
i
].
data_slice
()
==
slice
(
1542
,
1543
,
None
)
)
def
suite
():
def
suite
():
test_suite
=
unittest
.
TestSuite
()
test_suite
=
unittest
.
TestSuite
()
for
ui
in
(
TestHDF5Scan
,
):
for
ui
in
(
TestHDF5Scan
,
):
...
...
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