Skip to content

Commit

Permalink
Prevent empty convergence plot Error when n_iteration=1 (#2371)
Browse files Browse the repository at this point in the history
* Add an argument check the convergence plot is empty or not before exporting the plot, prevent the sim fail due to plot is empty

* added my infotmation in mailmap
  • Loading branch information
DeerWhale authored Jul 26, 2023
1 parent 6440483 commit 0cb1929
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Jenny Yu <yuyizh1112@gmail.com>
Jenny Yu <yuyizh1112@gmail.com> yuyizh <yuyizh1112@gmail.com>
Jenny Yu <yuyizh1112@gmail.com> Jenny Yu <80535029+yuyizheng1112@users.noreply.github.com>

Jing Lu <lujingeve158@gmail.com>

John Reichenbach <56849859+jreichenbach-msu@users.noreply.github.com>

Jordi Eguren <jordi.eguren.brown@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion tardis/visualization/tools/convergence_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def update(self, export_convergence_plots=False, last=False):

# the display function expects a Widget, while
# fig.show() returns None, which causes the TraitError.
if export_convergence_plots:
if export_convergence_plots and (self.plasma_plot is not None):
with suppress(TraitError):
display(
widgets.VBox(
Expand Down

0 comments on commit 0cb1929

Please sign in to comment.