Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions openmc/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,

# Prep S(a,b) data if needed
if sab_name:
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
sab = openmc.data.ThermalScattering.from_hdf5(
library.get_by_material(sab_name, data_type='thermal')['path'])
# Obtain the nearest temperature
if strT in sab.temperatures:
sabT = strT
Expand Down Expand Up @@ -640,23 +641,22 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
sab = openmc.data.ThermalScattering.from_hdf5(
library.get_by_material(sab_name, data_type='thermal')['path'])
for nuc in sab.nuclides:
sabs[nuc] = library.get_by_material(sab_name,
data_type='thermal')['path']
sabs[nuc] = sab_name
else:
if sab_name:
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
sab = openmc.data.ThermalScattering.from_hdf5(
library.get_by_material(sab_name, data_type='thermal')['path'])
for nuc in sab.nuclides:
sabs[nuc] = library.get_by_material(sab_name,
data_type='thermal')['path']
sabs[nuc] = sab_name

# Now we can create the data sets to be plotted
xs = {}
E = []
for nuclide in nuclides.items():
name = nuclide[0]
nuc = nuclide[1]
sab_tab = sabs[name]
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_tab, cross_sections,
sab_name = sabs[name]
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_name, cross_sections,
ncrystal_cfg=ncrystal_cfg
)
E.append(temp_E)
Expand Down