Astralavista

converters.astralavista.from_astrabeam(path: str) tuple[ndarray, float, ndarray]

Read from a ASTRA beam distribution, and prepare for conversion to a Cheetah ParticleBeam or ParameterBeam.

Adapted from the implementation in Ocelot: https://github.com/ocelot-collab/ocelot/blob/master/ocelot/adaptors/astra2ocelot.py

Parameters:

path – Path to the ASTRA beam distribution file.

Returns:

(particles, energy, q_array) Particle 6D phase space information, mean energy, and the charge array of the particle beam.