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

Temporary fix for broken inactiveTransverseDeflectingCavity in Segment #296

Conversation

jank324
Copy link
Member

@jank324 jank324 commented Nov 22, 2024

Description

Implements a temporary fix that prevents inactive TransverseDeflectingCavitys to take part in transfer map reduction.

Ideally, this should be fixed properly at some point to allow for fast tracking by implementing the transfer_map function or inheriting it from Drift in the future, to make sure this part of Cheetah is also as fast as it can be. For now the workaround for being fast is to replace inactive elements with Drift using the respective functions in Segment for doing exactly that.

Motivation and Context

Calling transfer_map on TransverseDeflectingCavity would cause a NotImplementedError to be raised and therefore prevent tracking through any Segment that had an inactive TransverseDeflectingCavity in it.

Fixes #290.

  • 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.

@jank324 jank324 linked an issue Nov 22, 2024 that may be closed by this pull request
@jank324 jank324 marked this pull request as ready for review November 22, 2024 15:27
@jank324 jank324 requested a review from Hespe November 22, 2024 15:27
@jank324 jank324 added the bug Something isn't working label Nov 22, 2024
@jank324 jank324 self-assigned this Nov 22, 2024
@jank324 jank324 changed the title Temporary fix for broken inactive TDC in Segment Temporary fix for broken inactiveTransverseDeflectingCavity in Segment Nov 22, 2024
@jank324 jank324 merged commit 0f02af6 into master Nov 22, 2024
8 checks passed
@jank324 jank324 deleted the 290-tracking-fails-with-transversedeflectingcavity-if-embedded-in-a-segment branch November 22, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking fails with TransverseDeflectingCavity if embedded in a segment
2 participants