Skip to content

Commit eae1458

Browse files
authored
Add photon reaction summation rules (#35)
1 parent d39c040 commit eae1458

2 files changed

Lines changed: 23 additions & 21 deletions

File tree

src/endf/data.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,28 @@
8282
# Regex for GNDS nuclide names (used in zam function)
8383
_GNDS_NAME_RE = re.compile(r'([A-Zn][a-z]*)(\d+)((?:_[em]\d+)?)')
8484

85+
SUM_RULES = {
86+
1: [2, 3],
87+
3: [4, 5, 11, 16, 17, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35,
88+
36, 37, 41, 42, 44, 45, 152, 153, 154, 156, 157, 158, 159, 160,
89+
161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
90+
173, 174, 175, 176, 177, 178, 179, 180, 181, 183, 184, 185,
91+
186, 187, 188, 189, 190, 194, 195, 196, 198, 199, 200],
92+
4: list(range(50, 92)),
93+
16: list(range(875, 892)),
94+
18: [19, 20, 21, 38],
95+
27: [18, 101],
96+
101: [102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114,
97+
115, 116, 117, 155, 182, 191, 192, 193, 197],
98+
103: list(range(600, 650)),
99+
104: list(range(650, 700)),
100+
105: list(range(700, 750)),
101+
106: list(range(750, 800)),
102+
107: list(range(800, 850)),
103+
501: [502, 504, 516, 522],
104+
516: [515, 517],
105+
522: list(range(534, 573)),
106+
}
85107

86108
def gnds_name(Z: int, A: int, m: int = 0) -> str:
87109
"""Return nuclide name using GNDS convention

src/endf/incident_neutron.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,14 @@
66

77
import numpy as np
88

9-
from .data import gnds_name, temperature_str, ATOMIC_SYMBOL, EV_PER_MEV
9+
from .data import gnds_name, temperature_str, ATOMIC_SYMBOL, EV_PER_MEV, SUM_RULES
1010
from .material import Material
1111
from .fileutils import PathLike
1212
from .function import Tabulated1D
1313
from .reaction import Reaction, REACTION_MT
1414
from . import ace
1515

1616

17-
SUM_RULES = {
18-
1: [2, 3],
19-
3: [4, 5, 11, 16, 17, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35,
20-
36, 37, 41, 42, 44, 45, 152, 153, 154, 156, 157, 158, 159, 160,
21-
161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
22-
173, 174, 175, 176, 177, 178, 179, 180, 181, 183, 184, 185,
23-
186, 187, 188, 189, 190, 194, 195, 196, 198, 199, 200],
24-
4: list(range(50, 92)),
25-
16: list(range(875, 892)),
26-
18: [19, 20, 21, 38],
27-
27: [18, 101],
28-
101: [102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114,
29-
115, 116, 117, 155, 182, 191, 192, 193, 197],
30-
103: list(range(600, 650)),
31-
104: list(range(650, 700)),
32-
105: list(range(700, 750)),
33-
106: list(range(750, 800)),
34-
107: list(range(800, 850))
35-
}
36-
3717

3818
class IncidentNeutron:
3919
"""Continuous-energy neutron interaction data.

0 commit comments

Comments
 (0)