@@ -413,7 +413,8 @@ def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,
413
413
414
414
# Prep S(a,b) data if needed
415
415
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' ])
417
418
# Obtain the nearest temperature
418
419
if strT in sab .temperatures :
419
420
sabT = strT
@@ -640,23 +641,22 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
640
641
sab = openmc .data .ThermalScattering .from_hdf5 (
641
642
library .get_by_material (sab_name , data_type = 'thermal' )['path' ])
642
643
for nuc in sab .nuclides :
643
- sabs [nuc ] = library .get_by_material (sab_name ,
644
- data_type = 'thermal' )['path' ]
644
+ sabs [nuc ] = sab_name
645
645
else :
646
646
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' ])
648
649
for nuc in sab .nuclides :
649
- sabs [nuc ] = library .get_by_material (sab_name ,
650
- data_type = 'thermal' )['path' ]
650
+ sabs [nuc ] = sab_name
651
651
652
652
# Now we can create the data sets to be plotted
653
653
xs = {}
654
654
E = []
655
655
for nuclide in nuclides .items ():
656
656
name = nuclide [0 ]
657
657
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 ,
660
660
ncrystal_cfg = ncrystal_cfg
661
661
)
662
662
E .append (temp_E )
0 commit comments