Skip to content

Commit 7f285c7

Browse files
authored
Merge 14c2098 into 00edc77
2 parents 00edc77 + 14c2098 commit 7f285c7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

openmc/plotter.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,
413413

414414
# Prep S(a,b) data if needed
415415
if sab_name:
416-
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
416+
sab = openmc.data.ThermalScattering.from_hdf5(
417+
library.get_by_material(sab_name, data_type='thermal')['path'])
417418
# Obtain the nearest temperature
418419
if strT in sab.temperatures:
419420
sabT = strT
@@ -640,23 +641,22 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
640641
sab = openmc.data.ThermalScattering.from_hdf5(
641642
library.get_by_material(sab_name, data_type='thermal')['path'])
642643
for nuc in sab.nuclides:
643-
sabs[nuc] = library.get_by_material(sab_name,
644-
data_type='thermal')['path']
644+
sabs[nuc] = sab_name
645645
else:
646646
if sab_name:
647-
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
647+
sab = openmc.data.ThermalScattering.from_hdf5(
648+
library.get_by_material(sab_name, data_type='thermal')['path'])
648649
for nuc in sab.nuclides:
649-
sabs[nuc] = library.get_by_material(sab_name,
650-
data_type='thermal')['path']
650+
sabs[nuc] = sab_name
651651

652652
# Now we can create the data sets to be plotted
653653
xs = {}
654654
E = []
655655
for nuclide in nuclides.items():
656656
name = nuclide[0]
657657
nuc = nuclide[1]
658-
sab_tab = sabs[name]
659-
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_tab, cross_sections,
658+
sab_name = sabs[name]
659+
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_name, cross_sections,
660660
ncrystal_cfg=ncrystal_cfg
661661
)
662662
E.append(temp_E)

0 commit comments

Comments
 (0)