Skip to content

Commit

Permalink
Examples: Use Parser Where Sensible
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 10, 2025
1 parent 4105a97 commit 68efd71
Show file tree
Hide file tree
Showing 39 changed files with 99 additions and 99 deletions.
4 changes: 2 additions & 2 deletions examples/achromatic_spectrometer/input_spectrometer.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 3.162277660e-6
beam.lambdaY = 3.162277660e-6
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 3.16227766017e-4
beam.lambdaPy = 3.16227766017e-4
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-2
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/alignment/input_alignment.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = proton
beam.distribution = waterbag
beam.lambdaX = 1.16098260008648811e-3
beam.lambdaY = 1.16098260008648811e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 0.580491300043e-3
beam.lambdaPy = 0.580491300043e-3
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
6 changes: 3 additions & 3 deletions examples/apochromatic/input_apochromatic.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = gaussian
beam.lambdaX = 1.288697604e-6
beam.lambdaY = 1.288697604e-6
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-6
beam.lambdaPx = 3.965223396e-6
beam.lambdaPy = 3.965223396e-6
beam.lambdaPt = 0.01 #1% energy spread
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 0.01 # 1% energy spread
beam.muxpx = 0.0
beam.muypy = 0.0
beam.mutpt = 0.0
Expand Down
6 changes: 3 additions & 3 deletions examples/apochromatic/input_apochromatic_pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = gaussian
beam.lambdaX = 1.288697604e-6
beam.lambdaY = 1.288697604e-6
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-6
beam.lambdaPx = 3.965223396e-6
beam.lambdaPy = 3.965223396e-6
beam.lambdaPt = 0.01 #1% energy spread
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 0.01 # 1% energy spread
beam.muxpx = 0.0
beam.muypy = 0.0
beam.mutpt = 0.0
Expand Down
12 changes: 6 additions & 6 deletions examples/cfbend/input_cfbend.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 #2 GeV
beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 5.0e-6 #5 um
beam.lambdaY = 8.0e-6 #8 um
beam.lambdaT = 0.0599584916 #200 ps
beam.lambdaPx = 2.5543422003e-9 #exn = 50 pm-rad
beam.lambdaPy = 1.5964638752e-9 #eyn = 50 pm-rad
beam.lambdaPt = 9.0e-4 #approximately dE/E
beam.lambdaX = 5.0e-6 # 5 um
beam.lambdaY = 8.0e-6 # 8 um
beam.lambdaT = 0.0599584916 # 200 ps
beam.lambdaPx = 2.5543422003e-9 # exn = 50 pm-rad
beam.lambdaPy = 1.5964638752e-9 # eyn = 50 pm-rad
beam.lambdaPt = 9.0e-4 # approximately dE/E
beam.muxpx = 0.0
beam.muypy = 0.0
beam.mutpt = 0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/cfchannel/input_cfchannel.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = proton
beam.distribution = waterbag
beam.lambdaX = 1.0e-3
beam.lambdaY = 1.0e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 3.369701494258956e-4
beam.lambdaPx = 1.0e-3
beam.lambdaPy = 1.0e-3
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.9676219145931020e-3
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/cfchannel/input_cfchannel_10nC_fft.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ beam.charge = 1.0e-8
beam.particle = proton
beam.distribution = waterbag
beam.lambdaX = 1.2154443728379865788e-3
beam.lambdaY = 1.2154443728379865788e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 4.0956844276541331005e-4
beam.lambdaPx = 8.2274435782286157175e-4
beam.lambdaPy = 8.2274435782286157175e-4
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.4415943602685364584e-3


Expand Down
4 changes: 2 additions & 2 deletions examples/cfchannel/input_cfchannel_10nC_mlmg.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ beam.charge = 1.0e-8
beam.particle = proton
beam.distribution = waterbag
beam.lambdaX = 1.2154443728379865788e-3
beam.lambdaY = 1.2154443728379865788e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 4.0956844276541331005e-4
beam.lambdaPx = 8.2274435782286157175e-4
beam.lambdaPy = 8.2274435782286157175e-4
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.4415943602685364584e-3


Expand Down
2 changes: 1 addition & 1 deletion examples/chicane/input_chicane.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ beam.lambdaPx = 1.598353425e-6
beam.lambdaPy = 2.803697378e-6
beam.lambdaPt = 2.000000000e-6
beam.muxpx = 0.933345606203060
beam.muypy = 0.933345606203060
beam.muypy = beam.muxpx
beam.mutpt = 0.999999961419755


