Implementation of a new class Corrector.
To build the Corrector class I took the old HorizontalCorrector class and added an extra entry in the transfer matrix to include yp (vertical angle). Corrector has the horizontal_angle and vertical_angle properties.
xp is in position (1,6) of tm
yp is in position (3,6) of tm
I then derived HorizontalCorrector and VerticalCorrector from the Corrector class.
I originally removed either vertical_angle or horizontal_angle as property and kept the other, but this was a breaking change.
Now angle can be used for HorizontalCorrector and VerticalCorrector, but creates additional problems (see tests)
What solution is best?
Motivation and Context
The motivation is because I need it to continue with the MAD-X converter, using the AWAKE lattice which contains combined correctors. Probably also useful to other people in the future.
[x] I have raised an issue to propose this change (required for new features and bug fixes)
Closes issue #203
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] 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
[x] I have updated the changelog accordingly (required).
[x] My change requires a change to the documentation.
[x] I have updated the tests accordingly (required for a bug fix or a new feature).
[x] I have updated the documentation accordingly.
[x] I have reformatted the code and checked that formatting passes (required).
[x] I have have fixed all issues found by flake8 (required).
[x] 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).
[x] I have checked that the documentation builds (required).
Note: We are using a maximum length of 88 characters per line
Description
Implementation of a new class
Corrector
. To build theCorrector
class I took the oldHorizontalCorrector
class and added an extra entry in the transfer matrix to includeyp
(vertical angle).Corrector
has thehorizontal_angle
andvertical_angle
properties.xp
is in position (1,6) of tmyp
is in position (3,6) of tmI then derived
HorizontalCorrector
andVerticalCorrector
from theCorrector
class.vertical_angle
orhorizontal_angle
as property and kept the other, but this was a breaking change.angle
can be used forHorizontalCorrector
andVerticalCorrector
, but creates additional problems (see tests)What solution is best?
Motivation and Context
The motivation is because I need it to continue with the MAD-X converter, using the AWAKE lattice which contains combined correctors. Probably also useful to other people in the future.
Types of changes
Checklist
flake8
(required).pytest
tests pass (required).pytest
on a machine with a CUDA GPU and made sure all tests pass (required).Note: We are using a maximum length of 88 characters per line