aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/photon_pusher/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/Tests/photon_pusher/check.py')
-rwxr-xr-xExamples/Tests/photon_pusher/check.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Examples/Tests/photon_pusher/check.py b/Examples/Tests/photon_pusher/check.py
index b7601d085..3e6873842 100755
--- a/Examples/Tests/photon_pusher/check.py
+++ b/Examples/Tests/photon_pusher/check.py
@@ -12,8 +12,8 @@ import sys
#Physical constants
-c = 299792458.0
-m_e = 9.10938291e-31
+c = 299792458.
+m_e = 9.1093837015e-31
#________________________________________
#Test cases
@@ -87,6 +87,11 @@ def check():
disc_mom = [np.linalg.norm(a-b)/np.linalg.norm(b)
for a,b in zip(res_mom, answ_mom)]
+ print("max(disc_pos) = %s" %max(disc_pos))
+ print("tol_pos = %s" %tol_pos)
+ print("max(disc_mom) = %s" %max(disc_mom))
+ print("tol_mom = %s" %tol_mom)
+
assert ((max(disc_pos) <= tol_pos) and (max(disc_mom) <= tol_mom))
# This function generates the input file to test the photon pusher.