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. rotation_to_vector  (  x ,  y  )[source]

The rotation which rotates the direction of the vector x onto that of the vector y.

Parameters:
xscalar_nd

The first vector.

yscalar_nd

The second vector.

Returns:
rotationRotation

A Rotation which rotates the first vector onto the second.

Raises:
ValueError

If x or y is not a 3d-vector.