Source code for lightonopu.types

"""Module containing enums used with opu.OPU class"""

from enum import Enum
from typing import List, Tuple, Union
import numpy as np


[docs]class CamRoiStrategy(Enum): """Strategy used for computing the camera ROI""" mid_width = 1 """Area in the middle & max_width, to have max speed (Zeus, Vulcain)""" mid_square = 2 """Area in the middle & square (Saturn)"""
[docs]class DmdRoiStrategy (Enum): """Strategy used for computing the DMD ROI""" full = 1 """Use macro-pixels to fill the whole dmd display""" small = 2 """Center the features on the dmd, with one element on each pixel""" auto = 3 """Try to find the most appropriate between these two modes"""
[docs]class FeaturesFormat (Enum): """Strategy used for the formatting of data on the DMD""" lined = 1 """Features are positioned in line""" macro_pixels = 2 """Features are zoomed into pixels""" auto = 3 """Automatic choice `lined` if features are 1d, `2d_macro_pixels` if 2d """ none = 4 """No formatting input is displayed as-is, but it must match the same number of elements of the DMD"""
IntList = Union[List[int], np.ndarray] Roi = Tuple[IntList, IntList]