Skip to content

Commit

Permalink
Fix: checkmatrix check for empty histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
op3 committed Feb 23, 2024
1 parent 58bb5d5 commit 4f84708
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/boris/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ def check_matrix(
# logger.debug(f"Response matrix diagonal:\n{rema.values().diagonal()}")

# Hide zero-values
if (rema.values() == 0.0).all():
logger.error(f"The histogram {rema_name} is empty, nothing to display!")
exit()
rema.values()[rema.values() == 0.0] = np.nan
vmin = np.nanquantile(rema.values()[rema.values() > 1e-20], 0.01)
vmax = np.nanmax(rema.values())
Expand Down

0 comments on commit 4f84708

Please sign in to comment.