Skip to content

Commit d17b928

Browse files
authored
Merge pull request #544 from AllenNeuralDynamics/feat-344-slap
Feat 344 slap
2 parents 9967a02 + a46dc1c commit d17b928

15 files changed

+129
-27
lines changed

examples/aibs_smartspim_instrument.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/imaging/instrument.py",
3-
"schema_version": "0.9.1",
3+
"schema_version": "0.9.2",
44
"instrument_id": "SmartSPIM2-2",
55
"modification_date": "2023-10-04",
66
"instrument_type": "SmartSPIM",
@@ -49,7 +49,8 @@
4949
"notes": "Thorlabs TL4X-SAP with LifeCanvas dipping cap and correction optics.",
5050
"numerical_aperture": 0.2,
5151
"magnification": 3.6,
52-
"immersion": "multi"
52+
"immersion": "multi",
53+
"objective_type": null
5354
}
5455
],
5556
"detectors": [

examples/aind_smartspim_instrument.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/imaging/instrument.py",
3-
"schema_version": "0.9.1",
3+
"schema_version": "0.9.2",
44
"instrument_id": "SmartSPIM1-3",
55
"modification_date": "2023-10-04",
66
"instrument_type": "SmartSPIM",
@@ -52,7 +52,8 @@
5252
"notes": "",
5353
"numerical_aperture": 0.1,
5454
"magnification": 1.6,
55-
"immersion": "multi"
55+
"immersion": "multi",
56+
"objective_type": null
5657
},
5758
{
5859
"device_type": "Objective",
@@ -71,7 +72,8 @@
7172
"notes": "Thorlabs TL4X-SAP with LifeCanvas dipping cap and correction optics",
7273
"numerical_aperture": 0.2,
7374
"magnification": 3.6,
74-
"immersion": "multi"
75+
"immersion": "multi",
76+
"objective_type": null
7577
},
7678
{
7779
"device_type": "Objective",
@@ -90,7 +92,8 @@
9092
"notes": "",
9193
"numerical_aperture": 0.8,
9294
"magnification": 16.0,
93-
"immersion": "water"
95+
"immersion": "water",
96+
"objective_type": null
9497
},
9598
{
9699
"device_type": "Objective",
@@ -109,7 +112,8 @@
109112
"notes": "",
110113
"numerical_aperture": 1.1,
111114
"magnification": 25.0,
112-
"immersion": "water"
115+
"immersion": "water",
116+
"objective_type": null
113117
}
114118
],
115119
"detectors": [

examples/bergamo_ophys_session.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/session.py",
3-
"schema_version": "0.0.2",
3+
"schema_version": "0.0.3",
44
"experimenter_full_name": [
55
"John Doe"
66
],
@@ -11,7 +11,7 @@
1111
"rig_id": "ophys_rig",
1212
"calibrations": null,
1313
"maintenance": null,
14-
"subject_id": 652567,
14+
"subject_id": "652567",
1515
"animal_weight_prior": null,
1616
"animal_weight_post": null,
1717
"weight_unit": "gram",
@@ -75,6 +75,7 @@
7575
"coupled_fov_index": null
7676
}
7777
],
78+
"slap_fovs": null,
7879
"stack_parameters": null,
7980
"stimulus_device_names": null,
8081
"notes": null

