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

mf1 test upgrade #75

Merged
merged 1 commit into from
Sep 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 58 additions & 2 deletions sandy/sections/mf1.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,62 @@ def write_mf1(sec):
the end of each line.

.. important:: The string does not end with a newline symbol `\n`.

Examples
--------
Since the outputs are very large and they are much, I am only going to
check only some information for the test:

**mt = 452** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> sec = sandy.sections.mf1.read_mf1(tape, 9228, 452)
>>> text = sandy.sections.mf1.write_mf1(sec)
>>> print(text[:1000])
92235.0000 233.024800 0 2 0 09228 1452 1
0.00000000 0.00000000 0 0 1 799228 1452 2
79 2 9228 1452 3
1.000000-5 2.43670000 2.530000-2 2.43670000 5.000000-2 2.436700009228 1452 4
10.0000000 2.43670000 100.000000 2.43380000 1000.00000 2.433800009228 1452 5
5500.00000 2.43380000 7750.00000 2.43380000 10000.0000 2.433800009228 1452 6
15000.0000 2.43056800 20000.0000 2.42882200 30000.0000 2.425701009228 1452 7
40000.0000 2.42366200 50000.0000 2.42347400 60000.0000 2.424763009228 1452 8
70000.0000 2.42754600 80000.0000 2.43087500 90000.0000 2.434348009228 1452 9
100000.000 2.43776300 120000.000 2.44514800 130000.000 2.448498009228 1452 10
140000.000 2.45160900 150000.000 2.45448000 170000.000 2.461376009228 1452 11
200000.000 2.46867200 250000.000 2.47192600 300000.000 2.474470009228 1452 12
350000.000 2.47658400 40000

**mt = 455** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> sec = sandy.sections.mf1.read_mf1(tape, 9228, 455)
>>> text = sandy.sections.mf1.write_mf1(sec)
>>> print(text[:1000])
92235.0000 233.024800 0 2 0 09228 1455 1
0.00000000 0.00000000 0 0 6 09228 1455 2
1.333600-2 3.273900-2 1.207800-1 3.027800-1 8.494900-1 2.853000009228 1455 3
0.00000000 0.00000000 0 0 1 69228 1455 4
6 2 9228 1455 5
1.000000-5 1.585000-2 2.530000-2 1.585000-2 50000.0000 1.670000-29228 1455 6
4000000.00 1.670000-2 7000000.00 9.000000-3 20000000.0 9.000000-39228 1455 7

**mt = 456** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> sec = sandy.sections.mf1.read_mf1(tape, 9228, 456)
>>> text = sandy.sections.mf1.write_mf1(sec)
>>> print(text[:1000])
92235.0000 233.024800 0 2 0 09228 1456 1
0.00000000 0.00000000 0 0 1 799228 1456 2
79 2 9228 1456 3
1.000000-5 2.42085000 2.530000-2 2.42085000 5.000000-2 2.420850009228 1456 4
10.0000000 2.42085000 100.000000 2.41794800 1000.00000 2.417933009228 1456 5
5500.00000 2.41785700 7750.00000 2.41781800 10000.0000 2.417780009228 1456 6
15000.0000 2.41446300 20000.0000 2.41263200 30000.0000 2.409341009228 1456 7
40000.0000 2.40713200 50000.0000 2.40677400 60000.0000 2.408063009228 1456 8
70000.0000 2.41084600 80000.0000 2.41417500 90000.0000 2.417648009228 1456 9
100000.000 2.42106300 120000.000 2.42844800 130000.000 2.431798009228 1456 10
140000.000 2.43490900 150000.000 2.43778000 170000.000 2.444676009228 1456 11
200000.000 2.45197200 250000.000 2.45522600 300000.000 2.457770009228 1456 12
350000.000 2.45988400 40000
"""
mt = sec["MT"]
if mt == 452:
Expand Down Expand Up @@ -647,7 +703,7 @@ def _write_dnubar(sec):
0,
0,
0,
len(sec["EGRPOUPS"]),
len(sec["EGROUPS"]),
sec["ENBT"],
sec["EINT"],
)
Expand Down Expand Up @@ -697,7 +753,7 @@ def _write_dnubar(sec):
0,
0,
0,
len(sec["EGRPOUPS"]),
len(sec["EGROUPS"]),
sec["ENBT"],
sec["EINT"],
)
Expand Down