-
Notifications
You must be signed in to change notification settings - Fork 4
Diagnostics
Sajid Ali edited this page Oct 19, 2022
·
1 revision
During the simulation, it is often critical to monitor the shape and properties of the
particle beam. In synergia it is achieved by registering various beam diagnostic
objects to the Bunch_simulator
. Synergia
provides common diagnostics such as
getting the statistics of a bunch, or writing out coordinates for selected particles,
etc.
# register a bunch statistic diagnostic performing at the end of every turn
diag_full2 = synergia.bunch.Diagnostics_full2("diag_full2.h5")
simulator.reg_diag_per_turn(diag_full2)
# write out the state of first 100 particles every other turn
diag_particles = synergia.bunch.Diagnostics_particles("diag_particles.h5", 100)
simulator.reg_diag_per_turn(diag_particles, period=2)
Synergia
also allows user to register diagnostics on a per-step, or at a specific
lattice element by calling the following methods,
simulator.reg_diag_per_step(diag, period)
simulator.reg_diag_at_element(diag, element)