|
5 | 5 | from dateutil.tz import tzlocal |
6 | 6 | from pynwb import NWBFile |
7 | 7 | from pynwb import NWBHDF5IO, ProcessingModule |
8 | | -from pynwb.behavior import BehavioralEvents |
9 | 8 | from pynwb.device import Device |
10 | 9 | from pynwb.testing import TestCase |
11 | 10 |
|
12 | 11 | from src.pynwb.ndx_franklab_novela import CameraDevice, AssociatedFiles |
13 | 12 | from src.pynwb.ndx_franklab_novela import DataAcqDevice |
14 | 13 | from src.pynwb.ndx_franklab_novela import HeaderDevice |
15 | 14 | from src.pynwb.ndx_franklab_novela import NwbElectrodeGroup |
16 | | -from src.pynwb.ndx_franklab_novela import NwbImageSeries |
17 | 15 | from src.pynwb.ndx_franklab_novela import Probe, Shank, ShanksElectrode |
18 | 16 |
|
19 | 17 |
|
@@ -140,43 +138,6 @@ def test_read_nwb_camera_device_successfully(self): |
140 | 138 |
|
141 | 139 | self.delete_nwb('camera_device') |
142 | 140 |
|
143 | | - def test_read_nwb_nwb_image_series_successfully(self): |
144 | | - device_1 = Device('device1') |
145 | | - device_2 = Device('device2') |
146 | | - mock_timestamps = [1, 2, 3] |
147 | | - mock_external_file = ['some file'] |
148 | | - |
149 | | - nwb_image_series = NwbImageSeries( |
150 | | - name='NwbImageSeries1', |
151 | | - timestamps=mock_timestamps, |
152 | | - external_file=mock_external_file, |
153 | | - devices=[device_1, device_2] |
154 | | - ) |
155 | | - |
156 | | - behavioral_time_series = BehavioralEvents(name="BehavioralTimeSeries") |
157 | | - behavioral_time_series.add_timeseries(nwb_image_series) |
158 | | - processing_module = ProcessingModule(name='ProcessingModule', description='') |
159 | | - processing_module.add_data_interface(behavioral_time_series) |
160 | | - self.nwb_file_content.add_processing_module(processing_module) |
161 | | - |
162 | | - self.nwb_file_content.add_stimulus_template(nwb_image_series) |
163 | | - |
164 | | - nwb_file_handler = NWBHDF5IO('nwb_image_series.nwb', mode='w') |
165 | | - nwb_file_handler.write(self.nwb_file_content) |
166 | | - nwb_file_handler.close() |
167 | | - |
168 | | - self.assertTrue(os.path.exists('nwb_image_series.nwb')) |
169 | | - with pynwb.NWBHDF5IO('nwb_image_series.nwb', 'r', load_namespaces=True) as nwb_file_handler: |
170 | | - nwb_file = nwb_file_handler.read() |
171 | | - self.assertContainerEqual(nwb_file.stimulus_template['NwbImageSeries1'], nwb_image_series) |
172 | | - self.assertContainerEqual( |
173 | | - nwb_file.processing['ProcessingModule'].data_interfaces['BehavioralTimeSeries']. |
174 | | - time_series['NwbImageSeries1'], |
175 | | - nwb_image_series |
176 | | - ) |
177 | | - |
178 | | - self.delete_nwb('nwb_image_series') |
179 | | - |
180 | 141 | def test_read_nwb_nwb_electrode_group_successfully(self): |
181 | 142 | device = Device('device_0') |
182 | 143 | self.nwb_file_content.add_device(device) |
|
0 commit comments