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. p_e  (  e ,  m ,  p0=0 ,  relativistic=True  )[source]

The momentum

$$ p = \begin{cases}\frac{1}{c}\sqrt{E^2 + (p_0 c)^2 + 2E\sqrt{(p_0 c)^2 + (mc^2)^2}}, & \text{relativistic}\\ \sqrt{p_0^2 + 2mE}, & \text{classical}\end{cases}. $$
Parameters:
earray_like

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

marray_like

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

p0array_like

The initial momentum $p_0$ of the body (u m/s).

relativisticbool

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

Returns:
pndarray

The momentum $p$ of a body with mass m and starting momentum p0 after the addition of the energy e (u m/s).