bmad-sim / AtomicAndPhysicalConstants.jl

Julia package for handling particle identification in simulations.
MIT License
0 stars 1 forks source link

Expand Particle() function to take first arg string encoded with mass and charge. #26

Closed DavidSagan closed 3 months ago

DavidSagan commented 4 months ago

That is Particle("#3He+") and Particle("C+3") are handled along with the present syntax. This is useful since the user can then specify a particle using just a single string. Essentially, the Particle function can look for characters "#", "+", or "-" and split the string as appropriate.

rot4te commented 3 months ago

Done, used Regex to provide this functionality