Question on the energy of xs in hdf5 file

Hello everyone,

Here is a picture of the Cu63.h5 file in HDFView, I focus on the cross section data:

And I would like to know the energy that corresponds to each cross section data, I search in the ‘energy’ file in the same Cu63.h5 file:
2

But it seems that the energy data cannot correspond to the cross section data.(The total number of the energy data is 25911 and the total number of the cross section data is 203.) Maybe it is not the energy at which cross sections are tabulated…

So I wonder: How can I know the energy that corresponds to each cross section data in the h5 file?

Please forgive me if I have asked the stupid question. Thank you.

I am not an export but the *h5 files of cross sections are already processed version of, for example, endf files. I am not surprised you have many more energy evaluation in h5 files as in native library files.

check openmc.plot_xs, you will be able to create matplotlib figures. With some efforts you will be able to recover lines and therefore energy and xs.

There is probably a simpler way but I don’t know any public function to manually fetch that xs info.

You can also check https://www-nds.iaea.org/ if you don’t need to fetch the xs using openmc.

Sounds like you want the calculate_cexs method that gets the energy and cross section of a nuclide, material or element. Here is an example for Cu63 n,2n reaction (MT16)

energy_in_ev, cross_section_in_barns = openmc.calculate_cexs('Cu63',[16])

Thank you very much pferney! Getting the energy from figures can be a good way.

Here I’ve found another possible way to get the information directly from h5 file:

I’ve found the threshold_idx = 25708 from the “object attribute info”, it means that the energies from No.25708 to No.25911 (total number is 203) are exactly the energies corresponding to the xs one by one,

Thank you very much Shimwell! The calculate_cexs method is also what I am searching for.

And here I’ve also found another possible way to get the energy from h5 file without calculation:

I’ve found the threshold_idx = 25708 from the “object attribute info” in h5 file, it means that the energies from No.25708 to No.25911 (total number is 203) are exactly the energies corresponding to the xs one by one,