From 1a62b59dc3f6ed2c4a3f746553d4a2eb103ecb8b Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Thu, 17 Nov 2016 17:17:38 -0500 Subject: [PATCH] Resolved @samuelshaner comments --- openmc/material.py | 5 ----- openmc/plotter.py | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/openmc/material.py b/openmc/material.py index ece75be19..84d790feb 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -623,11 +623,6 @@ class Material(object): """ - import scipy.constants as sc - - # Load the library - library = openmc.data.DataLibrary.from_xml(cross_sections) - # Expand elements in to nuclides nuclides = self.get_nuclide_densities() diff --git a/openmc/plotter.py b/openmc/plotter.py index f0275dda6..626450456 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -165,6 +165,7 @@ def plot_xs(this, types, divisor_types=None, temperature=294., axis=None, to_plot = data[i](E) else: to_plot = data[i, :] + to_plot = np.nan_to_num(to_plot) if np.sum(to_plot) > 0.: plot_func(E, to_plot, label=types[i]) @@ -287,7 +288,7 @@ def _calculate_xs_element(this, types, temperature=294., sab_name=None, library = openmc.data.DataLibrary.from_xml(cross_sections) # Expand elements in to nuclides with atomic densities - nuclides = this.expand(100., 'ao', enrichment=enrichment, + nuclides = this.expand(1., 'ao', enrichment=enrichment, cross_sections=cross_sections) # For ease of processing split out nuc and nuc_density @@ -378,7 +379,6 @@ def _calculate_xs_nuclide(this, types, temperature=294., sab_name=None, mts.append((line,)) yields.append((False,)) ops.append(()) - print(mts) # Load the library library = openmc.data.DataLibrary.from_xml(cross_sections)