Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2024
1 parent 7d53f1e commit aa651ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/multi_stage/analysis_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
def get_emittance(ts, t):
"""Calculate the beam emittance at the given time step."""
w, x, ux = ts.get_particle(["w", "x", "ux"], t=t)
x2 = np.average( x**2, weights=w)
x2 = np.average(x**2, weights=w)
xu = np.average(x * ux, weights=w)
return np.sqrt( x2 * np.average( ux - xu/x2 * x, weights=w) )
return np.sqrt(x2 * np.average(ux - xu / x2 * x, weights=w))


def analyze_simulation(simulation_directory, output_params):
Expand Down

0 comments on commit aa651ed

Please sign in to comment.