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

The relativistic Lorentz-boosted 4-vector

$$ x^{\prime\mu} = \Lambda^\mu_{\ \nu}(\vec{v})x^\nu, $$

with the Lorentz-boost matrix $\Lambda^\mu_{\ \nu}$.

Parameters:
xarray_like

The 4-vector $x^\mu$ in the stationary rest frame (arb. units). Must have size 4 in the specified axis.

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:
x_boostedndarray

The 4-vector $x^{\prime\mu}$ in the coordinate system moving with velocity v relative to the current rest frame (unit of x).

Raises:
ValueError

x and v must have 4 and 3 components along the specified axis, respectively. The shapes of x and v must be compatible.