Defer import of matplotlib in multipole.py

This commit is contained in:
Paul Romano 2023-04-24 07:01:09 -05:00
parent fffdedf5d2
commit cee1615157

View file

@ -1,14 +1,12 @@
from numbers import Real
from math import exp, erf, pi, sqrt
from copy import deepcopy
import warnings
import os
import h5py
import pickle
import numpy as np
from scipy.signal import find_peaks
import matplotlib.pyplot as plt
import openmc.checkvalue as cv
from ..exceptions import DataError
@ -364,6 +362,7 @@ def _vectfit_xs(energy, ce_xs, mts, rtol=1e-3, atol=1e-5, orders=None,
for i, mt in enumerate(mts):
if not test_xs_ref[i].any():
continue
import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
lns1 = ax1.loglog(test_energy, test_xs_ref[i], 'g', label="ACE xs")
lns2 = ax1.loglog(test_energy, best_test_xs[i], 'b', label="VF xs")
@ -1154,7 +1153,7 @@ class WindowedMultipole(EqualityMixin):
Returns
-------
3-tuple of Real
Scattering, absorption, and fission microscopic cross sections
Scattering, absorption, and fission microscopic cross sections
at the given energy and temperature.
"""