Is your feature request related to a problem? Please describe.
In all the cases I have encountered, Calibration is always tied to a specific device. Indeed, the current spec makes this clear in the Calibration class by adding a device_name REQUIRED property to keep track of this association
|
class Calibration(AindModel): |
|
"""Generic calibration class""" |
|
|
|
calibration_date: datetime = Field(..., title="Date and time of calibration") |
|
device_name: str = Field(..., title="Device name", description="Must match a device name in rig/instrument") |
|
description: str = Field(..., title="Description", description="Brief description of what is being calibrated") |
|
input: AindGenericType = Field(AindGeneric(), description="Calibration input", title="inputs") |
|
output: AindGenericType = Field(AindGeneric(), description="Calibration output", title="outputs") |
|
notes: Optional[str] = Field(None, title="Notes") |
Describe the solution you'd like
Make calibration a nested field inside Device with the Optional[Calibration] typing. For hardware installation and experiment specification this would be a huge help and it would allow users to not have to grab cross-referenced data across different class (well actually across schemas, since Calibration is currently also stored in Session (?))
Describe alternatives you've considered
N/A
Is your feature request related to a problem? Please describe.
In all the cases I have encountered,
Calibrationis always tied to a specific device. Indeed, the current spec makes this clear in theCalibrationclass by adding adevice_nameREQUIRED property to keep track of this associationaind-data-schema/src/aind_data_schema/models/devices.py
Lines 270 to 278 in 0328cbe
Describe the solution you'd like
Make calibration a nested field inside
Devicewith theOptional[Calibration]typing. For hardware installation and experiment specification this would be a huge help and it would allow users to not have to grab cross-referenced data across different class (well actually across schemas, since Calibration is currently also stored in Session (?))Describe alternatives you've considered
N/A