29def compare_results(egslst, inp_name):
31 iaea_path =
"%s.phsp%s" %(inp_name, IAEAPhaseSpace.phsp_ext)
33 num_e = phsp.num_particles(
"electron")
34 num_p = phsp.num_particles(
"photon")
35 num_orig = phsp.num_orig_particles()
36 max_energy = phsp.maximum_energy() - RM
42 'max_energy': max_energy
45 num_orig_equal = num_orig == NHIST
46 num_e_close = abs(EXPECTED[
'num_e']- num_e) < 10
47 num_p_close = abs(EXPECTED[
'num_p']- num_p) < 10
48 max_e_close = abs( max_energy - MAX_E[0]) < 0.0001
50 all_correct = num_e_close
and num_p_close
and max_e_close
and num_orig_equal
51 return all_correct, actual, EXPECTED