Skip to content

Commit

Permalink
Tighten test tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
cemitch99 authored Jan 23, 2025
1 parent ab463c5 commit f514018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cyclotron/analysis_cyclotron_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_moments(beam):
)

atol = 0.0 # ignored
rtol = 1.8e12 * num_particles**-0.5 # from random sampling of a smooth distribution
rtol = 1.8 * num_particles**-0.5 # from random sampling of a smooth distribution
print(f" rtol={rtol} (ignored: atol~={atol})")

assert np.allclose(
Expand All @@ -81,7 +81,7 @@ def get_moments(beam):
)

atol = 0.0 # ignored
rtol = 2.0e12 * num_particles**-0.5 # from random sampling of a smooth distribution
rtol = 2.0 * num_particles**-0.5 # from random sampling of a smooth distribution
print(f" rtol={rtol} (ignored: atol~={atol})")

assert np.allclose(
Expand Down

0 comments on commit f514018

Please sign in to comment.