Last active
August 29, 2015 14:16
-
-
Save gidden/733928213c1dae70a456 to your computer and use it in GitHub Desktop.
Trying to make Kaeri-like plots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyne.endf import Library | |
| from pyne import nucname as nn | |
| import matplotlib.pyplot as plt | |
| import os | |
| from urllib import urlretrieve | |
| nucs = ['U235'] | |
| nmt = 18 # for (z, fission) | |
| for nuc in nucs: | |
| f = '{}.txt'.format(nuc) | |
| if not os.path.isfile(f): | |
| root = "http://t2.lanl.gov/nis/data/data/ENDFB-VII.1-neutron" | |
| pth = "/".join([root, nn.zz_name[nn.znum(nuc)], str(nn.anum(nuc))]) | |
| urlretrieve(pth, f) | |
| fig = plt.figure() | |
| for nuc in nucs: | |
| lib = Library('{}.txt'.format(nuc)) | |
| data = lib.get_xs(nn.id(nuc), nmt)[0] | |
| x, y = data['e_int'], data['xs'] | |
| plt.step(x, y, where='pre', label=nuc, figure=fig) | |
| plt.xscale('log') | |
| plt.yscale('log') | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment