Commit 9525bd3b authored by Pierre Paleo's avatar Pierre Paleo
Browse files

EDFTomoScan: bugfix for weird projections names

parent 916eec6f
Pipeline #21910 passed with stages
in 2 minutes and 1 second
......@@ -320,8 +320,7 @@ class EDFTomoScan(TomoScanBase):
def extract_index(my_str, type_):
res = []
modified_str = copy.copy(my_str)
while modified_str[-1].isdigit():
while modified_str != "" and modified_str[-1].isdigit():
res.append(modified_str[-1])
modified_str = modified_str[:-1]
if len(res) == 0:
......@@ -332,7 +331,7 @@ class EDFTomoScan(TomoScanBase):
return int(''.join(orignalOrder)), modified_str
else:
return float('.'.join(('0', ''.join(orignalOrder)))), modified_str
_file = os.path.basename(_file)
if _file.endswith('.edf'):
name = _file.replace(basename, '', 1)
name = name.rstrip('.edf')
......
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