slmsuite.holography.toolbox.convert_radius#
- convert_radius(radius, from_units='norm', to_units='norm', hardware=None, shape=None)[source]#
Helper function for scalar unit conversions. Uses
convert_vector()to deduce the (average, in the case of an anisotropic transformation) scalar radius when going between sets of units.Tip
In the future, we might create a similar function to handle anisotropic conversions better by converting a 2x2 matrix representing a sheared parallelogram.
- Parameters:
radius (float) – The scalar radius to convert.
from_units (str) – Passed to
convert_vector().to_units (str) – Passed to
convert_vector().hardware (
SLMORCameraSLMOR None) – Passed toconvert_vector().shape ((int, int) OR None) – Passed to
convert_vector().
- Returns:
radius – New scalar radius.
- Return type:
float