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
e1168a73
Commit
e1168a73
authored
Feb 25, 2020
by
payno
Browse files
[scanbase] use index with urls values instead of index. Index might not start at 0
parent
21308146
Changes
1
Hide whitespace changes
Inline
Side-by-side
tomoscan/scanbase.py
View file @
e1168a73
...
...
@@ -268,10 +268,10 @@ class TomoScanBase:
:warning: each url should contain only one radio.
:param urls:
ordered lis
t with all the urls. First url should be
:param urls:
dic
t with all the urls. First url should be
the first radio acquire, last url should match the last
radio acquire.
:type:
lis
t
:type:
dic
t
:param n_projection: number of projection for the sample.
:type: int
:param scan_range: acquisition range (usually 180 or 360)
...
...
@@ -283,17 +283,18 @@ class TomoScanBase:
are incoherent
"""
assert
n_projection
is
not
None
ordered_url
=
OrderedDict
(
sorted
(
urls
.
items
(),
key
=
lambda
x
:
x
))
ordered_url
=
OrderedDict
(
sorted
(
urls
.
items
(),
key
=
lambda
x
:
x
))
res
=
{}
# deal with the 'standard' acquisitions
for
proj_i
in
range
(
n_projection
):
url
=
list
(
ordered_url
.
values
())[
proj_i
]
if
n_projection
==
1
:
angle
=
0.0
else
:
angle
=
proj_i
*
scan_range
/
(
n_projection
-
1
)
if
proj_i
<
len
(
urls
):
res
[
angle
]
=
url
s
[
proj_i
]
res
[
angle
]
=
url
if
len
(
urls
)
>
n_projection
:
# deal with extra images (used to check if the sampled as moved for
...
...
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