mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Minor fix in StatePoint.std_dev property and plot-mesh-tally script
This commit is contained in:
parent
3df61825cc
commit
c57b2c22d9
3 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,6 @@ import copy
|
|||
import sys
|
||||
|
||||
import numpy as np
|
||||
import scipy.stats
|
||||
|
||||
import openmc
|
||||
from openmc.constants import *
|
||||
|
|
|
|||
|
|
@ -322,7 +322,10 @@ class Tally(object):
|
|||
return None
|
||||
|
||||
n = self.num_realizations
|
||||
self._std_dev = np.sqrt((self.sum_sq/n - self.mean**2)/(n - 1))
|
||||
nonzero = self.mean > 0
|
||||
self._std_dev = np.zeros_like(self.mean)
|
||||
self._std_dev[nonzero] = np.sqrt((self.sum_sq[nonzero]/n -
|
||||
self.mean[nonzero]**2)/(n - 1))
|
||||
self.with_batch_statistics = True
|
||||
return self._std_dev
|
||||
|
||||
|
|
|
|||
|
|
@ -273,8 +273,6 @@ class MeshPlotter(tk.Frame):
|
|||
def get_file_data(self, filename):
|
||||
# Create StatePoint object and read in data
|
||||
self.datafile = StatePoint(filename)
|
||||
self.datafile.read_results()
|
||||
self.datafile.compute_stdev()
|
||||
|
||||
# Find which tallies are mesh tallies
|
||||
self.meshTallies = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue