neutron-decay.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
def
neutron_decay
(x):
4
"""
5
Function to calculate the decay of a neutron
6
"""
7
X_n0 = 0.01
8
alpha = np.exp(-6.786182)
9
n_theory = X_n0 * np.exp(-alpha*x)
10
return
n_theory
11
12
13
14
15
t.checklist = { \
16
'mainout.dat'
: {
'method'
:
'analyticcompare'
,
'tolerance'
:[5e-4,5e-4] ,
'x_column'
:1,
'y_column'
:[6,7],
'function'
:[neutron_decay,
lambda
x: 1. -
neutron_decay
(x)]}, \
17
'finab.dat'
: {
'method'
:
'default'
,
'tolerance'
:5e-4 }, \
18
'finabsum.dat'
: {
'method'
:
'default'
,
'tolerance'
:5e-4 }, \
19
}
20
t.program = t.basedir +
"/bin/winnet"
21
t.testdir = t.basedir +
"/test/"
+ t.testname
22
t.logfile = t.testdir +
".log"
23
t.arcfile = t.testdir +
".tgz"
neutron-decay.neutron_decay
def neutron_decay(x)
Definition:
neutron-decay.py:3
test
neutron-decay.py