Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine Elegant lattice converter #251

Merged
merged 8 commits into from
Oct 2, 2024
Merged

Conversation

Hespe
Copy link
Member

@Hespe Hespe commented Sep 12, 2024

Description

In the elegant lattice definition, there exist several aliases for already implemented cheetah Elements that prevent a sucessful import. This PR ensures that also the aliased elements can be imported without trouble.

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code and checked that formatting passes (required).
  • I have have fixed all issues found by flake8 (required).
  • I have ensured that all pytest tests pass (required).
  • I have run pytest on a machine with a CUDA GPU and made sure all tests pass (required).
  • I have checked that the documentation builds (required).

Note: We are using a maximum length of 88 characters per line.

@Hespe
Copy link
Member Author

Hespe commented Sep 12, 2024

I have opted not to remove all traces of a potential charge element from the imported lattice, but instead to replace it with a Marker with the respective name. Maybe removing it completly would be nicer, but the Marker can always just be removed afterwards.

@Hespe Hespe added the enhancement New feature or request label Sep 12, 2024
@Hespe Hespe self-assigned this Sep 20, 2024
@jank324
Copy link
Member

jank324 commented Oct 1, 2024

@Hespe can you make sure that the changes in this PR follow the new broadcasting semantics?

@Hespe
Copy link
Member Author

Hespe commented Oct 2, 2024

There are a lot of square bracket in the Elegant converter that are probably no longer necessary with the broadcasting rules. They are, however, mostly in parts of the code that is not affected by this PR. Should we address that here, or leave it for another time? Doing it partially seems wrong.

@Hespe Hespe changed the title Add element aliases for elegant lattice conversion Refine Elegant lattice converter Oct 2, 2024
@Hespe Hespe requested a review from jank324 October 2, 2024 13:50
@jank324 jank324 merged commit a8d38dc into desy-ml:master Oct 2, 2024
8 checks passed
@Hespe Hespe deleted the elegant-alias branch October 7, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants