@@ -25,6 +25,42 @@ def build_particles(_context=None, _buffer=None, _offset=None,
2525 scale_with_transverse_norm_emitt = None ,
2626 weight = None ):
2727
28+ """
29+ Function to create particle objects from arrays containing physical or normalized coordinates.
30+
31+ Arguments:
32+
33+ - particle_ref: Reference particle to which the provided arrays with coordinates are added
34+ - x: Values to be added to particle_ref.x
35+ - px: Values to be added to particle_ref.px
36+ - y: Values to be added to particle_ref.y
37+ - py: Values to be added to particle_ref.py
38+ - zeta: Values to be added to particle_ref.zeta
39+ - delta: Values to be added to particle_ref.delta
40+ - x_norm: transverse normalized coordinate x (in sigmas) used in combination
41+ with the one turn matrix R_matrix and with the transverse emittances provided in the argument
42+ scale_with_transverse_norm_emitt to generate x, px, y, py (x, px, y, py cannot be provided if
43+ x_norm, px_norm, y_norm, py_norm are provided).
44+ - px_norm: transverse normalized coordinate px (in sigmas) used in combination
45+ with the one turn matrix R_matrix and with the transverse emittances provided in the argument
46+ scale_with_transverse_norm_emitt to generate x, px, y, py (x, px, y, py cannot be provided if
47+ x_norm, px_norm, y_norm, py_norm are provided).
48+ - y_norm: transverse normalized coordinate y (in sigmas) used in combination
49+ with the one turn matrix R_matrix and with the transverse emittances provided in the argument
50+ scale_with_transverse_norm_emitt to generate x, px, y, py (x, px, y, py cannot be provided if
51+ x_norm, px_norm, y_norm, py_norm are provided).
52+ - py_norm: transverse normalized coordinate py (in sigmas) used in combination
53+ with the one turn matrix R_matrix and with the transverse emittances provided in the argument
54+ scale_with_transverse_norm_emitt to generate x, px, y, py (x, px, y, py cannot be provided if
55+ x_norm, px_norm, y_norm, py_norm are provided).
56+ - R_matrix: 6x6 matrix defining the linearized one-turn map to be used for the transformation of
57+ the normalized coordinates into physical space.
58+ - scale_with_transverse_norm_emitt: Tuple of two elements defining the transverse normalized
59+ emittances used to rescale the provided transverse normalized coordinates (x, px, y, py).
60+ - weight: weights to be assigned to the particles.
61+ - _context: xobjects context in which the particle object is allocated.
62+
63+ """
2864
2965 if not isinstance (particle_ref , particle_class ):
3066 particle_ref = particle_class (** particle_ref .to_dict ())
0 commit comments