Skip to content

Commit 0d6badb

Browse files
committed
Background values are NaN for distribcell filters. Setting dtype of data array.
1 parent 126c049 commit 0d6badb

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

openmc_plotter/plotmodel.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,11 @@ def create_tally_image(self, view=None):
365365
mean_data = self._create_distribcell_image(tally,
366366
'mean',
367367
scores,
368-
nuclides,
369-
view)
368+
nuclides)
370369
std_dev_data = self._create_distribcell_image(tally,
371370
'std_dev',
372371
scores,
373-
nuclides,
374-
view)
372+
nuclides)
375373
image_data = 100 * np.divide(std_dev_data[0],
376374
mean_data[0],
377375
out=np.zeros_like(mean_data[0]),
@@ -383,8 +381,7 @@ def create_tally_image(self, view=None):
383381
image = self._create_distribcell_image(tally,
384382
tally_value,
385383
scores,
386-
nuclides,
387-
view)
384+
nuclides)
388385
return image + (units_out,)
389386
else:
390387
# same as above, get the std. dev. data
@@ -512,7 +509,7 @@ def _create_distribcell_image(self, tally, tally_value, scores, nuclides):
512509

513510
cell_id = dfilter.bins[0]
514511
# create a mask for ids that match the cell
515-
image_data = np.zeros_like(self.ids)
512+
image_data = np.full_like(self.ids, np.nan, dtype=float)
516513

517514
cell_id_mask = self.cell_ids == cell_id
518515
for i, v in enumerate(data):

0 commit comments

Comments
 (0)