Expand Down
2 changes: 1 addition & 1 deletion examples/chicane/input_chicane_csr.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ beam.lambdaPx = 1.598353425e-6
beam.lambdaPy = 2.803697378e-6
beam.lambdaPt = 2.000000000e-6
beam.muxpx = 0.933345606203060
beam.muypy = 0.933345606203060
beam.muypy = beam.muxpx
beam.mutpt = 0.999999961419755


Expand Down
4 changes: 2 additions & 2 deletions examples/compression/input_compression.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 0.5e-3
beam.lambdaY = 0.5e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 5.0e-3
beam.lambdaPx = 1.0e-5
beam.lambdaPy = 1.0e-5
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 4.0e-6
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/coupled_optics/input_coupled_optics.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ beam.lambdaPx = 1.598353425e-6
beam.lambdaPy = 2.803697378e-6
beam.lambdaPt = 2.000000000e-6
beam.muxpx = 0.933345606203060
beam.muypy = 0.933345606203060
beam.muypy = beam.muxpx
beam.mutpt = 0.999999961419755


Expand Down
4 changes: 2 additions & 2 deletions examples/cyclotron/input_cyclotron.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = proton
beam.distribution = waterbag
beam.lambdaX = 1.0e-3
beam.lambdaY = 1.0e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 0.3
beam.lambdaPx = 2.0e-4
beam.lambdaPy = 2.0e-4
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-5
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/distgen/input_gaussian_twiss.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ beam.alphaX = -1.5905003499999992
beam.alphaY = 1.5905003499999992
beam.alphaT = 0.0
beam.betaX = 2.8216194100262637
beam.betaY = 2.8216194100262637
beam.betaY = beam.betaX
beam.betaT = 0.5
beam.emittX = 2e-09
beam.emittY = 2e-09
beam.emittY = beam.emittX
beam.emittT = 2e-06


Expand Down
4 changes: 2 additions & 2 deletions examples/distgen/input_kurth4d.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ beam.charge = 1.0e-9
beam.particle = proton
beam.distribution = kurth4d
beam.lambdaX = 1.0e-3
beam.lambdaY = 1.0e-3
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 1.0e-3
beam.lambdaPy = 1.0e-3
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = 0.0
beam.muypy = 0.0
Expand Down
6 changes: 3 additions & 3 deletions examples/distgen/input_kvdist_twiss.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = kvdist_from_twiss
beam.alphaX = -1.5905003499999992
beam.alphaY = 1.5905003499999992
beam.alphaY = -beam.alphaX
beam.alphaT = 0.0
beam.betaX = 2.8216194100262637
beam.betaY = 2.8216194100262637
beam.betaY = beam.betaX
beam.betaT = 0.5
beam.emittX = 2e-09
beam.emittY = 2e-09
beam.emittY = beam.emittX
beam.emittT = 2e-06


Expand Down
6 changes: 3 additions & 3 deletions examples/distgen/input_semigaussian.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = gaussian
beam.lambdaX = 3.9984884770e-5
beam.lambdaY = 3.9984884770e-5
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 2.6623538760e-5
beam.lambdaPy = 2.6623538760e-5
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = -0.846574929020762
beam.muypy = 0.846574929020762
beam.muypy = -beam.muxpx
beam.mutpt = 0.0


Expand Down
12 changes: 6 additions & 6 deletions examples/dogleg/input_dogleg.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ beam.lambdaPx = 1.598353425e-6
beam.lambdaPy = 2.803697378e-6
beam.lambdaPt = 2.000000000e-6
beam.muxpx = 0.933345606203060
beam.muypy = 0.933345606203060
beam.muypy = beam.muxpx
beam.mutpt = 0.999999961419755


Expand All @@ -29,11 +29,11 @@ sbend1.ds = 0.500194828041958 # projected length 0.5 m, angle 2.77 deg
sbend1.rc = -10.3462283686195526

drift1.type = drift
drift1.ds = 5.0058489435 # projected length 5 m
drift1.ds = 5.0058489435 # projected length 5 m

sbend2.type = sbend
sbend2.ds = 0.500194828041958 # projected length 0.5 m, angle 2.77 deg
sbend2.rc = 10.3462283686195526
sbend2.ds = sbend1.ds # projected length 0.5 m, angle 2.77 deg
sbend2.rc = -sbend1.rc

drift2.type = drift
drift2.ds = 0.5
Expand All @@ -45,8 +45,8 @@ dipedge1.g = 0.0
dipedge1.K2 = 0.0

dipedge2.type = dipedge
dipedge2.psi = 0.048345620280243
dipedge2.rc = 10.3462283686195526
dipedge2.psi = -dipedge1.psi
dipedge2.rc = -dipedge1.rc
dipedge2.g = 0.0
dipedge2.K2 = 0.0

