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

Need more distribution options for bunch generation #145

Open cr-xu opened 2 months ago

cr-xu commented 2 months ago

Currently Cheetah only supports generation of Gaussian bunches.

More distributions should be supported, especially allowing to specify different distributions in transversal and longitudinal plane.

For example

This is also requested by @RemiLehe

jp-ga commented 2 months ago

Take a look at https://github.com/ColwynGulliford/distgen We should implement distgen wrappers in Cheetah at some point

cr-xu commented 2 months ago

Take a look at https://github.com/ColwynGulliford/distgen We should implement distgen wrappers in Cheetah at some point

That looks really nice. So in general we should also implement an converter to import from GPT / OpenPMD beam types.

jank324 commented 2 months ago

Something else to keep in mind is that generators implemented directly in Cheetah are also differentiable ... in case someone needs that as a feature.

jp-ga commented 2 months ago

OpenPMD already has the functionality to read and write Astra format: https://github.com/ChristopherMayes/openPMD-beamphysics/blob/master/docs/examples/write_examples.ipynb

jp-ga commented 2 months ago

Something else to keep in mind is that generators implemented directly in Cheetah are also differentiable ... in case someone needs that as a feature.

That's a good point.

jank324 commented 2 months ago

There is a dedicated issue for adding distgen to Cheetah now: #149