Make sure std_dev is calculated if mean is negative. Don't set nuclides in

link_with_summary. Update pandas-dataframe notebook.
This commit is contained in:
Paul Romano 2015-09-21 10:01:26 +07:00
parent b0ea5b8ae0
commit 43fdeb41a1
3 changed files with 67 additions and 76 deletions

File diff suppressed because one or more lines are too long

View file

@ -608,15 +608,6 @@ class StatePoint(object):
tally.name = summary.tallies[tally_id].name
tally.with_summary = True
nuclide_zaids = copy.deepcopy(tally.nuclides)
for nuclide_zaid in nuclide_zaids:
tally.remove_nuclide(nuclide_zaid)
if nuclide_zaid == -1:
tally.add_nuclide(openmc.Nuclide('total'))
else:
tally.add_nuclide(summary.nuclides[nuclide_zaid])
for filter in tally.filters:
if filter.type == 'surface':
surface_ids = []

View file

@ -322,7 +322,7 @@ class Tally(object):
return None
n = self.num_realizations
nonzero = self.mean > 0
nonzero = np.abs(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))