Skip to content

Commit

Permalink
mf1 test upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Bengoechea Aitor authored and Bengoechea Aitor committed Sep 30, 2021
1 parent 2efa80d commit b96026b
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions sandy/sections/mf1.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,112 @@ def read_mf1(tape, mat, mt):
-------
`dict`
Content of the ENDF-6 tape structured as nested `dict`.
Examples
--------
Since the outputs are very large and they are much, I am only going to
check only some information for the test:
**mt = 451** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> test = read_mf1(tape, 9228, 451)
>>> test['SECTIONS'][::5]
[(1, 451, 934, 7),
(1, 460, 253745, 0),
(3, 4, 106, 7),
(3, 20, 24, 6),
(3, 52, 77, 6),
(3, 57, 34, 7),
(3, 62, 29, 7),
(3, 67, 37, 7),
(3, 72, 33, 7),
(3, 77, 28, 7),
(3, 82, 25, 7),
(3, 87, 21, 7),
(3, 102, 106, 6),
(4, 53, 178, 6),
(4, 58, 172, 7),
(4, 63, 53, 7),
(4, 68, 69, 7),
(4, 73, 72, 7),
(4, 78, 65, 7),
(4, 83, 56, 7),
(4, 88, 52, 7),
(6, 16, 699, 6),
(12, 18, 5, 6),
(14, 4, 1, 6),
(15, 18, 54, 6),
(33, 2, 113418, 7),
(33, 102, 23060, 7)]
**mt = 452** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> test = sandy.sections.mf1.read_mf1(tape, 9228, 452)
>>> test['E']
array([1.00e-05, 2.53e-02, 5.00e-02, 1.00e+01, 1.00e+02, 1.00e+03,
5.50e+03, 7.75e+03, 1.00e+04, 1.50e+04, 2.00e+04, 3.00e+04,
4.00e+04, 5.00e+04, 6.00e+04, 7.00e+04, 8.00e+04, 9.00e+04,
1.00e+05, 1.20e+05, 1.30e+05, 1.40e+05, 1.50e+05, 1.70e+05,
2.00e+05, 2.50e+05, 3.00e+05, 3.50e+05, 4.00e+05, 5.00e+05,
6.00e+05, 7.00e+05, 8.00e+05, 9.00e+05, 1.00e+06, 1.20e+06,
1.40e+06, 1.60e+06, 1.80e+06, 2.00e+06, 2.20e+06, 2.40e+06,
2.60e+06, 2.80e+06, 3.00e+06, 3.50e+06, 4.00e+06, 4.50e+06,
5.00e+06, 5.50e+06, 6.00e+06, 6.50e+06, 7.00e+06, 7.50e+06,
8.00e+06, 8.50e+06, 9.00e+06, 9.50e+06, 1.00e+07, 1.05e+07,
1.10e+07, 1.15e+07, 1.20e+07, 1.25e+07, 1.30e+07, 1.35e+07,
1.40e+07, 1.45e+07, 1.50e+07, 1.55e+07, 1.60e+07, 1.65e+07,
1.70e+07, 1.75e+07, 1.80e+07, 1.85e+07, 1.90e+07, 1.95e+07,
2.00e+07])
**mt = 455** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> test = sandy.sections.mf1.read_mf1(tape, 9228, 455)
>>> test['LAMBDA']
[0.013336, 0.032739, 0.12078, 0.30278, 0.84949, 2.853]
>>> test['NU']
array([0.01585, 0.01585, 0.0167 , 0.0167 , 0.009 , 0.009 ])
**mt = 456** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> test = sandy.sections.mf1.read_mf1(tape, 9228, 456)
>>> test['NU']
array([2.42085 , 2.42085 , 2.42085 , 2.42085 , 2.417948, 2.417933,
2.417857, 2.417818, 2.41778 , 2.414463, 2.412632, 2.409341,
2.407132, 2.406774, 2.408063, 2.410846, 2.414175, 2.417648,
2.421063, 2.428448, 2.431798, 2.434909, 2.43778 , 2.444676,
2.451972, 2.455226, 2.45777 , 2.459884, 2.461767, 2.466965,
2.472104, 2.481385, 2.491777, 2.502975, 2.516006, 2.540238,
2.565402, 2.590224, 2.613985, 2.636654, 2.658912, 2.681288,
2.703809, 2.727271, 2.7515 , 2.811124, 2.87605 , 2.95168 ,
3.031212, 3.119151, 3.210984, 3.306917, 3.396401, 3.467412,
3.535635, 3.608747, 3.680833, 3.752163, 3.821917, 3.890283,
3.957945, 4.02513 , 4.092022, 4.160664, 4.232148, 4.305359,
4.379344, 4.453294, 4.52846 , 4.605076, 4.681103, 4.754749,
4.824436, 4.890934, 4.955851, 5.019246, 5.081174, 5.141692,
5.200845])
**mt = 458** :
>>> tape = sandy.get_endf6_file("endfb_71", 'xs', 922350)
>>> test = sandy.sections.mf1.read_mf1(tape, 9228, 458)
>>> test['POLYNOMIALS'][1]
{'EFR': -0.266,
'DEFR': 0.0266,
'ENP': 0.3004,
'DENP': 0.03004,
'END': 0.0,
'DEND': 0.0,
'EGP': 0.0777,
'DEGP': 0.00777,
'EGD': -0.075,
'DEGD': 0.0075,
'EB': -0.075,
'DEB': 0.0075,
'ENU': -0.1,
'DENU': 0.01,
'ER': -0.0379,
'DER': 0.00379,
'ET': -0.1379,
'DET': 0.01379}
"""
if mt == 451:
out = _read_intro(tape, mat)
Expand Down

0 comments on commit b96026b

Please sign in to comment.