particle module
Define objects to store initial state/trajectory of a particle.
ParticleInitialStateis just here to save the position and energy of a particle at the entrance of the linac. Saved as anAcceleratorattribute.ParticleFullTrajectorysaves the energy, phase, position of a particle along the linac. As a singleParticleInitialStatecan lead to severalParticleFullTrajectory(according to size of the mesh, the solver, etc),ParticleFullTrajectoryare stored inSimulationOutput.
- class ParticleInitialState(w_kin: float, phi_abs: float, z_in: float, synchronous: bool)
Bases:
objectHold the initial energy/phase of a particle, and if it is synchronous.
It is stored in Accelerator, and is parent of ParticleFullTrajectory.
- class ParticleFullTrajectory(w_kin: ndarray | list, phi_abs: ndarray | list, synchronous: bool, beam: dict[str, Any])
Bases:
objectHold the full energy, phase, etc of a particle.
It is stored in a SimulationOutput. A single Accelerator can have several SimulationOutput, hence an Accelerator.ParticleInitialState can have several SimulationOutput.ParticleFullTrajectory.
- Phase is defined as:
phi = omega_0_bunch * t
- while in electric_field it is:
phi = omega_0_rf * t
- __post_init__()
Ensure that LightWin has everything it needs, with proper format.
- property tracewin_command: list[str]
Raise an error, this method should be called from InitialPart.
- compute_complementary_data()
Compute some data necessary to do the post-treatment.