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

Add Bmad-X Drift Dipole and Transverse Deflecting Cavity #240

Merged
merged 65 commits into from
Sep 4, 2024

Conversation

jp-ga
Copy link
Collaborator

@jp-ga jp-ga commented Aug 20, 2024

Description

Adds Bmad-X tracking routines to Drift and Dipole, and adds a new Element: a TransverseDeflectingCavity

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.

@jp-ga jp-ga linked an issue Aug 20, 2024 that may be closed by this pull request
@jp-ga jp-ga requested review from jank324 and cr-xu August 20, 2024 08:37
Copy link
Member

@jank324 jank324 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So as far as I'm concerned, this PR is fine, except for the docstring and type annotation that's missing. @jp-ga, I think you are in the best position to add those.

I'm not sure if the plot function is an issue. @jp-ga, @cr-xu what are your thoughts?

Aside from that, I fixed an issue that always cast everything to torch.float64. This was rooted in a general issue in Cheetah, where constant floating point numbers were cast to tensors when they didn't have to be.

@jp-ga
Copy link
Collaborator Author

jp-ga commented Sep 3, 2024

So as far as I'm concerned, this PR is fine, except for the docstring and type annotation that's missing. @jp-ga, I think you are in the best position to add those.

I'm not sure if the plot function is an issue. @jp-ga, @cr-xu what are your thoughts?

Aside from that, I fixed an issue that always cast everything to torch.float64. This was rooted in a general issue in Cheetah, where constant floating point numbers were cast to tensors when they didn't have to be.

Sounds good, I will work on the changes. I can also change the color of the TDC.

@jp-ga jp-ga requested a review from jank324 September 3, 2024 21:48
@jank324 jank324 merged commit db7ea35 into master Sep 4, 2024
8 checks passed
@jank324 jank324 deleted the 228-add-bmad-x-drift-dipole-and-crab-cavity branch September 4, 2024 12:22
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.

Add Bmad-X drift dipole and crab cavity
3 participants