Created
February 12, 2025 18:27
-
-
Save charlesbmi/561f59a2f5cb06b896238653c346fe50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Annotated, Union | |
import numpy as np | |
from pydantic import ( | |
AfterValidator, | |
BaseModel, | |
) | |
FloatInfAsNone = Annotated[ | |
Union[float, None], AfterValidator(lambda x: None if x == np.inf else x) | |
] | |
class TransmitSteeringList(BaseModel): | |
"""Transmit angle and focus parameters.""" | |
tx_az_angle_deg: list[float] | |
tx_el_angle_deg: list[float] | |
tx_az_focus: list[FloatInfAsNone] | |
tx_el_focus: list[FloatInfAsNone] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment