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
tomoscan
Commits
5756aa9c
Commit
5756aa9c
authored
Sep 10, 2020
by
payno
Browse files
[tomoscanbase] add `_get_flats_weights`
# Conflicts: # tomoscan/scanbase.py # tomoscan/test/test_scanbase.py
parent
f54423eb
Pipeline
#33243
passed with stages
in 3 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tomoscan/test/test_scanbase.py
View file @
5756aa9c
...
...
@@ -77,6 +77,13 @@ class TestFlatFieldCorrection(unittest.TestCase):
def
test_get_flats_weights
(
self
):
"""test the _get_flats_weights function and insure flat weights
are correct"""
projections
=
{}
for
i
in
range
(
-
2
,
30
):
projections
[
i
]
=
numpy
.
random
.
random
(
100
).
reshape
((
10
,
10
))
self
.
scan
.
projections
=
projections
def
test_get_flats_weights
(
self
):
flat_weights
=
self
.
scan
.
_get_flats_weights
()
self
.
assertTrue
(
isinstance
(
flat_weights
,
dict
))
self
.
assertEqual
(
len
(
flat_weights
),
32
)
...
...
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