aind-data-schema-models 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aind_data_schema_models/__init__.py +3 -0
- aind_data_schema_models/harp_types.py +150 -0
- aind_data_schema_models/modalities.py +144 -0
- aind_data_schema_models/organizations.py +894 -0
- aind_data_schema_models/pid_names.py +24 -0
- aind_data_schema_models/platforms.py +150 -0
- aind_data_schema_models/process_names.py +45 -0
- aind_data_schema_models/registry.py +68 -0
- aind_data_schema_models/species.py +77 -0
- aind_data_schema_models/units.py +129 -0
- aind_data_schema_models-0.1.0.dist-info/LICENSE +21 -0
- aind_data_schema_models-0.1.0.dist-info/METADATA +117 -0
- aind_data_schema_models-0.1.0.dist-info/RECORD +15 -0
- aind_data_schema_models-0.1.0.dist-info/WHEEL +5 -0
- aind_data_schema_models-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"""Module for Harp Device Types"""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, Union
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
6
|
+
from typing_extensions import Annotated
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class _HarpDeviceType(BaseModel):
|
|
10
|
+
"""Base model config"""
|
|
11
|
+
|
|
12
|
+
model_config = ConfigDict(frozen=True)
|
|
13
|
+
name: str
|
|
14
|
+
whoami: int
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Behavior(_HarpDeviceType):
|
|
18
|
+
"""Behavior"""
|
|
19
|
+
|
|
20
|
+
name: Literal["Behavior"] = "Behavior"
|
|
21
|
+
whoami: Literal[1216] = 1216
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CameraController(_HarpDeviceType):
|
|
25
|
+
"""Camera Controller"""
|
|
26
|
+
|
|
27
|
+
name: Literal["Camera Controller"] = "Camera Controller"
|
|
28
|
+
whoami: Literal[1168] = 1168
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ClockSynchronizer(_HarpDeviceType):
|
|
32
|
+
"""Clock Synchronizer"""
|
|
33
|
+
|
|
34
|
+
name: Literal["Clock Synchronizer"] = "Clock Synchronizer"
|
|
35
|
+
whoami: Literal[1152] = 1152
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class GenericHarpDevice(_HarpDeviceType):
|
|
39
|
+
"""Generic Harp Device"""
|
|
40
|
+
|
|
41
|
+
name: Literal["Generic Harp Device"] = "Generic Harp Device"
|
|
42
|
+
whoami: int = Field(default=0, ge=0, le=9999, title="WhoAmI")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class InputExpander(_HarpDeviceType):
|
|
46
|
+
"""Input Expander"""
|
|
47
|
+
|
|
48
|
+
name: Literal["Input Expander"] = "Input Expander"
|
|
49
|
+
whoami: Literal[1106] = 1106
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class LoadCells(_HarpDeviceType):
|
|
53
|
+
"""Load Cells"""
|
|
54
|
+
|
|
55
|
+
name: Literal["Load Cells"] = "Load Cells"
|
|
56
|
+
whoami: Literal[1232] = 1232
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class Olfactometer(_HarpDeviceType):
|
|
60
|
+
"""Olfactometer"""
|
|
61
|
+
|
|
62
|
+
name: Literal["Olfactometer"] = "Olfactometer"
|
|
63
|
+
whoami: Literal[1140] = 1140
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class SoundCard(_HarpDeviceType):
|
|
67
|
+
"""Sound Card"""
|
|
68
|
+
|
|
69
|
+
name: Literal["Sound Card"] = "Sound Card"
|
|
70
|
+
whoami: Literal[1280] = 1280
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class Synchronizer(_HarpDeviceType):
|
|
74
|
+
"""Synchronizer"""
|
|
75
|
+
|
|
76
|
+
name: Literal["Synchronizer"] = "Synchronizer"
|
|
77
|
+
whoami: Literal[1104] = 1104
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class TimestampGeneratorGen1(_HarpDeviceType):
|
|
81
|
+
"""Timestamp Generator Gen 1"""
|
|
82
|
+
|
|
83
|
+
name: Literal["Timestamp Generator Gen 1"] = "Timestamp Generator Gen 1"
|
|
84
|
+
whoami: Literal[1154] = 1154
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class TimestampGeneratorGen3(_HarpDeviceType):
|
|
88
|
+
"""Timestamp Generator Gen 3"""
|
|
89
|
+
|
|
90
|
+
name: Literal["Timestamp Generator Gen 3"] = "Timestamp Generator Gen 3"
|
|
91
|
+
whoami: Literal[1158] = 1158
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class LicketySplit(_HarpDeviceType):
|
|
95
|
+
"""Lickety Split"""
|
|
96
|
+
|
|
97
|
+
name: Literal["Lickety Split"] = "Lickety Split"
|
|
98
|
+
whoami: Literal[1400] = 1400
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class SniffDetector(_HarpDeviceType):
|
|
102
|
+
"""Sniff Detector"""
|
|
103
|
+
|
|
104
|
+
name: Literal["Sniff Detector"] = "Sniff Detector"
|
|
105
|
+
whoami: Literal[1401] = 1401
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class Treadmill(_HarpDeviceType):
|
|
109
|
+
"""Treadmill"""
|
|
110
|
+
|
|
111
|
+
name: Literal["Treadmill"] = "Treadmill"
|
|
112
|
+
whoami: Literal[1402] = 1402
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class Cuttlefish(_HarpDeviceType):
|
|
116
|
+
"""Cuttlefish"""
|
|
117
|
+
|
|
118
|
+
name: Literal["Cuttlefish"] = "Cuttlefish"
|
|
119
|
+
whoami: Literal[1403] = 1403
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class StepperDriver(_HarpDeviceType):
|
|
123
|
+
"""Stepper Driver"""
|
|
124
|
+
|
|
125
|
+
name: Literal["Stepper Driver"] = "Stepper Driver"
|
|
126
|
+
whoami: Literal[1130] = 1130
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class HarpDeviceType:
|
|
130
|
+
"""Harp device type definitions"""
|
|
131
|
+
|
|
132
|
+
BEHAVIOR = Behavior()
|
|
133
|
+
GENERIC_HARP_DEVICE = GenericHarpDevice()
|
|
134
|
+
CAMERA_CONTROLLER = CameraController()
|
|
135
|
+
CLOCK_SYNCHRONIZER = ClockSynchronizer()
|
|
136
|
+
INPUT_EXPANDER = InputExpander()
|
|
137
|
+
LOAD_CELLS = LoadCells()
|
|
138
|
+
OLFACTOMETER = Olfactometer()
|
|
139
|
+
SOUND_CARD = SoundCard()
|
|
140
|
+
SYNCHRONIZER = Synchronizer()
|
|
141
|
+
TIMESTAMP_GENERATOR_1 = TimestampGeneratorGen1()
|
|
142
|
+
TIMESTAMP_GENERATOR_3 = TimestampGeneratorGen3()
|
|
143
|
+
LICKETY_SPLIT = LicketySplit()
|
|
144
|
+
SNIFF_DETECTOR = SniffDetector()
|
|
145
|
+
TREADMILL = Treadmill()
|
|
146
|
+
CUTTLEFISH = Cuttlefish()
|
|
147
|
+
STEPPER_DRIVER = StepperDriver()
|
|
148
|
+
|
|
149
|
+
_ALL = tuple(_HarpDeviceType.__subclasses__())
|
|
150
|
+
ONE_OF = Annotated[Union[_ALL], Field(discriminator="name")]
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Module for Modality definitions"""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, Union
|
|
4
|
+
|
|
5
|
+
from pydantic import ConfigDict, Field
|
|
6
|
+
from typing_extensions import Annotated
|
|
7
|
+
|
|
8
|
+
from aind_data_schema_models.pid_names import BaseName
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class _Modality(BaseName):
|
|
12
|
+
"""Base model config"""
|
|
13
|
+
|
|
14
|
+
model_config = ConfigDict(frozen=True)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Behavior(_Modality):
|
|
18
|
+
"""Behavior"""
|
|
19
|
+
|
|
20
|
+
name: Literal["Behavior"] = "Behavior"
|
|
21
|
+
abbreviation: Literal["behavior"] = "behavior"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BehaviorVideos(_Modality):
|
|
25
|
+
"""BehaviorVideos"""
|
|
26
|
+
|
|
27
|
+
name: Literal["Behavior videos"] = "Behavior videos"
|
|
28
|
+
abbreviation: Literal["behavior-videos"] = "behavior-videos"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Confocal(_Modality):
|
|
32
|
+
"""Confocal"""
|
|
33
|
+
|
|
34
|
+
name: Literal["Confocal microscopy"] = "Confocal microscopy"
|
|
35
|
+
abbreviation: Literal["confocal"] = "confocal"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Ecephys(_Modality):
|
|
39
|
+
"""Ecephys"""
|
|
40
|
+
|
|
41
|
+
name: Literal["Extracellular electrophysiology"] = "Extracellular electrophysiology"
|
|
42
|
+
abbreviation: Literal["ecephys"] = "ecephys"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class Electromyography(_Modality):
|
|
46
|
+
"""Electromyography"""
|
|
47
|
+
|
|
48
|
+
name: Literal["Electromyography"] = "Electromyography"
|
|
49
|
+
abbreviation: Literal["EMG"] = "EMG"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class Fmost(_Modality):
|
|
53
|
+
"""Fmost"""
|
|
54
|
+
|
|
55
|
+
name: Literal["Fluorescence micro-optical sectioning tomography"] = (
|
|
56
|
+
"Fluorescence micro-optical sectioning tomography"
|
|
57
|
+
)
|
|
58
|
+
abbreviation: Literal["fMOST"] = "fMOST"
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class Icephys(_Modality):
|
|
62
|
+
"""Icephys"""
|
|
63
|
+
|
|
64
|
+
name: Literal["Intracellular electrophysiology"] = "Intracellular electrophysiology"
|
|
65
|
+
abbreviation: Literal["icephys"] = "icephys"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Isi(_Modality):
|
|
69
|
+
"""Intrinsic signal imaging"""
|
|
70
|
+
|
|
71
|
+
name: Literal["Intrinsic signal imaging"] = "Intrinsic signal imaging"
|
|
72
|
+
abbreviation: Literal["ISI"] = "ISI"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class Fib(_Modality):
|
|
76
|
+
"""Fib"""
|
|
77
|
+
|
|
78
|
+
name: Literal["Fiber photometry"] = "Fiber photometry"
|
|
79
|
+
abbreviation: Literal["fib"] = "fib"
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class Merfish(_Modality):
|
|
83
|
+
"""Merfish"""
|
|
84
|
+
|
|
85
|
+
name: Literal["Multiplexed error-robust fluorescence in situ hybridization"] = (
|
|
86
|
+
"Multiplexed error-robust fluorescence in situ hybridization"
|
|
87
|
+
)
|
|
88
|
+
abbreviation: Literal["merfish"] = "merfish"
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class Mri(_Modality):
|
|
92
|
+
"""Mri"""
|
|
93
|
+
|
|
94
|
+
name: Literal["Magnetic resonance imaging"] = "Magnetic resonance imaging"
|
|
95
|
+
abbreviation: Literal["MRI"] = "MRI"
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class POphys(_Modality):
|
|
99
|
+
"""POphys"""
|
|
100
|
+
|
|
101
|
+
name: Literal["Planar optical physiology"] = "Planar optical physiology"
|
|
102
|
+
abbreviation: Literal["ophys"] = "ophys"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class Slap(_Modality):
|
|
106
|
+
"""Slap"""
|
|
107
|
+
|
|
108
|
+
name: Literal["Scanned line projection imaging"] = "Scanned line projection imaging"
|
|
109
|
+
abbreviation: Literal["slap"] = "slap"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Spim(_Modality):
|
|
113
|
+
"""Spim"""
|
|
114
|
+
|
|
115
|
+
name: Literal["Selective plane illumination microscopy"] = "Selective plane illumination microscopy"
|
|
116
|
+
abbreviation: Literal["SPIM"] = "SPIM"
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class Modality:
|
|
120
|
+
"""Modality classes"""
|
|
121
|
+
|
|
122
|
+
BEHAVIOR = Behavior()
|
|
123
|
+
BEHAVIOR_VIDEOS = BehaviorVideos()
|
|
124
|
+
CONFOCAL = Confocal()
|
|
125
|
+
ECEPHYS = Ecephys()
|
|
126
|
+
EMG = Electromyography()
|
|
127
|
+
FMOST = Fmost()
|
|
128
|
+
ICEPHYS = Icephys()
|
|
129
|
+
FIB = Fib()
|
|
130
|
+
ISI = Isi()
|
|
131
|
+
MERFISH = Merfish()
|
|
132
|
+
MRI = Mri()
|
|
133
|
+
POPHYS = POphys()
|
|
134
|
+
SLAP = Slap()
|
|
135
|
+
SPIM = Spim()
|
|
136
|
+
_ALL = tuple(_Modality.__subclasses__())
|
|
137
|
+
ONE_OF = Annotated[Union[_ALL], Field(discriminator="name")]
|
|
138
|
+
|
|
139
|
+
_abbreviation_map = {m().abbreviation: m() for m in _ALL}
|
|
140
|
+
|
|
141
|
+
@classmethod
|
|
142
|
+
def from_abbreviation(cls, abbreviation: str):
|
|
143
|
+
"""Get class from abbreviation"""
|
|
144
|
+
return cls._abbreviation_map[abbreviation]
|