24def compare_results(egslst, inp_name):
26 gold_standard = read3ddose(os.path.join(os.path.dirname(os.path.abspath(__file__)),
"gold_standard.3ddose"))
27 run_doses = read3ddose(inp_name+
".phantom.3ddose")
29 dose_pairs = list(zip(gold_standard[
'doses'], run_doses[
'doses']))[7:12]
30 dose_diff = [abs(a-b)/a
for a, b
in dose_pairs]
31 doses_close = max(dose_diff) < 0.01
34 run_doses_edep = read3ddose(inp_name+
".phantom.edep.3ddose")
36 dose_diff_edep = [abs(a-b)/a
for a, b
in dose_pairs_edep]
37 doses_close_edep = max(dose_diff_edep) < 0.10
40 'edep': run_doses_edep[
'doses'],
41 'tlen': run_doses[
'doses']
45 'edep': run_doses[
'doses'],
46 'tlen': gold_standard[
'doses']
48 return doses_close
and doses_close_edep, actual, expected