@@ -69,11 +69,11 @@ def from_twiss(
69
69
Create a beam from twiss parameters.
70
70
71
71
:param beta_x: Beta function in x direction in meters.
72
- :param alpha_x: Alpha function in x direction in meters .
73
- :param emittance_x: Emittance in x direction.
72
+ :param alpha_x: Alpha function in x direction in rad .
73
+ :param emittance_x: Emittance in x direction in m*rad .
74
74
:param beta_y: Beta function in y direction in meters.
75
- :param alpha_y: Alpha function in y direction in meters .
76
- :param emittance_y: Emittance in y direction.
75
+ :param alpha_y: Alpha function in y direction in rad .
76
+ :param emittance_y: Emittance in y direction in m*rad .
77
77
:param energy: Energy of the beam in eV.
78
78
:param total_charge: Total charge of the beam in C.
79
79
"""
@@ -110,15 +110,16 @@ def transformed_to(
110
110
Create version of this beam that is transformed to new beam parameters.
111
111
112
112
:param mu_x: Center of the particle distribution on x in meters.
113
- :param mu_xp: Center of the particle distribution on px in meters .
113
+ :param mu_xp: Center of the particle distribution on x' in rad .
114
114
:param mu_y: Center of the particle distribution on y in meters.
115
- :param mu_yp: Center of the particle distribution on py in meters .
115
+ :param mu_yp: Center of the particle distribution on y' in rad .
116
116
:param sigma_x: Sigma of the particle distribution in x direction in meters.
117
- :param sigma_xp: Sigma of the particle distribution in px direction in meters .
117
+ :param sigma_xp: Sigma of the particle distribution in x' direction in rad .
118
118
:param sigma_y: Sigma of the particle distribution in y direction in meters.
119
- :param sigma_yp: Sigma of the particle distribution in py direction in meters .
119
+ :param sigma_yp: Sigma of the particle distribution in y' direction in rad .
120
120
:param sigma_s: Sigma of the particle distribution in s direction in meters.
121
- :param sigma_p: Sigma of the particle distribution in p direction in meters.
121
+ :param sigma_p: Sigma of the particle distribution in p direction,
122
+ dimensionless.
122
123
:param energy: Energy of the beam in eV.
123
124
:param total_charge: Total charge of the beam in C.
124
125
"""
@@ -283,6 +284,7 @@ def beta_x(self) -> torch.Tensor:
283
284
284
285
@property
285
286
def alpha_x (self ) -> torch .Tensor :
287
+ """Alpha function in x direction in rad."""
286
288
return - self .sigma_xxp / self .emittance_x
287
289
288
290
@property
@@ -307,6 +309,7 @@ def beta_y(self) -> torch.Tensor:
307
309
308
310
@property
309
311
def alpha_y (self ) -> torch .Tensor :
312
+ """Alpha function in y direction in rad."""
310
313
return - self .sigma_yyp / self .emittance_y
311
314
312
315
def broadcast (self , shape : torch .Size ) -> "Beam" :
@@ -611,15 +614,15 @@ def transformed_to(
611
614
612
615
:param n: Number of particles to generate.
613
616
:param mu_x: Center of the particle distribution on x in meters.
614
- :param mu_xp: Center of the particle distribution on px in meters .
617
+ :param mu_xp: Center of the particle distribution on x' in rad .
615
618
:param mu_y: Center of the particle distribution on y in meters.
616
- :param mu_yp: Center of the particle distribution on py in meters .
619
+ :param mu_yp: Center of the particle distribution on y' in rad .
617
620
:param sigma_x: Sigma of the particle distribution in x direction in meters.
618
- :param sigma_xp: Sigma of the particle distribution in px direction in meters .
621
+ :param sigma_xp: Sigma of the particle distribution in x' direction in rad .
619
622
:param sigma_y: Sigma of the particle distribution in y direction in meters.
620
- :param sigma_yp: Sigma of the particle distribution in py direction in meters .
623
+ :param sigma_yp: Sigma of the particle distribution in y' direction in rad .
621
624
:param sigma_s: Sigma of the particle distribution in s direction in meters.
622
- :param sigma_p: Sigma of the particle distribution in p direction in meters .
625
+ :param sigma_p: Sigma of the particle distribution in p, dimensionless .
623
626
:param energy: Energy of the beam in eV.
624
627
:param total_charge: Total charge of the beam in C.
625
628
"""
@@ -820,16 +823,16 @@ def from_parameters(
820
823
:param num_particles: Number of particles to generate.
821
824
:param mu_x: Center of the particle distribution on x in meters.
822
825
:param mu_y: Center of the particle distribution on y in meters.
823
- :param mu_xp: Center of the particle distribution on px in meters .
824
- :param mu_yp: Center of the particle distribution on py in meters .
826
+ :param mu_xp: Center of the particle distribution on x' in rad .
827
+ :param mu_yp: Center of the particle distribution on y' in metraders .
825
828
:param sigma_x: Sigma of the particle distribution in x direction in meters.
826
829
:param sigma_y: Sigma of the particle distribution in y direction in meters.
827
- :param sigma_xp: Sigma of the particle distribution in px direction in meters .
828
- :param sigma_yp: Sigma of the particle distribution in py direction in meters .
830
+ :param sigma_xp: Sigma of the particle distribution in x' direction in rad .
831
+ :param sigma_yp: Sigma of the particle distribution in y' direction in rad .
829
832
:param sigma_s: Sigma of the particle distribution in s direction in meters.
830
- :param sigma_p: Sigma of the particle distribution in p direction in meters .
831
- :param cor_x: Correlation between x and xp .
832
- :param cor_y: Correlation between y and yp .
833
+ :param sigma_p: Sigma of the particle distribution in p, dimensionless .
834
+ :param cor_x: Correlation between x and x' .
835
+ :param cor_y: Correlation between y and y' .
833
836
:param cor_s: Correlation between s and p.
834
837
:param energy: Energy of the beam in eV.
835
838
:total_charge: Total charge of the beam in C.
@@ -1041,14 +1044,14 @@ def make_linspaced(
1041
1044
:param n: Number of particles to generate.
1042
1045
:param mu_x: Center of the particle distribution on x in meters.
1043
1046
:param mu_y: Center of the particle distribution on y in meters.
1044
- :param mu_xp: Center of the particle distribution on px in meters .
1045
- :param mu_yp: Center of the particle distribution on py in meters .
1047
+ :param mu_xp: Center of the particle distribution on x' in rad .
1048
+ :param mu_yp: Center of the particle distribution on y' in rad .
1046
1049
:param sigma_x: Sigma of the particle distribution in x direction in meters.
1047
1050
:param sigma_y: Sigma of the particle distribution in y direction in meters.
1048
- :param sigma_xp: Sigma of the particle distribution in px direction in meters .
1049
- :param sigma_yp: Sigma of the particle distribution in py direction in meters .
1051
+ :param sigma_xp: Sigma of the particle distribution in x' direction in rad .
1052
+ :param sigma_yp: Sigma of the particle distribution in y' direction in rad .
1050
1053
:param sigma_s: Sigma of the particle distribution in s direction in meters.
1051
- :param sigma_p: Sigma of the particle distribution in p direction in meters .
1054
+ :param sigma_p: Sigma of the particle distribution in p, dimensionless .
1052
1055
:param energy: Energy of the beam in eV.
1053
1056
:param device: Device to move the beam's particle array to. If set to `"auto"` a
1054
1057
CUDA GPU is selected if available. The CPU is used otherwise.
@@ -1232,14 +1235,14 @@ def transformed_to(
1232
1235
:param n: Number of particles to generate.
1233
1236
:param mu_x: Center of the particle distribution on x in meters.
1234
1237
:param mu_y: Center of the particle distribution on y in meters.
1235
- :param mu_xp: Center of the particle distribution on px in meters .
1236
- :param mu_yp: Center of the particle distribution on py in meters .
1238
+ :param mu_xp: Center of the particle distribution on x' in rad .
1239
+ :param mu_yp: Center of the particle distribution on y' in rad .
1237
1240
:param sigma_x: Sigma of the particle distribution in x direction in meters.
1238
1241
:param sigma_y: Sigma of the particle distribution in y direction in meters.
1239
- :param sigma_xp: Sigma of the particle distribution in px direction in meters .
1240
- :param sigma_yp: Sigma of the particle distribution in py direction in meters .
1242
+ :param sigma_xp: Sigma of the particle distribution in x' direction in rad .
1243
+ :param sigma_yp: Sigma of the particle distribution in y' direction in rad .
1241
1244
:param sigma_s: Sigma of the particle distribution in s direction in meters.
1242
- :param sigma_p: Sigma of the particle distribution in p direction in meters .
1245
+ :param sigma_p: Sigma of the particle distribution in p, dimensionless .
1243
1246
:param energy: Energy of the beam in eV.
1244
1247
:param total_charge: Total charge of the beam in C.
1245
1248
:param device: Device to move the beam's particle array to. If set to `"auto"` a
0 commit comments