Skip to content
Snippets Groups Projects

[AGIPD][Correct] Improve errors when no lit frames to correct

Merged Karim Ahmed requested to merge fix/no_lit_frames_to_correct into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
step_timer.done_step(f'Loading data from files')
step_timer.done_step(f'Loading data from files')
all_imgs_counts += img_counts
all_imgs_counts += img_counts
if np.all(img_counts) == 0:
if not np.any(img_counts):
# Skip any further processing and output if there are no images to
# Skip any further processing and output if there are no images to
# correct in this file.
# correct in this file.
continue
continue
if skip_plots:
if skip_plots:
print("Skipping plots due to user request.")
print("Skipping plots due to user request.")
sys.exit(0)
sys.exit(0)
elif np.all(img_counts) == 0:
elif not np.any(all_imgs_counts):
print("Skipping plots because no data correction have been applied.")
print("Skipping plots because no data correction have been applied.")
sys.exit(0)
sys.exit(0)
Loading