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

Error when using BPM with parameter beam #101

Closed
jank324 opened this issue Nov 13, 2023 · 0 comments · Fixed by #102
Closed

Error when using BPM with parameter beam #101

jank324 opened this issue Nov 13, 2023 · 0 comments · Fixed by #102
Assignees
Labels
bug Something isn't working

Comments

@jank324
Copy link
Member

jank324 commented Nov 13, 2023

The following MWE

segment = cheetah.Segment(
    elements=[
        cheetah.Drift(length=torch.tensor(1.0)),
        cheetah.BPM(name="my_bpm"),
        cheetah.Drift(length=torch.tensor(1.0)),
    ],
)
beam = cheetah.ParameterBeam.from_astra("benchmark/cheetah/ACHIP_EA1_2021.1351.001")

segment.my_bpm.is_active = True

_ = segment.track(beam)

throws

AttributeError: 'ParameterBeam' object has no attribute '_mu_x'
@jank324 jank324 added the bug Something isn't working label Nov 13, 2023
@jank324 jank324 self-assigned this Nov 13, 2023
@jank324 jank324 linked a pull request Nov 13, 2023 that will close this issue
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 a pull request may close this issue.

1 participant