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. doppler_3d  (  k ,  v ,  return_frame='atom' ,  axis=-1  )[source]

The 3D Doppler shift of the wave vector $\vec{k}$

$$ k^{\prime\mu} = \Lambda^\mu_{\ \nu}(\pm\vec{v})k^\nu,\quad k^\mu = (|\vec{k}|, \vec{k}), $$

with the Lorentz-boost matrix $\Lambda^\mu_{\ \nu}$, see boost. The upper (lower) sign applies to return_frame == "atom" ("lab").

Parameters:
karray_like

The wave vector $\vec{k}$ of light. Must have size 3 in the specified axis (arb. units).

varray_like

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

return_framestr

The coordinate system in which the frequency is returned. Can be either "atom" or "lab".

axisint

The axis along which the vector components are aligned.

Returns:
k_boostedndarray

The Doppler-shifted wave vector $\vec{k}^{\prime}$ in either the rest frame of the atom or the laboratory frame (unit of k).

Raises:
ValueError

return_frame must be either "atom" or "lab". k and v must have 3 components along the specified axis and compatible shapes.