Skip to content
Snippets Groups Projects
Commit 67cac040 authored by Arnaud HEMMERLE's avatar Arnaud HEMMERLE
Browse files

Fix bug when a 2D detector is present but images are empty

parent 17f53617
No related branches found
No related tags found
No related merge requests found
......@@ -317,9 +317,15 @@ def process_gixd_scan(
fig = None
# Avoid crash of the cell if 2D detector is not present
# or if the images are empty
if x is None:
is_plot = False
is_save = False
else:
if np.shape(mat_binned)[1] == 0:
is_plot = False
is_save = False
print(_RED+'\t. Images of 2D detector are empty'+_RESET)
if is_plot:
fig = plot_gixd_scan(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment