From 79001879d7e4eae3a722c7601ce9ecf6bda2654e Mon Sep 17 00:00:00 2001 From: Dan Birman Date: Wed, 15 Jan 2025 19:12:25 -0800 Subject: [PATCH] feat: add LightAssembly class --- src/aind_data_schema/components/devices.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/aind_data_schema/components/devices.py b/src/aind_data_schema/components/devices.py index af739013..2cb2cba7 100644 --- a/src/aind_data_schema/components/devices.py +++ b/src/aind_data_schema/components/devices.py @@ -560,6 +560,17 @@ class Lamp(Device): temperature_unit: Optional[TemperatureUnit] = Field(default=None, title="Temperature unit") +class LightAssembly(DataModel): + """Named assembly of a light source and lens""" + + device_type: Literal["Light assembly"] = "Light assembly" + + # required fields + name: str = Field(..., title="Light assembly name") + light: Annotated[Union[Laser, LightEmittingDiode, Lamp], Field(discriminator="device_type")] + lens: Lens = Field(..., title="Lens") + + class ProbePort(DataModel): """Port for a probe connection"""