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. gamma_3d  (  v ,  axis=-1  )[source]

The time-dilation/Lorentz factor

$$ \gamma = \frac{1}{\sqrt{1 - (\vec{v}/ c)^2}}, $$

with the vacuum speed of light $c$ and the velocity vector $\vec{v}$.

Parameters:
varray_like

The velocity 3-vector $\vec{v}$. Must have size 3 in the specified axis (m/s).

axisint

The axis along which the vector components are aligned.

Returns:
gammandarray

The time-dilation/Lorentz factor $\gamma$ corresponding to the velocity vector v.

Raises:
ValueError

v must have 3 components along the specified axis.