Broaded detector response

Dear All,

I have been using the open-access OpenMC gamma detector. I want to read the boarded detector respone count result, but I don’t know how. I’ve got the energy spectrum of the boarded results but don’t know how to see the tally data. I simulated the naitl detector response to cs-137 and have obtained the boarded spectrum as exemplified: openmc-notebooks/gamma-detector.ipynb at main · openmc-dev/openmc-notebooks · GitHub. I want to know the specific tally results at peak energies between 600keV and 700keV. Here is the program code and the result:
detektorreall (2).ipynb (136.6 KB)

If you would be willing to share any guidance related to my issues, I would be sincerely grateful. It would greatly assist my research.

Thank you very much for your time and consideration.

Hi Mbak Dila, welcome back to the openmc community.
Sorry if I didn’t really catch your question, but if you just want the total count for all photons with energy between 600-700 keV, then you can set your energy filter to cover just that energy range.
From your input, you use 1001 energy bin which spans between 0-1000keV
energy_bins = np.linspace(0, 1e6, 1001)

So if you just want to use a single bin with an energy range of 600-700keV, then you can directly use energy_bins = (600, 700) which I think will be the same as np.linspace(600e3, 700e3, 1).
Then you can use this as your energy filter same as before.

energy_filter = openmc.EnergyFilter(energy_bins)
...
tally = openmc.Tally(name='pulse-height')
tally.filters = [cell_filter, energy_filter]
...

So instead of each 1001 bin reporting its corresponding photon energy (small range) tally, you will only get a single tally specific to your defined energy range.

For simplicity, you can also directly feed your energy range to the energy filter if you just use a single bin.
So it might look like energy_filter = openmc.EnergyFilter((600e3, 700e3)).
You can check the documentation for more info