xsuite / xcoll

Xsuite collimation package
Apache License 2.0
3 stars 15 forks source link

Pencil is slow: speed up #63

Open freddieknets opened 9 months ago

freddieknets commented 9 months ago

This is due to the implementation in xpart: one twiss and two times build_particles. Can this be sped up?

freddieknets commented 9 months ago

Currently, generate_pencil_on_collimator calls two twiss and five build_particles in total (two jaws)...

freddieknets commented 9 months ago

We could generate the pencil analytically, as we know the equations of the inner and outer ellipses, given the twiss parameters