Skip to content

Commit

Permalink
Fix Python Example: Protons
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 3, 2024
1 parent 9956787 commit c716af1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/alignment/run_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
# domain decomposition & space charge mesh
sim.init_grids()

# load a 2 GeV electron beam with an initial
# unnormalized rms emittance of 2 nm
# load a 2 GeV proton beam
kin_energy_MeV = 2.0e3 # reference energy
bunch_charge_C = 1.0e-9 # used with space charge
npart = 100000 # number of macro particles

# reference particle
ref = sim.particle_container().ref_particle()
ref.set_charge_qe(1.0).set_mass_MeV(0.510998950).set_kin_energy_MeV(kin_energy_MeV)
ref.set_charge_qe(1.0).set_mass_MeV(938.27208816).set_kin_energy_MeV(kin_energy_MeV)

# particle bunch
distr = distribution.Waterbag(
Expand Down

0 comments on commit c716af1

Please sign in to comment.