Minor fix in StatePoint.std_dev property and plot-mesh-tally script

This commit is contained in:
Paul Romano 2015-09-18 22:05:50 +07:00
parent 3df61825cc
commit c57b2c22d9
3 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,6 @@ import copy
import sys
import numpy as np
import scipy.stats
import openmc
from openmc.constants import *

View file

@ -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

View file

@ -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 = []