mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
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:
parent
b0ea5b8ae0
commit
43fdeb41a1
3 changed files with 67 additions and 76 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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 = []
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue