set_phase_space_from_alternative_matrix#

ParticleBunch.set_phase_space_from_alternative_matrix(beam_matrix, gamma_ref)[source]#

Sets the phase space coordinates from a matrix with the values of (x, x’, y, y’, xi, dp).

Parameters:
bunch_matrixarray

6 x N matrix, where N is the number of particles, containing the phase-space information of the bunch as (x, x’, y, y’, xi, dp) in units of (m, rad, m, rad, m, -). dp is defined as dp = (g-g_ref)/g_ref, while x’ = px/p_kin and y’ = py/p_kin, where p_kin is the kinetic momentum of each particle.

gamma_reffloat

Reference energy with respect to which the particle momentum dp is calculated.