def setUpContainer(self): data = list(range(10)) ts = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] TestElectricalSeriesIO.make_electrode_table(self) region = DynamicTableRegion('electrodes', [0, 2], 'the first and third electrodes', self.table) self.eS = ElectricalSeries('test_eS', 'a hypothetical source', data, region, timestamps=ts) eD = EventDetection('test_ed', 'detection_method', self.eS, (1, 2, 3), (0.1, 0.2, 0.3)) return eD
def test_init(self): data = list(range(10)) ts = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] table = make_electrode_table() region = DynamicTableRegion('electrodes', [0, 2], 'the first and third electrodes', table) eS = ElectricalSeries('test_eS', data, region, timestamps=ts) # noqa: F405 eD = EventDetection('detection_method', eS, (1, 2, 3), (0.1, 0.2, 0.3)) # noqa: F405 self.assertEqual(eD.detection_method, 'detection_method') self.assertEqual(eD.source_electricalseries, eS) self.assertEqual(eD.source_idx, (1, 2, 3)) self.assertEqual(eD.times, (0.1, 0.2, 0.3)) self.assertEqual(eD.unit, 'Seconds')
def setUpContainer(self): """ Return a test EventDetection to read/write """ TestElectricalSeriesIO.make_electrode_table(self) region = DynamicTableRegion(name='electrodes', data=[0, 2], description='the first and third electrodes', table=self.table) data = list(range(10)) ts = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] self.eS = ElectricalSeries(name='test_eS', data=data, electrodes=region, timestamps=ts) eD = EventDetection(detection_method='detection_method', source_electricalseries=self.eS, source_idx=(1, 2, 3), times=(0.1, 0.2, 0.3)) return eD