examples/ephys_rig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/rig.py",
3-
"schema_version": "0.1.2",
3+
"schema_version": "0.1.3",
44
"rig_id": "323_EPHYS1",
55
"modification_date": "2023-10-03",
66
"modalities": [
@@ -475,6 +475,9 @@
475475
"objectives": null,
476476
"filters": null,
477477
"lenses": null,
478+
"digital_micromirror_devices": null,
479+
"polygonal_scanners": null,
480+
"pockels_cells": null,
478481
"additional_devices": null,
479482
"calibrations": [
480483
{

examples/ephys_session.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/session.py",
3-
"schema_version": "0.0.2",
3+
"schema_version": "0.0.3",
44
"experimenter_full_name": [
55
"Jane Doe"
66
],
@@ -11,7 +11,7 @@
1111
"rig_id": "323_EPHYS1",
1212
"calibrations": null,
1313
"maintenance": null,
14-
"subject_id": 100001,
14+
"subject_id": "100001",
1515
"animal_weight_prior": 21.2,
1616
"animal_weight_post": 21.3,
1717
"weight_unit": "gram",
@@ -91,6 +91,7 @@
9191
"detectors": null,
9292
"fiber_photometry_assemblies": null,
9393
"ophys_fovs": null,
94+
"slap_fovs": null,
9495
"stack_parameters": null,
9596
"stimulus_device_names": null,
9697
"notes": null

examples/exaspim_instrument.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/imaging/instrument.py",
3-
"schema_version": "0.9.1",
3+
"schema_version": "0.9.2",
44
"instrument_id": "exaSPIM1-1",
55
"modification_date": "2023-10-04",
66
"instrument_type": "exaSPIM",
@@ -49,7 +49,8 @@
4949
"notes": "manufacturer collaboration between Schneider-Kreuznach and Vieworks",
5050
"numerical_aperture": 0.305,
5151
"magnification": 5,
52-
"immersion": "air"
52+
"immersion": "air",
53+
"objective_type": null
5354
}
5455
],
5556
"detectors": [

examples/fip_ophys_rig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/rig.py",
3-
"schema_version": "0.1.2",
3+
"schema_version": "0.1.3",
44
"rig_id": "428_FIP1_2",
55
"modification_date": "2023-10-03",
66
"modalities": [
@@ -358,7 +358,8 @@
358358
"notes": null,
359359
"numerical_aperture": 0.45,
360360
"magnification": 10,
361-
"immersion": "air"
361+
"immersion": "air",
362+
"objective_type": null
362363
}
363364
],
364365
"filters": [
@@ -637,6 +638,9 @@
637638
"max_aperture": null
638639
}
639640
],
641+
"digital_micromirror_devices": null,
642+
"polygonal_scanners": null,
643+
"pockels_cells": null,
640644
"additional_devices": null,
641645
"calibrations": [
642646
{

examples/ophys_session.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/session.py",
3-
"schema_version": "0.0.2",
3+
"schema_version": "0.0.3",
44
"experimenter_full_name": [
55
"John Doe"
66
],
@@ -11,7 +11,7 @@
1111
"rig_id": "ophys_rig",
1212
"calibrations": null,
1313
"maintenance": null,
14-
"subject_id": 652567,
14+
"subject_id": "652567",
1515
"animal_weight_prior": null,
1616
"animal_weight_post": null,
1717
"weight_unit": "gram",
@@ -70,6 +70,7 @@
7070
}
7171
],
7272
"ophys_fovs": null,
73+
"slap_fovs": null,
7374
"stack_parameters": null,
7475
"stimulus_device_names": null,
7576
"notes": "Internal trigger. GRAB-DA2m shows signal. Unclear about GRAB-rAC"

src/aind_data_schema/device.py

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from aind_data_schema.coordinates import RelativePosition
1313
from aind_data_schema.manufacturers import Manufacturer
1414
from aind_data_schema.procedures import Reagent
15-
from aind_data_schema.utils.units import FrequencyUnit, PowerUnit, SizeUnit, TemperatureUnit
15+
from aind_data_schema.utils.units import FrequencyUnit, PowerUnit, SizeUnit, SpeedUnit, TemperatureUnit, UnitlessUnit
1616

1717

1818
class DeviceDriver(Enum):
@@ -245,13 +245,21 @@ class Immersion(Enum):
245245
OTHER = "other"
246246

247247

248+
class ObjectiveType(Enum):
249+
"""Objective type for Slap2"""
250+
251+
REMOTE = "Remote"
252+
PRIMARY = "Primary"
253+
254+
248255
class Objective(Device):
249256
"""Description of an objective device"""
250257

