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

Establish testing testless pytest #35

Closed FelixTheilen closed 1 year ago

FelixTheilen commented 1 year ago

This pull request is adressing issue https://github.com/desy-ml/cheetah/issues/7. This file is implementing the calculations done in the testless.ipynb file using pytest. This makes it a lot easier to run the test, as no manual comparison of the results is needed.

The following abilities are tested: -mu of a ParameterBeam -mean of a ParticleBeam -cov of a ParameterBeam -cov of a ParticleBeam -use of a segment on a beam -use of a HorizontalCorrector