Fix a bug in multislice where it doesn't work when prevent_alias is set to True

This commit is contained in:
Abe Levitan
2021-06-02 14:48:57 -04:00
parent 2854a872ee
commit 188a685503
6 changed files with 25 additions and 15 deletions
+5 -1
View File
@@ -354,7 +354,11 @@ def get_data(cxi_file, cut_zeroes = True):
data[data < 0] = 0
if 'axes' in cxi_file[pull_from].attrs:
axes = str(cxi_file[pull_from].attrs['axes'].decode()).split(':')
try:
axes = str(cxi_file[pull_from].attrs['axes'].decode()).split(':')
except AttributeError as e: # Weird string vs bytes thing, ehhh
axes = str(cxi_file[pull_from].attrs['axes']).split(':')
axes = [axis.strip().lower() for axis in axes]
else:
axes = None