Skip to content

Commit da54b42

Browse files
committed
Use 0th order result if multiple orders present
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
1 parent 7dfd64e commit da54b42

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tomviz/python/tomviz/ptycho/ptycho.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,15 @@ def load_stack_ptycho(version_list: list[str],
211211
for i in tqdm(range(len(filespty_obj)), desc="processing ptycho"):
212212
obj = np.load(filespty_obj[i])
213213
prb = np.load(filespty_prb[i])
214+
215+
if obj.ndim == 3:
216+
# Get the 0th order result
217+
obj = obj[0]
218+
219+
if prb.ndim == 3:
220+
# Get the 0th order result
221+
prb = prb[0]
222+
214223
space = 15
215224
obj = np.fliplr(np.rot90(obj))
216225
prb = np.fliplr(np.rot90(prb))

0 commit comments

Comments
 (0)