Skip to content

Commit

Permalink
Update analysis script values+tolerance.
Browse files Browse the repository at this point in the history
  • Loading branch information
cemitch99 committed Dec 17, 2024
1 parent ce2dd3f commit ff54e62
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions examples/linac_segment/analysis_linac_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ def get_moments(beam):
)

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

assert np.allclose(
[sigx, sigy, sigt, emittance_x, emittance_y, emittance_t],
[
7.5451170454175073e-005,
7.5441588239210947e-005,
9.9775878164077539e-004,
1.9959540393751392e-009,
2.0175015289132990e-009,
2.0013820193294972e-006,
2.300582e-03,
2.350613e-03,
9.939595e-02,
3.057531e-06,
2.960797e-06,
5.487870e-06,
],
rtol=rtol,
atol=atol,
Expand All @@ -80,18 +80,18 @@ def get_moments(beam):
)

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

assert np.allclose(
[sigx, sigy, sigt, emittance_x, emittance_y, emittance_t],
[
7.4790118496224206e-005,
7.5357525169680140e-005,
9.9775879288128088e-004,
1.9959539836392703e-009,
2.0175014668882125e-009,
2.0013820380883801e-006,
1.451059e-03,
1.467217e-03,
2.228492e-02,
3.009007e-06,
3.104729e-06,
5.371249e-06,
],
rtol=rtol,
atol=atol,
Expand Down

0 comments on commit ff54e62

Please sign in to comment.