1616
1717import pytest
1818
19- from impactx import ImpactX , Map6x6 , distribution , elements
19+ from impactx import ImpactX , Map6x6 , distribution , elements , twiss
2020
2121# benchmark config
2222rounds = 5
@@ -44,9 +44,9 @@ def __enter__(self):
4444 beam = self .sim .particle_container ()
4545 beam .clear_particles ()
4646
47- # load a 2 GeV electron beam with an initial
48- # unnormalized rms emittance of 2 nm
49- kin_energy_MeV = 2 .0e3 # reference energy
47+ # load a 1 GeV electron beam with an initial
48+ # unnormalized rms emittance of 1 nm
49+ kin_energy_MeV = 1 .0e3 # reference energy
5050 bunch_charge_C = 1.0e-9 # used with space charge
5151
5252 # reference particle
@@ -57,15 +57,17 @@ def __enter__(self):
5757
5858 # particle bunch
5959 distr = distribution .Waterbag (
60- lambdaX = 3.9984884770e-5 ,
61- lambdaY = 3.9984884770e-5 ,
62- lambdaT = 1.0e-3 ,
63- lambdaPx = 2.6623538760e-5 ,
64- lambdaPy = 2.6623538760e-5 ,
65- lambdaPt = 2.0e-3 ,
66- muxpx = - 0.846574929020762 ,
67- muypy = 0.846574929020762 ,
68- mutpt = 0.0 ,
60+ ** twiss (
61+ beta_x = 1.0 ,
62+ beta_y = 1.0 ,
63+ beta_t = 1.0 ,
64+ emitt_x = 1e-09 ,
65+ emitt_y = 1e-09 ,
66+ emitt_t = 1e-06 ,
67+ alpha_x = 0.0 ,
68+ alpha_y = 0.0 ,
69+ alpha_t = 0.0 ,
70+ )
6971 )
7072 self .sim .add_particles (bunch_charge_C , distr , npart )
7173 assert self .sim .particle_container ().total_number_of_particles () == npart
0 commit comments