Saving changes before looking at num_polar/azimuthal defaulting to 1

This commit is contained in:
Adam Nelson 2017-01-18 19:55:56 -05:00
parent ac57f5004d
commit fb0dbfe5d2
3 changed files with 11 additions and 12 deletions

View file

@ -90,7 +90,7 @@ Temperature-dependent data, provided for temperature <TTT>K.
:Datasets: - **total** (*double[]* or *double[][][]*) -- Total cross section.
This is a 1-D vector if `representation` is "isotropic", or a 3-D
vector if `representation` is "angle" with dimensions of
[groups][azimuthal][polar].
[polar][azimuthal][groups].
- **absorption** (*double[]* or *double[][][]*) -- Absorption
cross section.
This is a 1-D vector if `representation` is "isotropic", or a 3-D
@ -100,19 +100,19 @@ Temperature-dependent data, provided for temperature <TTT>K.
cross section.
This is a 1-D vector if `representation` is "isotropic", or a 3-D
vector if `representation` is "angle" with dimensions of
[groups][azimuthal][polar]. This is only required if the dataset
[polar][azimuthal][groups]. This is only required if the dataset
is fissionable and fission-tallies are expected to be used.
- **kappa-fission** (*double[]* or *double[][][]*) -- Kappa-Fission
(energy-release from fission) cross section.
This is a 1-D vector if `representation` is "isotropic", or a 3-D
vector if `representation` is "angle" with dimensions of
[groups][azimuthal][polar]. This is only required if the dataset
[polar][azimuthal][groups]. This is only required if the dataset
is fissionable and fission-tallies are expected to be used.
- **chi** (*double[]* or *double[][][]*) -- Fission neutron energy
spectra.
This is a 1-D vector if `representation` is "isotropic", or a 3-D
vector if `representation` is "angle" with dimensions of
[groups][azimuthal][polar]. This is only required if the dataset
[polar][azimuthal][groups]. This is only required if the dataset
is fissionable and fission-tallies are expected to be used.
- **nu-fission** (*double[]* to *double[][][][]*) -- Nu-Fission
cross section.
@ -124,7 +124,9 @@ Temperature-dependent data, provided for temperature <TTT>K.
same dimensionality as `multiplicity matrix`.
- **inverse-velocity** (*double[]* or *double[][][]*) --
Average inverse velocity for each of the groups in the library.
This dataset is optional.
This dataset is optional. This is a 1-D vector if `representation`
is "isotropic", or a 3-D vector if `representation` is "angle"
with dimensions of [polar][azimuthal][groups].
**/<library name>/<TTT>K/scatter_data/**

View file

@ -408,9 +408,9 @@ class MDGXS(MGXS):
else:
num_delayed_groups = len(delayed_groups)
# Reshape tally data array with separate axes for domain, energy groups,
# delayed groups, and nuclides
# Accomodate the polar and azimuthal bins if needed
# Reshape tally data array with separate axes for domain,
# energy groups, delayed groups, and nuclides
# Accommodate the polar and azimuthal bins if needed
if self.num_polar or self.num_azimuthal:
if self.num_polar:
num_pol = self.num_polar
@ -852,7 +852,6 @@ class MDGXS(MGXS):
if self.by_nuclide and nuclides == 'sum':
# Use tally summation to sum across all nuclides
query_nuclides = [nuclides]
xs_tally = self.xs_tally.summation(nuclides=self.get_nuclides())
df = xs_tally.get_pandas_dataframe(
distribcell_paths=distribcell_paths)
@ -865,14 +864,12 @@ class MDGXS(MGXS):
# If the user requested a specific set of nuclides
elif self.by_nuclide and nuclides != 'all':
query_nuclides = nuclides
xs_tally = self.xs_tally.get_slice(nuclides=nuclides)
df = xs_tally.get_pandas_dataframe(
distribcell_paths=distribcell_paths)
# If the user requested all nuclides, keep nuclide column in dataframe
else:
query_nuclides = self.nuclides
df = self.xs_tally.get_pandas_dataframe(
distribcell_paths=distribcell_paths)

View file

@ -1760,7 +1760,6 @@ class MGXS(object):
if self.by_nuclide and nuclides == 'sum':
# Use tally summation to sum across all nuclides
query_nuclides = [nuclides]
xs_tally = self.xs_tally.summation(nuclides=self.get_nuclides())
df = xs_tally.get_pandas_dataframe(
distribcell_paths=distribcell_paths)
@ -4332,6 +4331,7 @@ class ScatterMatrixXS(MatrixMGXS):
dont_squeeze = (1, 2, 3)
else:
dont_squeeze = (1, 2)
# Squeeze will return a ValueError if the axis has a size
# greater than 1, so try each axis in axes one at a time,
# and do our own check to preclude the ValueError