From 87d5f5878aebbe1c470455f0b141c0c785bc9528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simppa=20=C3=84k=C3=A4slompolo?= Date: Fri, 21 Aug 2020 18:17:39 +0300 Subject: [PATCH] Try using the whole string if getting PlotGrid fails using only the first letter. (issue #415) --- serpentTools/detectors.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/serpentTools/detectors.py b/serpentTools/detectors.py index bf763a2b..bc654322 100644 --- a/serpentTools/detectors.py +++ b/serpentTools/detectors.py @@ -463,7 +463,11 @@ def _getSlices(self, fixed): return slices def _getPlotGrid(self, qty): + # Try with the first letter only grids = self.grids.get(qty[0].upper()) + if grids is None: + # The phi-grid has three letters! + grids = self.grids.get(qty.upper()) if grids is not None: return hstack((grids[:, 0], grids[-1, 1])) nItems = self.tallies.shape[self.indexes.index(qty)]