Skip to content
24 changes: 12 additions & 12 deletions docs/source/components/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Camera Detector
| Field | Type | Title (Description) |
|-------|------|-------------|
| `detector_type` | [DetectorType](../aind_data_schema_models/devices.md#detectortype) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `data_interface` | [DataInterface](../aind_data_schema_models/devices.md#datainterface) | Data interface |
| `cooling` | [Cooling](../aind_data_schema_models/devices.md#cooling) | Cooling |
| `frame_rate` | `Optional[decimal.Decimal]` | Frame rate (Hz) (Frame rate being used) |
Expand Down Expand Up @@ -192,7 +192,7 @@ Data acquisition device containing multiple I/O channels
| Field | Type | Title (Description) |
|-------|------|-------------|
| `data_interface` | [DataInterface](../aind_data_schema_models/devices.md#datainterface) | Type of connection to PC |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `channels` | List[[DAQChannel](#daqchannel)] | DAQ channels |
| `firmware_version` | `Optional[str]` | Firmware version |
| `hardware_version` | `Optional[str]` | Hardware version |
Expand All @@ -210,7 +210,7 @@ Description of a generic detector
| Field | Type | Title (Description) |
|-------|------|-------------|
| `detector_type` | [DetectorType](../aind_data_schema_models/devices.md#detectortype) | Detector Type |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `data_interface` | [DataInterface](../aind_data_schema_models/devices.md#datainterface) | Data interface |
| `cooling` | [Cooling](../aind_data_schema_models/devices.md#cooling) | Cooling |
| `frame_rate` | `Optional[decimal.Decimal]` | Frame rate (Hz) (Frame rate being used) |
Expand Down Expand Up @@ -417,7 +417,7 @@ Filter used in a light path
| Field | Type | Title (Description) |
|-------|------|-------------|
| `filter_type` | [FilterType](../aind_data_schema_models/devices.md#filtertype) | Type of filter |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `cut_off_wavelength` | `Optional[int]` | Cut-off wavelength (nm) |
| `cut_on_wavelength` | `Optional[int]` | Cut-on wavelength (nm) |
| `center_wavelength` | `int or List[int] or NoneType` | Center wavelength (nm) (Single wavelength or list of wavelengths for MULTIBAND or MULTI_NOTCH filters) |
Expand All @@ -435,7 +435,7 @@ DAQ that uses the Harp protocol for synchronization and data transmission

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `harp_device_type` | [HarpDeviceType](../aind_data_schema_models/harp_types.md#harpdevicetype) | Type of Harp device |
| `core_version` | `Optional[str]` | Core version |
| `tag_version` | `Optional[str]` | Tag version |
Expand Down Expand Up @@ -476,7 +476,7 @@ Laser module with a specific wavelength (may be a sub-component of a larger asse

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `wavelength` | `int` | Wavelength (nm) |
| `wavelength_unit` | [SizeUnit](../aind_data_schema_models/units.md#sizeunit) | Wavelength unit |
| `coupling` | Optional[[Coupling](../aind_data_schema_models/devices.md#coupling)] | Coupling |
Expand Down Expand Up @@ -508,7 +508,7 @@ Lens

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `name` | `str` | Device name |
| `serial_number` | `Optional[str]` | Serial number |
| `model` | `Optional[str]` | Model |
Expand Down Expand Up @@ -564,7 +564,7 @@ Description of a Light Emitting Diode (LED) device

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `wavelength` | `int` | Wavelength (nm) |
| `wavelength_unit` | [SizeUnit](../aind_data_schema_models/units.md#sizeunit) | Wavelength unit |
| `bandwidth` | `Optional[int]` | Bandwidth (FWHM) |
Expand All @@ -582,7 +582,7 @@ Manipulator used on a dome module

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `name` | `str` | Device name |
| `serial_number` | `Optional[str]` | Serial number |
| `model` | `Optional[str]` | Model |
Expand Down Expand Up @@ -610,7 +610,7 @@ Description of visual display for visual stimuli

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `refresh_rate` | `int` | Refresh rate (Hz) |
| `width` | `int` | Width (pixels) |
| `height` | `int` | Height (pixels) |
Expand Down Expand Up @@ -732,7 +732,7 @@ Description of an olfactometer for odor stimuli

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `harp_device_type` | [HarpDeviceType](../aind_data_schema_models/harp_types.md#harpdevicetype) | Type of Harp device |
| `channels` | List[[OlfactometerChannel](#olfactometerchannel)] | |
| `core_version` | `Optional[str]` | Core version |
Expand Down Expand Up @@ -888,7 +888,7 @@ Description of a speaker for auditory stimuli

| Field | Type | Title (Description) |
|-------|------|-------------|
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | |
| `manufacturer` | [Organization](../aind_data_schema_models/organizations.md#organization) | Manufacturer |
| `name` | `str` | Device name |
| `serial_number` | `Optional[str]` | Serial number |
| `model` | `Optional[str]` | Model |
Expand Down
28 changes: 13 additions & 15 deletions src/aind_data_schema/components/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Detector(Device):
"""Description of a generic detector"""

detector_type: DetectorType = Field(..., title="Detector Type")
manufacturer: Organization.DETECTOR_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")
data_interface: DataInterface = Field(..., title="Data interface")
cooling: Cooling = Field(default=Cooling.NO_COOLING, title="Cooling")
frame_rate: Optional[Decimal] = Field(default=None, title="Frame rate (Hz)", description="Frame rate being used")
Expand Down Expand Up @@ -206,7 +206,7 @@ class Filter(Device):

# required fields
filter_type: FilterType = Field(..., title="Type of filter")
manufacturer: Organization.FILTER_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")

# optional fields
cut_off_wavelength: Optional[int] = Field(default=None, title="Cut-off wavelength (nm)")
Expand Down Expand Up @@ -239,8 +239,7 @@ def validate_multi_filters(self):
class Lens(Device):
"""Lens"""

# required fields
manufacturer: Organization.LENS_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")


class MotorizedStage(Device):
Expand Down Expand Up @@ -316,7 +315,7 @@ class DAQDevice(Device):

# required fields
data_interface: DataInterface = Field(..., title="Type of connection to PC")
manufacturer: Organization.DAQ_DEVICE_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")

# optional fields
channels: List[DAQChannel] = Field(default=[], title="DAQ channels")
Expand All @@ -328,7 +327,7 @@ class HarpDevice(DAQDevice):
"""DAQ that uses the Harp protocol for synchronization and data transmission"""

# required fields
manufacturer: Organization.ONE_OF = Field(default=Organization.OEPS)
manufacturer: Organization.ONE_OF = Field(default=Organization.OEPS, title="Manufacturer")
harp_device_type: HarpDeviceType.ONE_OF = Field(..., title="Type of Harp device")
core_version: Optional[str] = Field(default=None, title="Core version")
tag_version: Optional[str] = Field(default=None, title="Tag version")
Expand All @@ -351,7 +350,7 @@ class Laser(Device):
"""Laser module with a specific wavelength (may be a sub-component of a larger assembly)"""

# required fields
manufacturer: Organization.LASER_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")
wavelength: int = Field(..., title="Wavelength (nm)")
wavelength_unit: SizeUnit = Field(default=SizeUnit.NM, title="Wavelength unit")

Expand All @@ -369,7 +368,7 @@ class Laser(Device):
class LightEmittingDiode(Device):
"""Description of a Light Emitting Diode (LED) device"""

manufacturer: Organization.LED_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")
wavelength: int = Field(..., title="Wavelength (nm)")
wavelength_unit: SizeUnit = Field(default=SizeUnit.NM, title="Wavelength unit")
bandwidth: Optional[int] = Field(default=None, title="Bandwidth (FWHM)")
Expand Down Expand Up @@ -416,7 +415,7 @@ class NeuropixelsBasestation(DAQDevice):

# fixed values
data_interface: DataInterface = DataInterface.PXI
manufacturer: Organization.DAQ_DEVICE_MANUFACTURERS = Organization.IMEC
manufacturer: Organization.ONE_OF = Organization.IMEC


class OpenEphysAcquisitionBoard(DAQDevice):
Expand All @@ -427,13 +426,13 @@ class OpenEphysAcquisitionBoard(DAQDevice):

# fixed values
data_interface: Literal[DataInterface.USB] = DataInterface.USB
manufacturer: Organization.DAQ_DEVICE_MANUFACTURERS = Field(default=Organization.OEPS)
manufacturer: Organization.ONE_OF = Field(default=Organization.OEPS)


class Manipulator(Device):
"""Manipulator used on a dome module"""

manufacturer: Organization.MANIPULATOR_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")


class FiberPatchCord(Device):
Expand Down Expand Up @@ -600,7 +599,7 @@ class Arena(Device):
class Monitor(Device, DevicePosition):
"""Description of visual display for visual stimuli"""

manufacturer: Organization.MONITOR_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")
refresh_rate: int = Field(..., title="Refresh rate (Hz)", ge=60)
width: int = Field(..., title="Width (pixels)")
height: int = Field(..., title="Height (pixels)")
Expand Down Expand Up @@ -673,7 +672,7 @@ class AirPuffDevice(Device):
class Speaker(Device, DevicePosition):
"""Description of a speaker for auditory stimuli"""

manufacturer: Organization.SPEAKER_MANUFACTURERS
manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")


class OlfactometerChannelType(Enum):
Expand All @@ -695,8 +694,7 @@ class OlfactometerChannel(DataModel):
class Olfactometer(HarpDevice):
"""Description of an olfactometer for odor stimuli"""

manufacturer: Organization.DAQ_DEVICE_MANUFACTURERS = Field(default=Organization.CHAMPALIMAUD)

manufacturer: Organization.ONE_OF = Field(..., title="Manufacturer")
harp_device_type: HarpDeviceType.ONE_OF = Field(
HarpDeviceType.OLFACTOMETER, frozen=True, title="Type of Harp device"
)
Expand Down
6 changes: 3 additions & 3 deletions src/aind_data_schema/components/subjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class MouseSubject(DataModel):
breeding_info: Optional[BreedingInfo] = Field(default=None, title="Breeding Info")
wellness_reports: List[WellnessReport] = Field(default=[], title="Wellness Report")
housing: Optional[Housing] = Field(default=None, title="Housing")
source: Organization.SUBJECT_SOURCES = Field(
source: Organization.ONE_OF = Field(
...,
description="Where the subject was acquired from. If bred in-house, use Allen Institute.",
title="Source",
Expand Down Expand Up @@ -159,7 +159,7 @@ class HumanSubject(DataModel):
species: SpeciesModel = Field(default=Species.HUMAN, title="Species")
sex: Sex = Field(..., title="Sex")
year_of_birth: int = Field(..., title="Year of birth")
source: Organization.SUBJECT_SOURCES = Field(
source: Organization.ONE_OF = Field(
...,
description="Where the subject was acquired from.",
title="Source",
Expand All @@ -181,7 +181,7 @@ class NonHumanPrimateSubject(DataModel):
date_of_birth: Optional[Annotated[date_type, TimeValidation.BEFORE]] = Field(default=None, title="Date of birth")
year_of_birth: int = Field(..., title="Year of birth")
mating_status: MatingStatus = Field(..., title="Mating status")
source: Organization.SUBJECT_SOURCES = Field(
source: Organization.ONE_OF = Field(
...,
description="Where the subject was acquired from.",
title="Source",
Expand Down
2 changes: 1 addition & 1 deletion src/aind_data_schema/components/surgery_procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class HeadframeMaterial(str, Enum):
class CatheterImplant(DataModel):
"""Description of a catheter implant procedure"""

where_performed: Organization.CATHETER_IMPLANT_INSTITUTIONS = Field(..., title="Where performed")
where_performed: Organization.ONE_OF = Field(..., title="Where performed")
implanted_device: Catheter = Field(
...,
title="Implanted device",
Expand Down
4 changes: 2 additions & 2 deletions src/aind_data_schema/core/data_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class Funding(DataModel):
"""Description of funding sources"""

funder: Organization.FUNDERS = Field(..., title="Funder")
funder: Organization.ONE_OF = Field(..., title="Funder")
grant_number: Optional[str] = Field(default=None, title="Grant number")
fundee: Optional[List[Person]] = Field(
default=None, title="Fundee", description="Person(s) funded by this mechanism"
Expand Down Expand Up @@ -65,7 +65,7 @@ class DataDescription(DataCoreModel):
title="Data asset name",
validate_default=True,
)
institution: Organization.RESEARCH_INSTITUTIONS = Field(
institution: Organization.ONE_OF = Field(
...,
description="An established society, corporation, foundation or other organization that collected this data",
title="Institution",
Expand Down
Loading