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

Fix AttributeError for misaligned non-multipoles #37

Merged
merged 4 commits into from
Aug 21, 2020

Conversation

roman-martin
Copy link

Fixes issue #34.

@roman-martin
Copy link
Author

roman-martin commented Jan 9, 2020

This an alternative solution to #36.
Here we keep the possibility to get AttributeErrors if the magnet error input does not fit into our model, instead of just ignoring the input.

@roman-martin roman-martin marked this pull request as ready for review January 9, 2020 13:03
@roman-martin
Copy link
Author

I added a fix to #38, maybe Adrian should have a look first

@aoeftiger
Copy link

aoeftiger commented Aug 20, 2020

The following rebase of Roman's version fixes

  • a missing element definition,
  • an appropriate test_line.py update and
  • the merge-conflicts when rebasing on the latest master branch state

https://github.com/aoeftiger/pysixtrack/tree/hotfix/ealign_non-multipole

--> if you base this PR on the above branch, Roman's commit contents are preserved and everything is good to go.

Summary:

This PR fixes a bug which occurs when trying to apply empty knl errors to non-multipole elements.
Besides this fix, the errors will be applied to the element_names corresponding element instead of the element instances directly -- this is the same behaviour as in MAD-X and avoids problems with / resolves issue #38 .

Tests run cleanly:

https://github.com/aoeftiger/pysixtrack/actions/runs/216470070

@aoeftiger
Copy link

@roman-martin has integrated my changes in his branch, should be good to go for the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants