File tree 4 files changed +5
-7
lines changed
4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 19
19
- Fix error raised when tracking a ` ParameterBeam ` through an active ` BPM ` (see #101 ) (@jank324 )
20
20
- Fix error in ASTRA beam import where the energy was set to ` float64 ` instead of ` float32 ` (see #111 ) (@jank324 )
21
21
- Fix missing passing of ` total_charge ` in ` ParameterBeam.transformed_to ` (see #112 ) (@jank324 )
22
+ - Fix ` Cavitiy.__repr__ ` printing ` voltage ` value for ` phase ` property (see #121 ) (@jank324 )
22
23
23
24
### 🐆 Other
24
25
Original file line number Diff line number Diff line change 23
23
generate_unique_name = UniqueNameGenerator (prefix = "unnamed_element" )
24
24
25
25
rest_energy = torch .tensor (
26
- constants .electron_mass
27
- * constants .speed_of_light ** 2
28
- / constants .elementary_charge
26
+ constants .electron_mass * constants .speed_of_light ** 2 / constants .elementary_charge
29
27
) # electron mass
30
28
electron_mass_eV = torch .tensor (
31
29
physical_constants ["electron mass energy equivalent in MeV" ][0 ] * 1e6
@@ -1163,7 +1161,7 @@ def __repr__(self) -> str:
1163
1161
return (
1164
1162
f"{ self .__class__ .__name__ } (length={ repr (self .length )} , "
1165
1163
+ f"voltage={ repr (self .voltage )} , "
1166
- + f"phase={ repr (self .voltage )} , "
1164
+ + f"phase={ repr (self .phase )} , "
1167
1165
+ f"frequency={ repr (self .frequency )} , "
1168
1166
+ f"name={ repr (self .name )} )"
1169
1167
)
Original file line number Diff line number Diff line change 6
6
from scipy import constants
7
7
8
8
REST_ENERGY = torch .tensor (
9
- constants .electron_mass
10
- * constants .speed_of_light ** 2
11
- / constants .elementary_charge
9
+ constants .electron_mass * constants .speed_of_light ** 2 / constants .elementary_charge
12
10
) # Electron mass
13
11
14
12
Original file line number Diff line number Diff line change 1
1
"""
2
2
Tests that ensure that both beam types produce (roughly) the same results.
3
3
"""
4
+
4
5
import torch
5
6
6
7
import cheetah
You can’t perform that action at this time.
0 commit comments