|
5 | 5 |
|
6 | 6 | from pydantic import ValidationError |
7 | 7 |
|
8 | | -from aind_data_schema.device import Calibration, DAQChannel |
| 8 | +from aind_data_schema.device import Calibration, DAQChannel, Detector, Filter, Laser, DAQDevice |
9 | 9 | from aind_data_schema.imaging import acquisition as acq |
10 | 10 | from aind_data_schema.imaging import instrument as inst |
11 | 11 | from aind_data_schema.imaging import mri_session as ms |
12 | 12 | from aind_data_schema.imaging import tile |
13 | 13 | from aind_data_schema.manufacturers import Manufacturer |
14 | 14 | from aind_data_schema.processing import Registration |
15 | | -from aind_data_schema.rig import NeuropixelsBasestation |
16 | 15 | from aind_data_schema.utils.units import PowerValue |
| 16 | +from aind_data_schema.imaging import instrument |
17 | 17 |
|
18 | 18 |
|
19 | 19 | class ImagingTests(unittest.TestCase): |
@@ -192,44 +192,58 @@ def test_validators(self): |
192 | 192 | """test the validators""" |
193 | 193 |
|
194 | 194 | with self.assertRaises(ValidationError): |
195 | | - inst.Instrument( |
196 | | - instrument_type="diSPIM", |
197 | | - modification_date=datetime.datetime.now(), |
198 | | - manufacturer=Manufacturer.LIFECANVAS, |
199 | | - objectives=[], |
200 | | - detectors=[], |
201 | | - light_sources=[], |
| 195 | + instrument.Instrument( |
| 196 | + instrument_id="exaSPIM1-1", |
| 197 | + instrument_type="exaSPIM", |
| 198 | + modification_date=datetime.date(2023, 10, 4), |
| 199 | + manufacturer=Manufacturer.CUSTOM, |
202 | 200 | daqs=[ |
203 | | - NeuropixelsBasestation( |
204 | | - basestation_firmware_version="1", |
205 | | - bsc_firmware_version="2", |
206 | | - slot=0, |
207 | | - manufacturer=Manufacturer.IMEC, |
208 | | - ports=[], |
209 | | - computer_name="foo", |
| 201 | + DAQDevice( |
| 202 | + model="PCIe-6738", |
| 203 | + data_interface="USB", |
| 204 | + computer_name="Dev2", |
| 205 | + manufacturer=Manufacturer.NATIONAL_INSTRUMENTS, |
| 206 | + name="Dev2", |
| 207 | + serial_number="Unknown", |
210 | 208 | channels=[ |
211 | 209 | DAQChannel( |
212 | | - channel_name="123", |
213 | | - device_name="Laser A", |
| 210 | + channel_name="3", |
214 | 211 | channel_type="Analog Output", |
| 212 | + device_name="LAS-08308", |
| 213 | + sample_rate=10000, |
215 | 214 | ), |
216 | 215 | DAQChannel( |
217 | | - channel_name="321", |
218 | | - device_name="Probe A", |
| 216 | + channel_name="5", |
219 | 217 | channel_type="Analog Output", |
| 218 | + device_name="539251", |
| 219 | + sample_rate=10000, |
220 | 220 | ), |
221 | 221 | DAQChannel( |
222 | | - channel_name="234", |
223 | | - device_name="Camera A", |
224 | | - channel_type="Digital Output", |
| 222 | + channel_name="4", |
| 223 | + channel_type="Analog Output", |
| 224 | + device_name="LAS-08309", |
| 225 | + sample_rate=10000, |
225 | 226 | ), |
226 | 227 | DAQChannel( |
227 | | - channel_name="2354", |
228 | | - device_name="Disc A", |
229 | | - channel_type="Digital Output", |
| 228 | + channel_name="2", |
| 229 | + channel_type="Analog Output", |
| 230 | + device_name="stage-x", |
| 231 | + sample_rate=10000, |
| 232 | + ), |
| 233 | + DAQChannel( |
| 234 | + channel_name="0", |
| 235 | + channel_type="Analog Output", |
| 236 | + device_name="TL-1", |
| 237 | + sample_rate=10000, |
| 238 | + ), |
| 239 | + DAQChannel( |
| 240 | + channel_name="6", |
| 241 | + channel_type="Analog Output", |
| 242 | + device_name="LAS-08307", |
| 243 | + sample_rate=10000, |
230 | 244 | ), |
231 | 245 | ], |
232 | | - ), |
| 246 | + ) |
233 | 247 | ], |
234 | 248 | ) |
235 | 249 |
|
|
0 commit comments