pyne / pyne

PyNE: The Nuclear Engineering Toolkit
http://pyne.io/
Other
277 stars 179 forks source link

ENDF Cross-Sections #840

Open jacoblandman opened 8 years ago

jacoblandman commented 8 years ago

Hey, I'm not sure if this is an issue, or if I'm just using pyne incorrectly. I'm working on using pyne to generate cross sections. I'm following the tutorial for reading ENDF files and it works fine for Ni-59, however, if I try a different isotope, such as Pu239, I get weird looking cross sections. Running the "reaction" method returns almost only higher energy cross sections and not the lower energy ones. Am I doing something wrong?

My code is this for a generic isotope and reaction: endfds = ENDFDataSource(file_name)

# get the reaction data for the isotope
xs_exists = True
try:
    rx = endfds.reaction(isotope, reaction)
except:
    rx = endfds.reaction(isotope, "total")
    xs_exists = False

fig = plt.figure(figsize=(7,7))

# e_int is the array of energy values over which to integrate
E_g = rx['e_int']
# xs is the array of cross-sections corresponding to e_int
reactions = rx['xs']

# with base group structure
plt.loglog(*stair_step(E_g, reactions[:-1]), figure=fig) 
# discretized with new group structure
plt.xlabel('E [MeV]')
plt.ylabel(isotope + " " + reaction + ' Cross Section [barns]')
plt.savefig("fig1.png")

Thanks, Jacob

fig1

scopatz commented 8 years ago

Hi @jacoblandman - thanks for reporting, first off. I am not sure what is going on here. It seems like there may be a bug. Are you able to distribute the ENDF file that you are using? Or can you tell us which one it is?

ohnemax commented 8 years ago

I saw a similar behavior using cross sections from http://www.nndc.bnl.gov/endf/b7.1/download.html If I find time during the next days I will try and give it a look - I think it has something to do with the separate treatment of reonances.

scopatz commented 8 years ago

Thanks @ohnemax

jacoblandman commented 8 years ago

Hey. I was using the file pulled from the endf database online as follows:

urlretrieve("http://t2.lanl.gov/nis/data/data/ENDFB-VII.1-neutron/

Someone mentioned to me that endf may not contain all the data for the resonances.