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
2 changes: 1 addition & 1 deletion openmc_plotter/docks.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def updateFilters(self):
applied_filters[f] = tuple()
elif filter_checked == QtCore.Qt.Checked:
if isinstance(f, openmc.EnergyFunctionFilter):
bins = [0]
applied_filters[f] = (0,)
else:
for i in range(f_item.childCount()):
bin_item = f_item.child(i)
Expand Down
12 changes: 5 additions & 7 deletions openmc_plotter/plotmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
import openmc.lib
import numpy as np

from . import __version__
from .statepointmodel import StatePointModel
from .plot_colors import random_rgb, reset_seed

ID, NAME, COLOR, COLORLABEL, MASK, HIGHLIGHT = tuple(range(0, 6))

__VERSION__ = "0.2.2"

_VOID_REGION = -1
_NOT_FOUND = -2
_OVERLAP = -3
Expand Down Expand Up @@ -131,7 +130,7 @@ def __init__(self, use_settings_pkl):
self.ids_map = None
self.properties = None

self.version = __VERSION__
self.version = __version__

# default statepoint value
self._statepoint = None
Expand Down Expand Up @@ -527,7 +526,7 @@ def _do_op(array, tally_value, ax=0):
slc = tuple(slc)
data = _do_op(data[slc], tally_value, n_spatial_filters)
else:
data[:, ...] = 0.0
data[:] = 0.0
data = _do_op(data, tally_value, n_spatial_filters)

# filter by selected scores
Expand Down Expand Up @@ -620,7 +619,6 @@ def _create_tally_mesh_image(self, tally, tally_value, scores, nuclides, view=No
if view is None:
view = self.currentView

sp = self.statepoint
mesh_filter = tally.find_filter(openmc.MeshFilter)
mesh = mesh_filter.mesh

Expand Down Expand Up @@ -695,8 +693,8 @@ def _do_op(array, tally_value, ax=0):
data = data[np.array(selected_bins)].sum(axis=0)
else:
# if the filter is completely unselected,
# set all of it's data to zero and remove the axis
data[:, ...] = 0.0
# set all of its data to zero and remove the axis
data[:] = 0.0
data = _do_op(data, tally_value)

# filter by selected nuclides
Expand Down