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. floor_log2  (  x  )[source]

The integer part of the logarithm to the base 2, $\lfloor\log_2|x|\rfloor$. Zeros are mapped to 0.

Parameters:
xarray_like

Scalar values.

Returns:
nndarray

The closest integer values below the logarithm to the base 2 of the absolute value of x.