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 `dtype` passing to Bmad `Segment` import #206

Closed jank324 closed 4 days ago

jank324 commented 5 days ago

Description

Let's users pass the dtype when creating a Segment from a Bmad lattice.

Also fixes a bug where passing dtype to ParameterBeam.from_twiss had no effect.

Motivation and Context

Solves #204. Related to #195 and #196.

Types of changes

Checklist

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

jank324 commented 4 days ago

@cr-xu it's definitely done now, I won't convert it back to a draft again. 😄