-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathiaea_types.py
More file actions
42 lines (34 loc) · 836 Bytes
/
iaea_types.py
File metadata and controls
42 lines (34 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import ctypes
if tuple.__itemsize__ == 4:
IAEA_Float = ctypes.c_float
else:
IAEA_Float = ctypes.c_double
PIAEA_Float = ctypes.POINTER(IAEA_Float)
IAEA_I16 = ctypes.c_short
PIAEA_I16 = ctypes.POINTER(IAEA_I16)
IAEA_I32 = ctypes.c_int
PIAEA_I32 = ctypes.POINTER(IAEA_I32)
IAEA_I64 = ctypes.c_longlong
PIAEA_I64 = ctypes.POINTER(IAEA_I64)
iaea_file_modes = {
'r': IAEA_I32(1),
'w': IAEA_I32(2),
'a': IAEA_I32(3)
}
all_particles = -1
photons = 1
electrons = 2
positrons = 3
neutrons = 4
protons = 5
particle_types = {
'all' : all_particles,
'photon' : photons,
'electron': electrons,
'positron': positrons,
'neutron' : neutrons,
'proton' : protons,
'charged' : (electrons,positrons,protons),
'neutral' : (photons,neutrons)
}
max_sources = 30