bmad-sim / AtomicAndPhysicalConstants.jl

Julia package for handling particle identification in simulations.
https://bmad-sim.github.io/AtomicAndPhysicalConstants.jl/dev
MIT License
0 stars 0 forks source link

Misspelled atom species string not caught #56

Open DavidSagan opened 1 month ago

DavidSagan commented 1 month ago

Example:

julia> Species("#x#3He")
Species("He", 0, 2.8104355262211704e9, 9.87317935205805e-16, 0.0, 3)
DavidSagan commented 1 month ago

Also not caught:

julia> Species("electron", 2)
Species("electron", -1, 510998.95069, 3.2910597840193497e-16, -9.2847646917e-24, 0)

There should be regression tests for this.

rot4te commented 1 month ago

Fixed in the constructor; I'll work on building tests soon, but there will be a learning curve and I can't foresee how to exhaustively get everything without a big slowdown.