Skip to content

Commit

Permalink
Merge pull request #1240 from AllenNeuralDynamics/1139-20-edge-case-w…
Browse files Browse the repository at this point in the history
…ith-light-and-lenses-attached-together

feat: add LightAssembly class
  • Loading branch information
saskiad authored Jan 24, 2025
2 parents 1850ca6 + acd04de commit c23e66e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/aind_data_schema/components/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,20 @@ 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")

# optional fields
filter: Optional[Filter] = Field(default=None, title="Filter")


class ProbePort(DataModel):
"""Port for a probe connection"""

Expand Down

0 comments on commit c23e66e

Please sign in to comment.