desy-ml / cheetah

Fast and differentiable particle accelerator optics simulation for reinforcement learning and optimisation applications.
https://cheetah-accelerator.readthedocs.io
GNU General Public License v3.0
25 stars 12 forks source link

Add a new combined `Corrector` element #207

Open ansantam opened 4 days ago

ansantam commented 4 days ago

Description

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.

I then derived HorizontalCorrector and VerticalCorrector from the Corrector class.

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

Note: We are using a maximum length of 88 characters per line