qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. v_e  (  e ,  m ,  v0=0 ,  relativistic=True  )[source]

The velocity

$$ v = \begin{cases}c\sqrt{1 - \left[\gamma(v_0) + \frac{E}{mc^2}\right]^{-2}}, & \text{relativistic}\\ \sqrt{v_0^2 + \frac{2E}{m}}, & \text{classical}\end{cases}. $$
Parameters:
earray_like

The energy $E$ added to the kinetic energy of a body with velocity v0 (eV).

marray_like

The mass $m$ of the body (u).

v0array_like

The initial velocity $v_0$ of the body (m/s).

relativisticbool

The calculation is performed either relativistically (True) or classically (False). The default is True.

Returns:
vndarray

The velocity $v$ of a body with mass m and velocity v0 after the addition of the energy e (m/s).