Skip to content

Commit

Permalink
Merge pull request #142 from greglenerd/space_charge
Browse files Browse the repository at this point in the history
Add space-charge to Cheetah
  • Loading branch information
jank324 authored Jun 26, 2024
2 parents 3f16079 + f31034f commit 3730f93
Show file tree
Hide file tree
Showing 10 changed files with 1,006 additions and 1,233 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `CustomTransferMap` elements created by combining multiple other elements will now reflect that in their `name` attribute (see #100) (@jank324)
- Add a new class method for `ParticleBeam` to generate a 3D uniformly distributed ellipsoidal beam (see #146) (@cr-xu, @jank324)
- Add Python 3.12 support (see #161) (@jank324)
- Implement space charge using Green's function in a `SpaceChargeKick` element (see #142) (@greglenerd, @RemiLehe, @ax3l, @cr-xu, @jank324)

### 🐛 Bug fixes

Expand Down
1 change: 1 addition & 0 deletions cheetah/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Screen,
Segment,
Solenoid,
SpaceChargeKick,
Undulator,
VerticalCorrector,
)
Expand Down
1 change: 1 addition & 0 deletions cheetah/accelerator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
from .screen import Screen # noqa: F401
from .segment import Segment # noqa: F401
from .solenoid import Solenoid # noqa: F401
from .space_charge_kick import SpaceChargeKick # noqa: F401
from .undulator import Undulator # noqa: F401
from .vertical_corrector import VerticalCorrector # noqa: F401
2 changes: 1 addition & 1 deletion cheetah/accelerator/quadrupole.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def plot(self, ax: plt.Axes, s: float) -> None:
def defining_features(self) -> list[str]:
return super().defining_features + ["length", "k1", "misalignment", "tilt"]

def __repr__(self) -> None:
def __repr__(self) -> str:
return (
f"{self.__class__.__name__}(length={repr(self.length)}, "
+ f"k1={repr(self.k1)}, "
Expand Down
Loading

0 comments on commit 3730f93

Please sign in to comment.