Skip to content

Commit

Permalink
raising value error for incorrect usage
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed May 9, 2024
1 parent 74d7cf4 commit 6709070
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/openmc_regular_mesh_plotter/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import math
import typing
import warnings
from pathlib import Path
from tempfile import TemporaryDirectory

Expand Down Expand Up @@ -183,7 +182,7 @@ def plot_mesh_tally(
fig.colorbar(im, **colorbar_kwargs)

if outline and geometry is None:
warnings.warn('output has been set to True but the geometry has not been set. When setting outline to True please also provide the geometry. Plotting without the outline.')
raise ValueError('When calling plot_mesh_tally with outline=True the geometry should also be provided. Either set outline to False or set the geometry to and openmc.Geometry object')
if outline and geometry is not None:
import matplotlib.image as mpimg

Expand Down

0 comments on commit 6709070

Please sign in to comment.