Skip to content

Commit

Permalink
Merge branch 'master' into 250-lattice-pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
jank324 authored Oct 1, 2024
2 parents ea2f6d2 + f03f8ea commit 4a7c90c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This is a major release with significant upgrades under the hood of Cheetah. Des
- Fix an issue where splitting elements would result in splits with a different `dtype` (see #211) (@jank324)
- Fix issue in Bmad import where collimators had no length by interpreting them as `Drift` + `Aperture` (see #249) (@jank324)
- Fix NumPy 2 compatibility issues with PyTorch on Windows (see #220, #242) (@hespe)
- Fix issue with Dipole hgap conversion in Bmad import (see #261) (@cr-xu)

### 🐆 Other

Expand Down
2 changes: 1 addition & 1 deletion cheetah/converters/bmad.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def convert_element(
)
return cheetah.Dipole(
length=torch.tensor(bmad_parsed["l"]),
gap=torch.tensor(bmad_parsed.get("hgap", 0.0)),
gap=torch.tensor(2 * bmad_parsed.get("hgap", 0.0)),
angle=torch.tensor(bmad_parsed.get("angle", 0.0)),
e1=torch.tensor(bmad_parsed["e1"]),
e2=torch.tensor(bmad_parsed.get("e2", 0.0)),
Expand Down

0 comments on commit 4a7c90c

Please sign in to comment.