How to read a ENSDF reaction data file to import prompt gamma-ray data?

70 views
Skip to first unread message

Kazuyoshi Furutaka

unread,
Apr 20, 2015, 9:33:14 AM4/20/15
to pyne-...@googlegroups.com
Hi all,

I'd like to read a ENSDF data file which contains data on gamma rays emitted in neutron capture reactions and use those data.
Is it possible to do it using PyNE?  If possible, may I ask some of you to teach me how?

Thanks in advance,
Kazuyoshi

Anthony Scopatz

unread,
Apr 20, 2015, 3:18:54 PM4/20/15
to Kazuyoshi Furutaka, pyne-...@googlegroups.com
Hi Kazuyoshi,

I am sure that Cameron will correct me if I am wrong, but I believe that you would use the levels() function and then filter by the reaction (gamma) and half-life.  it would be something like the following:

from pyne import nucname
from pyne import rxname
from pyne import ensdf

nuc = nucname.id('U-235')
gid = rxname.id('gamma')
prompt_lower = 1e-6
prompt_upper = 1.0

all_data = ensdf.levels('/path/to/file')
prompt_data = []
for row in all_data:
    if row[0] == nuc and row[1] == gid and (prompt_lower <= row[2] < prompt_upper):
        prompt_data.append(row)

I am not sure if the prompt aspects of the above are robust enough so you may need to play around with the data.

Let us know if you have any other questions!

Be Well
Anthony

--
You received this message because you are subscribed to the Google Groups "PyNE Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyne-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kazuyoshi Furutaka

unread,
Apr 22, 2015, 3:54:15 AM4/22/15
to pyne-...@googlegroups.com
Dear Anthony,

Thanks for the reply, and sorry for my late response...

With my PyNE installation, which are source install of git 0.5.0-tagged, on fedora 22 linux boxes, ensdf.levels() returns an empty list even for a file of U235 adopted levels and gammas downloaded afresh from NNDC.

Any suggestions?

Thanks,
Kazuyoshi

Kazuyoshi Furutaka

unread,
Apr 22, 2015, 8:27:30 AM4/22/15
to pyne-...@googlegroups.com
By the way, I got the same result (i.e. an empty list from ensdf.levels('235U')) with the PyNE environment in pyne-0.5+yt.ova VirtualBox file.

Kazuyoshi

2015年4月22日水曜日 16時54分15秒 UTC+9 Kazuyoshi Furutaka:

Anthony Scopatz

unread,
Apr 22, 2015, 9:23:41 PM4/22/15
to Kazuyoshi Furutaka, pyne-...@googlegroups.com
Hi Kazuyoshi,

You actually need to put in the path to the file?  What is the filename that you are trying to open?

Be Well
Anthony

--

Kazuyoshi Furutaka

unread,
Apr 22, 2015, 9:57:26 PM4/22/15
to pyne-...@googlegroups.com
Dear Anthony,

In VB case, the downloaded ensdf file of adopted levels and gammas in U235 has a name '235U', and is placed in /home/pyne-user/res/pyne. Specifying its full path in ensdf.levels() makes no difference...

Kazuyoshi

Anthony Scopatz

unread,
Apr 22, 2015, 10:01:29 PM4/22/15
to Kazuyoshi Furutaka, pyne-...@googlegroups.com
Hi Kazuyoshi,

Can you send a link to the file that you downloaded, please? Thanks.

Be Well
Anthony

Katrina Koehler

unread,
Sep 13, 2022, 5:59:34 PM9/13/22
to PyNE Users
Yes, I realize this is a thoroughly dead thread, BUT I am having the same non results as Kazuoyoshi!

> level_list = pyne.ensdf.levels('Np237_ENSDF_levels.txt')
> level_list
[]

I can read the regular ENSDF decay file no problem, but I cannot read the level ENSDF files (I get an empty array). Attached is the level file that I'm trying to read. Removing the empty lines at the top and bottom of the file do not seem to affect this result. I've tried Np237 and Am241 with the same result (empty array).

Thanks!
Katrina

Np237_ENSDF_levels.txt
Reply all
Reply to author
Forward
0 new messages