|
9 | 9 | from pynwb.device import Device |
10 | 10 | from pynwb.testing import TestCase |
11 | 11 |
|
| 12 | +from src.pynwb.ndx_franklab_novela.data_acq_device import DataAcqDevice |
12 | 13 | from src.pynwb.ndx_franklab_novela.header_device import HeaderDevice |
13 | 14 | from src.pynwb.ndx_franklab_novela.nwb_electrode_group import NwbElectrodeGroup |
14 | 15 | from src.pynwb.ndx_franklab_novela.probe import Probe, Shank, ShanksElectrode |
@@ -95,6 +96,26 @@ def test_read_nwb_probe_successfully(self): |
95 | 96 |
|
96 | 97 | self.delete_nwb('probe') |
97 | 98 |
|
| 99 | + def test_read_nwb_data_acq_device_successfully(self): |
| 100 | + data_acq_device = DataAcqDevice( |
| 101 | + name='DataAcqDevice1', |
| 102 | + system='System1', |
| 103 | + amplifier='Amplifier1', |
| 104 | + adc_circuit='adc_circuit1' |
| 105 | + ) |
| 106 | + self.nwb_file_content.add_device(data_acq_device) |
| 107 | + |
| 108 | + nwb_file_handler = NWBHDF5IO('data_acq_device.nwb', mode='w') |
| 109 | + nwb_file_handler.write(self.nwb_file_content) |
| 110 | + nwb_file_handler.close() |
| 111 | + |
| 112 | + self.assertTrue(os.path.exists('data_acq_device.nwb')) |
| 113 | + with pynwb.NWBHDF5IO('data_acq_device.nwb', 'r', load_namespaces=True) as nwb_file_handler: |
| 114 | + nwb_file = nwb_file_handler.read() |
| 115 | + self.assertContainerEqual(nwb_file.devices['DataAcqDevice1'], data_acq_device) |
| 116 | + |
| 117 | + self.delete_nwb('data_acq_device') |
| 118 | + |
98 | 119 | def test_read_nwb_nwb_electrode_group_successfully(self): |
99 | 120 | device = Device('device_0') |
100 | 121 | self.nwb_file_content.add_device(device) |
|
0 commit comments