diff --git a/openwfs/algorithms/dual_reference.py b/openwfs/algorithms/dual_reference.py index 03bda5b..b81f828 100644 --- a/openwfs/algorithms/dual_reference.py +++ b/openwfs/algorithms/dual_reference.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import Optional, Union import numpy as np from numpy import ndarray as nd @@ -38,7 +38,7 @@ def __init__( feedback: Detector, slm: PhaseSLM, phase_patterns: Optional[tuple[nd, nd]], - amplitude: Optional[tuple[nd, nd] | str], + amplitude: Optional[Union[tuple[nd, nd], str]], group_mask: nd, phase_steps: int = 4, iterations: int = 2, diff --git a/openwfs/plot_utilities.py b/openwfs/plot_utilities.py index 7391aa9..33a76bf 100644 --- a/openwfs/plot_utilities.py +++ b/openwfs/plot_utilities.py @@ -1,4 +1,4 @@ -from typing import Tuple +from typing import Tuple, Union import numpy as np from numpy import ndarray as nd @@ -56,7 +56,7 @@ def scale_prefix(value: u.Quantity) -> u.Quantity: return value -def slope_step(a: nd, width: nd | float) -> nd: +def slope_step(a: nd, width: Union[nd, float]) -> nd: """ A sloped step function from 0 to 1.