Expand Down
4 changes: 2 additions & 2 deletions examples/epac2004_benchmarks/input_bithermal.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ monitor.backend = h5
constf1.type = constf
constf1.ds = 10.0
constf1.kx = 6.283185307179586
constf1.ky = 6.283185307179586
constf1.kt = 6.283185307179586
constf1.ky = constf1.kx
constf1.kt = constf1.kx
#constf1.nslice = 400 #full resolution
constf1.nslice = 50

Expand Down
2 changes: 1 addition & 1 deletion examples/epac2004_benchmarks/input_fodo_rf_SC.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fquad.nslice = 6

dquad.type = quad
dquad.ds = 0.3
dquad.k = -2.4669749766168163
dquad.k = -fquad.k
dquad.nslice = 12

gapa1.type = rfcavity
Expand Down
4 changes: 2 additions & 2 deletions examples/epac2004_benchmarks/input_thermal.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ monitor.backend = h5
constf1.type = constf
constf1.ds = 10.0
constf1.kx = 6.283185307179586
constf1.ky = 6.283185307179586
constf1.kt = 6.283185307179586
constf1.ky = constf1.kx
constf1.kt = constf1.kx
constf1.nslice = 400 #full resolution
#constf1.nslice = 50

Expand Down
2 changes: 1 addition & 1 deletion examples/expanding_beam/input_expanding_fft.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = kurth6d
beam.lambdaX = 4.472135955e-4
beam.lambdaY = 4.472135955e-4
beam.lambdaY = beam.lambdaX
beam.lambdaT = 9.12241869e-7
beam.lambdaPx = 0.0
beam.lambdaPy = 0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/expanding_beam/input_expanding_mlmg.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = kurth6d
beam.lambdaX = 4.472135955e-4
beam.lambdaY = 4.472135955e-4
beam.lambdaY = beam.lambdaX
beam.lambdaT = 9.12241869e-7
beam.lambdaPx = 0.0
beam.lambdaPy = 0.0
Expand Down
6 changes: 3 additions & 3 deletions examples/fodo/input_fodo.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 3.9984884770e-5
beam.lambdaY = 3.9984884770e-5
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 2.6623538760e-5
beam.lambdaPy = 2.6623538760e-5
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = -0.846574929020762
beam.muypy = 0.846574929020762
beam.muypy = -beam.muxpx
beam.mutpt = 0.0


Expand Down
6 changes: 3 additions & 3 deletions examples/fodo/input_fodo_twiss.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag_from_twiss
beam.alphaX = -1.5905003499999992
beam.alphaY = 1.5905003499999992
beam.alphaY = -beam.alphaX
beam.alphaT = 0.0
beam.betaX = 2.8216194100262637
beam.betaY = 2.8216194100262637
beam.betaY = beam.betaX
beam.betaT = 0.5
beam.emittX = 2e-09
beam.emittY = 2e-09
beam.emittY = beam.emittX
beam.emittT = 2e-06


Expand Down
6 changes: 3 additions & 3 deletions examples/fodo_channel/input_fodo.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag_from_twiss
beam.alphaX = -1.5905003499999992
beam.alphaY = 1.5905003499999992
beam.alphaY = -beam.alphaX
beam.alphaT = 0.0
beam.betaX = 2.8216194100262637
beam.betaY = 2.8216194100262637
beam.betaY = beam.betaX
beam.betaT = 0.5
beam.emittX = 2e-09
beam.emittY = 2e-09
beam.emittY = beam.emittX
beam.emittT = 2e-06


Expand Down
6 changes: 3 additions & 3 deletions examples/fodo_chromatic/input_fodo_chr.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 3.9984884770e-5
beam.lambdaY = 3.9984884770e-5
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 2.6623538760e-5
beam.lambdaPy = 2.6623538760e-5
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = -0.846574929020762
beam.muypy = 0.846574929020762
beam.muypy = -beam.muxpx
beam.mutpt = 0.0


Expand Down
6 changes: 3 additions & 3 deletions examples/fodo_tune/input_fodo_tune.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ beam.charge = 1.0e-9
beam.particle = electron
beam.distribution = waterbag
beam.lambdaX = 3.9984884770e-5
beam.lambdaY = 3.9984884770e-5
beam.lambdaY = beam.lambdaX
beam.lambdaT = 1.0e-3
beam.lambdaPx = 2.6623538760e-5
beam.lambdaPy = 2.6623538760e-5
beam.lambdaPy = beam.lambdaPx
beam.lambdaPt = 2.0e-3
beam.muxpx = -0.846574929020762
beam.muypy = 0.846574929020762
beam.muypy = -beam.muxpx
beam.mutpt = 0.0


Expand Down
Loading

0 comments on commit 68efd71

Please sign in to comment.