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
27 stars 12 forks source link

Add charge in the Beam classes #86

Closed cr-xu closed 9 months ago

cr-xu commented 9 months ago

The charge is tracked through the elements along with the beam. For now, the only element that affects the beam charge is the Aperture which removes the particle charges with large position offsets.

jank324 commented 9 months ago

I would propose giving a better name to q_array ... something more like particle_charges.

Also, can you add the feature to the changelog?

Otherwise, this looks good to me.

jank324 commented 9 months ago

Another thing that I'm just realising: Are the new charge properties properly tracked through all the elements?