Question on setting the source energy

Hello everyone,

I’m trying to set the energy of the source. I have found that
"source.energy = openmc.stats.Discrete([energy], [probability]) "
can only describe the discrete energy points.

I have a question: When I apply the energy bins instead of the energy points, and I want to define the probability of each energy bin by myself, openmc.stats.Discrete cannot realize it. Is there any method to realize this purpose?

Thank you very much!

Yes, you can use the openmc.stats.Tabular class to represent an energy distribution binned over intervals.

OK, thank you very much! I will try it.