From 6669e437e21b2bbbc88a142352245b0fb9a54419 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Thu, 11 Aug 2016 08:02:44 -0400 Subject: [PATCH] removed unnecessary imports and fixed comments --- .../pythonapi/examples/mgxs-part-iii.ipynb | 3 +++ openmc/mgxs/mdgxs.py | 18 ++---------------- openmc/mgxs/mgxs.py | 12 ++++-------- .../test_mgxs_library_condense.py | 1 - .../test_mgxs_library_distribcell.py | 1 - .../test_mgxs_library_mesh.py | 1 - .../test_mgxs_library_no_nuclides.py | 1 - .../test_mgxs_library_nuclides.py | 1 - 8 files changed, 9 insertions(+), 29 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb index 9d2b89c51..af9f2878f 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb @@ -552,6 +552,9 @@ "* `ChiPrompt` (`\"chi prompt\"`)\n", "* `InverseVelocity` (`\"inverse-velocity\"`)\n", "* `PromptNuFissionXS` (`\"prompt-nu-fission\"`)\n", + "* `DelayedNuFissionXS` (`\"delayed-nu-fission\"`)\n", + "* `ChiDelayed` (`\"chi-delayed\"`)\n", + "* `Beta` (`\"beta\"`)\n", "\n", "In this case, let's create the multi-group cross sections needed to run an OpenMOC simulation to verify the accuracy of our cross sections. In particular, we will define `\"transport\"`, `\"nu-fission\"`, `'\"fission\"`, `\"nu-scatter matrix\"` and `\"chi\"` cross sections for our `Library`.\n", "\n", diff --git a/openmc/mgxs/mdgxs.py b/openmc/mgxs/mdgxs.py index d853ebed3..0a2f898c0 100644 --- a/openmc/mgxs/mdgxs.py +++ b/openmc/mgxs/mdgxs.py @@ -288,8 +288,7 @@ class MDGXS(MGXS): Delayed groups of interest. Defaults to 'all'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - True. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- @@ -844,18 +843,6 @@ class MDGXS(MGXS): return df - - df = super(MDGXS, self).get_pandas_dataframe(groups, nuclides, xs_type, - distribcell_paths) - - # Select out those delayed groups the user requested - if not isinstance(delayed_groups, basestring): - if 'delayedgroup' in df: - df = df[df['delayedgroup'].isin(delayed_groups)] - - return df - - class ChiDelayed(MDGXS): r"""The delayed fission spectrum. @@ -1186,8 +1173,7 @@ class ChiDelayed(MDGXS): A string for the type of value to return. Defaults to 'mean'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - True. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 5a4c5866b..0a247aeab 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -754,8 +754,7 @@ class MGXS(object): A string for the type of value to return. Defaults to 'mean'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - True. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- @@ -1746,8 +1745,7 @@ class MatrixMGXS(MGXS): A string for the type of value to return. Defaults to 'mean'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - True. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- @@ -3578,8 +3576,7 @@ class ScatterMatrixXS(MatrixMGXS): A string for the type of value to return. Defaults to 'mean'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - False. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- @@ -4566,8 +4563,7 @@ class Chi(MGXS): A string for the type of value to return. Defaults to 'mean'. squeeze : bool A boolean representing whether to eliminate the extra dimensions - of the multi-dimensional array this is to be retured. Defaults to - True. + of the multi-dimensional array to be returned. Defaults to True. Returns ------- diff --git a/tests/test_mgxs_library_condense/test_mgxs_library_condense.py b/tests/test_mgxs_library_condense/test_mgxs_library_condense.py index 551229e6b..d3f2bc08e 100644 --- a/tests/test_mgxs_library_condense/test_mgxs_library_condense.py +++ b/tests/test_mgxs_library_condense/test_mgxs_library_condense.py @@ -9,7 +9,6 @@ from testing_harness import PyAPITestHarness from input_set import PinCellInputSet import openmc import openmc.mgxs -import numpy as np class MGXSTestHarness(PyAPITestHarness): diff --git a/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py b/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py index fe1ca9c0f..940985d91 100644 --- a/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py +++ b/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py @@ -9,7 +9,6 @@ from testing_harness import PyAPITestHarness from input_set import AssemblyInputSet import openmc import openmc.mgxs -import numpy as np class MGXSTestHarness(PyAPITestHarness): diff --git a/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py index 750274b1f..1f31bd566 100644 --- a/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py +++ b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py @@ -8,7 +8,6 @@ sys.path.insert(0, os.pardir) from testing_harness import PyAPITestHarness import openmc import openmc.mgxs -import numpy as np class MGXSTestHarness(PyAPITestHarness): diff --git a/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py b/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py index 5dee9c407..edd41f1c5 100644 --- a/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py +++ b/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py @@ -9,7 +9,6 @@ from testing_harness import PyAPITestHarness from input_set import PinCellInputSet import openmc import openmc.mgxs -import numpy as np class MGXSTestHarness(PyAPITestHarness): diff --git a/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py b/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py index ac24334e4..da613d78a 100644 --- a/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py +++ b/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py @@ -9,7 +9,6 @@ from testing_harness import PyAPITestHarness from input_set import PinCellInputSet import openmc import openmc.mgxs -import numpy as np class MGXSTestHarness(PyAPITestHarness):