251258
device_type: Literal["Objective"] = Field("Objective", const=True, readOnly=True)
252259
numerical_aperture: Decimal = Field(..., title="Numerical aperture (in air)")
253260
magnification: Decimal = Field(..., title="Magnification")
254261
immersion: Immersion = Field(..., title="Immersion")
262+
objective_type: Optional[ObjectiveType] = Field(None, title="Objective type")
255263

256264

257265
class CameraTarget(Enum):
@@ -560,6 +568,45 @@ class Patch(Device):
560568
photobleaching_date: Optional[date] = Field(None, title="Photobleaching date")
561569

562570

571+
class DigitalMicromirrorDevice(Device):
572+
"""Description of a Digital Micromirror Device (DMD)"""
573+
574+
device_type: Literal["Digital Micromirror Device"] = Field("Digital Micromirror Device", const=True, readOnly=True)
575+
max_dmd_patterns: int = Field(..., title="Max DMD patterns")
576+
double_bounce_design: bool = Field(..., title="Double bounce design")
577+
invert_pixel_values: bool = Field(..., title="Invert pixel values")
578+
motion_padding_x: int = Field(..., title="Motion padding X (pixels)")
579+
motion_padding_y: int = Field(..., title="Motion padding Y (pixels)")
580+
padding_unit: SizeUnit = Field(SizeUnit.PX, title="Padding unit")
581+
pixel_size: Decimal = Field(..., title="DMD Pixel size")
582+
pixel_size_unit: SizeUnit = Field(SizeUnit.UM, title="Pixel size unit")
583+
start_phase: Decimal = Field(..., title="DMD Start phase (fraction of cycle)")
584+
dmd_flip: bool = Field(..., title="DMD Flip")
585+
dmd_curtain: List[Decimal] = Field(..., title="DMD Curtain")
586+
dmd_curtain_unit: SizeUnit = Field(SizeUnit.PX, title="dmd_curtain_unit")
587+
line_shear: List[int] = Field(..., title="Line shear (pixels)")
588+
line_shear_units: SizeUnit = Field(SizeUnit.PX, title="Line shear units")
589+
590+
591+
class PolygonalScanner(Device):
592+
"""Description of a Polygonal scanner"""
593+
594+
device_type: Literal["Polygonal Scanner"] = Field("Polygonal Scanner", const=True, readOnly=True)
595+
speed: int = Field(..., title="Speed (rpm)")
596+
speed_unit: SpeedUnit = Field(SpeedUnit.RPM, title="Speed unit")
597+
number_faces: int = Field(..., title="Number of faces")
598+
599+
600+
class PockelsCell(Device):
601+
"""Description of a Pockels Cell"""
602+
603+
device_type: Literal["Pockels Cell"] = Field("Pockels Cell", const=True, readOnly=True)
604+
polygonal_scanner: str = Field(..., title="Polygonal scanner", description="Must match name of Polygonal scanner")
605+
on_time: Decimal = Field(..., title="On time (fraction of cycle)")
606+
off_time: Decimal = Field(..., title="Off time (fraction of cycle)")
607+
time_setting_unit: UnitlessUnit = Field(UnitlessUnit.FC, title="time setting unit")
608+
609+
563610
class MousePlatform(Device):
564611
"""Description of a mouse platform"""
565612

src/aind_data_schema/imaging/instrument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class OpticalTable(Device):
107107
class Instrument(AindCoreModel):
108108
"""Description of an instrument, which is a collection of devices"""
109109

110-
schema_version: str = Field("0.9.1", description="schema version", title="Version", const=True)
110+
schema_version: str = Field("0.9.2", description="schema version", title="Version", const=True)
111111
instrument_id: Optional[str] = Field(
112112
None,
113113
description="Unique identifier for this instrument. Naming convention: <room>-<apparatus>-<version>",

0 commit comments

Comments
 (0)