-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mf9 #57
Mf9 #57
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some modifications need to be implemented
sandy/sections/mf9.py
Outdated
Endf-6 tape structured 'dict' of Radiactive capture of Am-241 from | ||
the ENDFB-VII.1 library to obtain the multiplicities for production | ||
of radioactive nuclides | ||
>>> read_mf9(sandy.get_endf6_file("endfb_71", 'xs', 952410),9543,102) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reformat according to PEP8
sandy/sections/mf9.py
Outdated
}) | ||
for hx in range(C.N1): | ||
T, i = sandy.read_tab1(df, i) | ||
add = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line
sandy/sections/mf9.py
Outdated
"ZA": C.C1, | ||
"AWR": C.C2, | ||
"LIS": C.L1, | ||
"NS": C.N1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, you should derive it from counting the number of subsections
sandy/sections/mf9.py
Outdated
"E": T.x, | ||
"Y": T.y, | ||
} | ||
out["subsection" + str(hx+1)] = add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a different key other than "subsection" + str(hx+1)
. The "LFS"
number should be unique, then I would use that as key.
Also, these subsections should be on a deeper dictionary level
subsections = {}
for hx in range(C.N1):
T, i = sandy.read_tab1(df, i)
LFS = T.L2
add = {
"QM": T.C1,
"QI": T.C2,
"IZAP": T.L1,
"NBT": T.NBT,
"INT": T.INT,
"E": T.x,
"Y": T.y,
}
subsections[LFS] = add
out["LFS"] = subsections
sandy/sections/mf9.py
Outdated
production of radioactive nuclides | ||
""" | ||
# >>> write_mf9(read_mf9(sandy.get_endf6_file("endfb_71", 'xs', 952410),9543,102)) | ||
# ' 95241.0000 238.986000 0 0 2 09543 9102 1\n 5539101.00 5539101.00 95242 0 1 99543 9102 2\n 9 3 9543 9102 3\n 1.000000-5 9.000000-1 3.690000-1 9.000000-1 1000.00000 8.667000-19543 9102 4\n 100000.000 8.420000-1 600000.100 8.153300-1 1000000.00 7.438200-19543 9102 5\n 2000000.00 5.703000-1 4000001.00 5.200000-1 30000000.0 5.200000-19543 9102 6' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you don't have a test?
Please, implement it. If possible use a print function
.. note:: The end-of-line records MAT, MF, MT and line number are added at | ||
the end of each line. | ||
|
||
.. important:: The string does not endf with a newline symbol `\n`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"end", not "endf"
sandy/sections/mf9.py
Outdated
sec["AWR"], | ||
sec["LIS"], | ||
0, | ||
sec["NS"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NS should be calculated as len(sec["LFS"])
sandy/sections/mf9.py
Outdated
subsection["QM"], | ||
subsection["QI"], | ||
subsection["IZAP"], | ||
subsection["LFS"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you adjust read_mf9
according to my comments, then also this should be adjusted
endf6.py without: