Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/serpentTools/detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,11 @@ def spectrumPlot(
elif len(slicedTallies.shape) == 1:
slicedTallies = slicedTallies.reshape(slicedTallies.size, 1)

# (n_groups, 3) where columns are lower, upper, and middle energy
lowerE = self.grids['E'][:, 0]
if normalize:
lethBins = log(
divide(self.grids['E'][:, -1], lowerE))
divide(self.grids['E'][:, 1], lowerE))
# Need to scale up the dimension of the energy grids to support
# broadcasting -> (E, N) / (E, )
slicedTallies /= lethBins[:, newaxis]
Expand Down
Binary file modified tests/plots/result_images/testSpectrumJustNormPerLethargy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plots/result_images/testSpectrumPlot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.