Skip to content

Commit 50347f6

Browse files
committed
Simplify example
1 parent 900f609 commit 50347f6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/particles_generation/000_basics.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
# Copyright (c) CERN, 2021. #
44
# ######################################### #
55

6-
import xpart as xp
6+
import xtrack as xt
77
import xobjects as xo
88

9-
ctx = xo.ContextCpu()
10-
11-
particles = xp.Particles(_context=ctx,
12-
mass0=xp.PROTON_MASS_EV, q0=1, p0c=7e12, # 7 TeV
9+
particles = xt.Particles(_context=ctx,
10+
mass0=xt.PROTON_MASS_EV, q0=1, p0c=7e12, # 7 TeV
1311
x=[1e-3, 0], px=[1e-6, -1e-6], y=[0, 1e-3], py=[2e-6, 0],
1412
zeta=[1e-2, 2e-2], delta=[0, 1e-4])

0 commit comments

Comments
 (0)