Skip to content

Commit 12b6636

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7bcfccb commit 12b6636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/multi_stage/analysis_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
def get_emittance(ts, t):
1010
"""Calculate the beam emittance at the given time step."""
1111
w, x, ux = ts.get_particle(["w", "x", "ux"], t=t)
12-
x2 = np.average( x**2, weights=w)
12+
x2 = np.average(x**2, weights=w)
1313
xu = np.average(x * ux, weights=w)
14-
return np.sqrt( x2 * np.average( (ux - xu/x2 * x)**2, weights=w) )
14+
return np.sqrt(x2 * np.average((ux - xu / x2 * x) ** 2, weights=w))
1515

1616

1717
def analyze_simulation(simulation_directory, output_params):

0 commit comments

Comments
 (0)