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
28 stars 13 forks source link

Improved documentation #29

Closed FelixTheilen closed 1 year ago

FelixTheilen commented 1 year ago

This pull request is going to specifically adress issue #2 . -The pull request introduces a new comment on the 'init' function. This will help finding the definitions for the parameters. -Also a new comment on the 'transfer_map' function has been added, explaining the general purpose as well as the state vector and parameters, returns and raises. -The parameter 'energy' has been removed from various classes. The parameter 'energy' is passed on through the beam passed to the segment. It is therefore not changeable by the user, when trying to control the beam, e.g. you can't call the function HorizontalCorrector and pass a parameter energy to this function. This parameter is defined, when the beam is fed in the Segment. -'repr' has now a short comment describing the use of this function. -Spelling mistakes have been corrected in accelerator.py and particles.py.

Unfortunately something brake down with the previous "Improved Documentation" pull request. This one should work now.

FelixTheilen commented 1 year ago

Comments on "magic" methods have been removed. Comments for the functions 'call and 'transfer_map' have been updated.