Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Mf9 #57

wants to merge 6 commits into from

Conversation

AitorBengoechea
Copy link
Contributor

endf6.py without:

tape = sandy.get_endf6_file("jeff_40t0", 'xs', 10010)
assert type(tape) is sandy.Endf6

Copy link
Owner

@luca-fiorito-11 luca-fiorito-11 left a 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

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reformat according to PEP8

})
for hx in range(C.N1):
T, i = sandy.read_tab1(df, i)
add = {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

"ZA": C.C1,
"AWR": C.C2,
"LIS": C.L1,
"NS": C.N1,
Copy link
Owner

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

"E": T.x,
"Y": T.y,
}
out["subsection" + str(hx+1)] = add
Copy link
Owner

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

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'
Copy link
Owner

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`.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"end", not "endf"

sec["AWR"],
sec["LIS"],
0,
sec["NS"],
Copy link
Owner

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"])

subsection["QM"],
subsection["QI"],
subsection["IZAP"],
subsection["LFS"],
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants