From ea833eab4dbf59022e77a6cf3d717a2188dd6c81 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Thu, 9 Mar 2017 09:06:13 -0500 Subject: [PATCH] Small bug fix for scattering matrix histogram binning --- openmc/mgxs/mgxs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 46f65b113..250daf4e9 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -3971,7 +3971,9 @@ class ScatterMatrixXS(MatrixMGXS): # Remove the AggregateFilter summed across energyout bins norm._filters = norm._filters[:2] if self.scatter_format == 'histogram': - norm._filters.append(norm._filters[-1]) + bins = np.linspace( + -1., 1., num=self.histogram_bins + 1, endpoint=True) + norm._filters.append(openmc.MuFilter(bins)) # Multiply by the group-to-group probability matrix self._xs_tally *= (self.tallies[tally_key] / norm)