From 08fdb8a91d0d4b9fbfe94fc89eb134daecc27817 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Sat, 9 Jan 2016 05:43:28 -0500 Subject: [PATCH] satisfying @wbinventors pyapi comments --- openmc/material.py | 16 ++++++++-------- openmc/mgxs/groups.py | 2 +- openmc/mgxs_library.py | 16 ++++++++-------- openmc/settings.py | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openmc/material.py b/openmc/material.py index ca78bd61f..e429190dc 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -332,7 +332,7 @@ class Material(object): Parameters ---------- - macroscopic : str or openmc.macroscopic.Macroscopic + macroscopic : str or Macroscopic Macroscopic to add """ @@ -371,7 +371,7 @@ class Material(object): Parameters ---------- - macroscopic : openmc.macroscopic.Macroscopic + macroscopic : Macroscopic Macroscopic to remove """ @@ -622,14 +622,14 @@ class Material(object): # Create element XML subelements subelements = self._get_elements_xml(self._elements, distrib=True) - for subelement_ele in subelements: - subelement.append(subelement_ele) + for subsubelement in subelements: + subelement.append(subsubelement) else: # Create macroscopic XML subelements - subelement_ele = self._get_macroscopic_xml(self, - self._macroscopic, - distrib=True) - subelement.append(subelement_ele) + subsubelement = self._get_macroscopic_xml(self, + self._macroscopic, + distrib=True) + subelement.append(subsubelement) if len(self._sab) > 0: for sab in self._sab: diff --git a/openmc/mgxs/groups.py b/openmc/mgxs/groups.py index e6838b36b..3436c0e03 100644 --- a/openmc/mgxs/groups.py +++ b/openmc/mgxs/groups.py @@ -54,7 +54,7 @@ class EnergyGroups(object): def __eq__(self, other): if not isinstance(other, EnergyGroups): return False - elif (self.group_edges != other.group_edges).all(): + elif self.group_edges != other.group_edges: return False else: return True diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index 80cec8294..605fc7064 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -14,7 +14,7 @@ from openmc.checkvalue import check_type, check_value, check_greater_than, \ check_iterable_type from openmc.clean_xml import * -# MGXS Representations supported by OpenMC +# Supported incoming particle MGXS angular treatment representations REPRESENTATIONS = ['isotropic', 'angle'] def ndarray_to_string(arr): @@ -87,7 +87,7 @@ class XSdata(object): name : str, optional Name of the mgxs data set. - representation : str + representation : {'isotropic' or 'angle'} Method used in generating the MGXS (isotropic or angle-dependent flux weighting). Defaults to 'isotropic' @@ -99,11 +99,11 @@ class XSdata(object): Separate unique identifier for the xsdata object kT : float Temperature (in units of MeV) of this data set. - energy_groups : openmc.mgxs.EnergyGroups + energy_groups : EnergyGroups Energy group structure fissionable : boolean Whether or not this is a fissionable data set. - scatt_type : str + scatt_type : {'legendre', 'histogram', or 'tabular'} Angular distribution representation (legendre, histogram, or tabular) order : int Either the Legendre order, number of bins, or number of points used to @@ -111,9 +111,9 @@ class XSdata(object): transfer probability. tabular_legendre : dict Set how to treat the Legendre scattering kernel (tabular or leave in - Legendre polynomial form). Dict contains two keys: ``enable`` and - ``num_points``. ``enable`` is a boolean and ``num_points`` is the - number of points to use, if ``enable`` is True. + Legendre polynomial form). Dict contains two keys: 'enable' and + 'num_points'. 'enable' is a boolean and 'num_points' is the + number of points to use, if 'enable' is True. """ def __init__(self, name, energy_groups, representation="isotropic"): @@ -247,7 +247,7 @@ class XSdata(object): @alias.setter def alias(self, alias): if alias is not None: - check_type('alias for XSdata', alias, basestring) + check_type('alias', alias, basestring) self._alias = alias else: self._alias = self._name diff --git a/openmc/settings.py b/openmc/settings.py index 61017a7a5..8a562a545 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -79,7 +79,7 @@ class SettingsFile(object): Set whether the calculation should be continuous-energy or multi-group. Acceptable values are 'continuous-energy' or 'multi-group' max_order : int - Maximum scattering order to apply globally when in multi-grup mode. + Maximum scattering order to apply globally when in multi-group mode. ptables : bool Determine whether probability tables are used. run_cmfd : bool