EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
eb_tests
flu_cutoff
test.py
Go to the documentation of this file.
1
"""
2
3
A test for ensuring that the fluorescent photon cutoff works. A monoenergetic
4
source of 0.015keV is placed within a thin Ti sphere and photon counts are
5
scored on the outer surface of the sphere. Normally there would be a
6
fluorescent peak at ~4.5keV so when the `fluorescent photon cutoff` setting is
7
set to 0.005 MeV that peak should not be present.
8
9
Two energy bins from 0-10keV and 10-20keV are used. If fluorescent photon cutoff
10
feature is working correctly 100% of photons should be in the 10-20keV range.
11
12
"""
13
14
import
math
15
import
re
16
17
from
eb_tests.utils
import
read_csv_spectrum, values_close
18
19
EGSINP =
"flu_cutoff.egsinp"
20
TIME_LIMIT_S_PER_MHZ = 2/2993.
# s / MHz
21
22
23
def
compare_results(egslst, inp_name):
24
25
energies, counts, uncs = read_csv_spectrum(inp_name+
".surfcount.csv"
)
26
27
lower, upper = counts
28
if
not
(lower == 0
and
upper == 100):
29
return
False
,
"Photon Count < 10keV = %f"
%(lower),
"Expected 0"
30
31
return
True
,
""
,
""
eb_tests.utils
Definition
utils.py:1
Generated by
1.9.8