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

The orthonormal system $(\hat{e}_r, \hat{e}_\theta, \hat{e}_\phi)$, see e_r, with $\hat{e}_r$ pointing in the direction of r.

Parameters:
rarray_like

The first vector of the orthonormal system. Does not have to be normalized.

axisint

The axis along which the vector components are aligned.

Returns:
(e_r, e_theta, e_phi)tuple[ndarray, ndarray, ndarray]

The three orthonormal vectors.

Raises:
ValueError

If r does not have 3 components along the specified axis.