Creating a beam with setparticles command and the builtin gpt me constant fails during conversion to ParticleGroup. The gpt builtin me and mp constants (9.10953e-31 and 1.67265e-27) differ from scipy's physical constants (9.1093837015e-31 and 1.67262192369e-27) by a relative error of 1.6e-5. The relative error in the qe constant is about 0.8e-5.
This can be fixed by increasing the relative tolerance in np.isclose calls to 1e-4. (The default rtol is 1e-5.)
Creating a beam with setparticles command and the builtin gpt
me
constant fails during conversion to ParticleGroup. The gpt builtinme
andmp
constants (9.10953e-31 and 1.67265e-27) differ from scipy's physical constants (9.1093837015e-31 and 1.67262192369e-27) by a relative error of 1.6e-5. The relative error in theqe
constant is about 0.8e-5.This can be fixed by increasing the relative tolerance in
np.isclose
calls to 1e-4. (The default rtol is 1e-5.)Minimal demonstration attached.
lume_gpt_particle_ident_test.zip