Commit e1168a73 authored by payno's avatar payno
Browse files

[scanbase] use index with urls values instead of index. Index might not start at 0

parent 21308146
......@@ -268,10 +268,10 @@ class TomoScanBase:
:warning: each url should contain only one radio.
:param urls: ordered list with all the urls. First url should be
:param urls: dict with all the urls. First url should be
the first radio acquire, last url should match the last
radio acquire.
:type: list
:type: dict
: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] = urls[proj_i]
res[angle] = url
if len(urls) > n_projection:
# deal with extra images (used to check if the sampled as moved for
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment