svenreiche / Genesis-1.3-Version4

Time-dependent, 3D Code to simulate the amplification process of a Free-electron Laser.
GNU General Public License v3.0
55 stars 27 forks source link

Allow to import vectors and transport matrix to modify the particle distribution #129

Closed svenreiche closed 10 months ago

svenreiche commented 10 months ago

Sometimes one will alter the particle distribution in a two- or multistage simulation by means of shifting the slice centroids or to do a transformation. This could be done by importing a (Nx)6 vector and (Nx)6x6 transfer matrix. If N=1 (or the dimension omitted) than it is a global transformation for the whole beam. If N>1 then a distance has to be defined and genesis will interpolate the closes sample of vector and transport matrix to the position of the slice (e.g. with two vectors one can apply a chirp).

svenreiche commented 10 months ago

Implemented with the latest commit of the dev branch