EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
test.py
Go to the documentation of this file.
1"""
2
3A test for ensuring doses calculated with recycling turned on are the same as
4doses without recycling.
5
6"""
7
8import math
9import os
10import re
11
12from eb_tests.utils import (compare_3ddose_files, doses_approx_equal,
13 extract_all_doses, read3ddose)
14
15EGSINP = "recycling.egsinp"
16TIME_LIMIT_S_PER_MHZ = 16/2993. # s / MHz
17
18
19def compare_results(egslst, inp_name):
20
21 gold_standard = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gold_standard.3ddose")
22 run_doses = inp_name+".phantom.3ddose"
23
24 doses_close = compare_3ddose_files(gold_standard, run_doses, max_percent_diff=0.01)
25
26 return doses_close, read3ddose(run_doses), read3ddose(gold_standard)