diff --git a/examples/generated_data.py b/examples/generated_data.py index a03fd5753..fb62af041 100644 --- a/examples/generated_data.py +++ b/examples/generated_data.py @@ -35,7 +35,7 @@ def generate_block(n_segments=3, n_channels=8, n_units=3, block = neo.Block() block.segments = segments - block.channelindexes = [rcg] + block.channel_indexes = [rcg] # Create synthetic data for seg in segments: @@ -87,7 +87,7 @@ def generate_block(n_segments=3, n_channels=8, n_units=3, # We assume that our block has only 1 ChannelIndex and each # RecordingChannel only has 1 AnalogSignal. -rcg = block.channelindexes[0] +rcg = block.channel_indexes[0] for rc in rcg.recordingchannels: print("Analysing channel %d: %s" % (rc.index, rc.name)) @@ -123,7 +123,7 @@ def generate_block(n_segments=3, n_channels=8, n_units=3, # By ChannelIndex. Here we calculate a PSTH averaged over trials by # channel location, blending all Units: -for rcg in block.channelindexes: +for rcg in block.channel_indexes: stlist = [] for unit in rcg.units: stlist.extend([st - st.t_start for st in unit.spiketrains]) diff --git a/neo/core/analogsignal.py b/neo/core/analogsignal.py index 3f7a7d4d4..27d539526 100644 --- a/neo/core/analogsignal.py +++ b/neo/core/analogsignal.py @@ -185,7 +185,7 @@ def __new__(cls, signal, units=None, dtype=None, copy=True, obj._sampling_rate = _get_sampling_rate(sampling_rate, sampling_period) obj.segment = None - obj.channelindex = None + obj.channel_index = None return obj def __init__(self, signal, units=None, dtype=None, copy=True, @@ -258,8 +258,8 @@ def __repr__(self): def get_channel_index(self): """ """ - if self.channelindex: - return self.channelindex.channel_indexes + if self.channel_index: + return self.channel_index.channel_indexes else: return None diff --git a/neo/core/baseneo.py b/neo/core/baseneo.py index 9abd5abab..bce02199e 100644 --- a/neo/core/baseneo.py +++ b/neo/core/baseneo.py @@ -126,7 +126,7 @@ def _reference_name(class_name): `_container_name("Block")`. """ name_map = { - "ChannelIndex": "channelindex" + "ChannelIndex": "channel_index" } return name_map.get(class_name, class_name.lower()) @@ -141,7 +141,7 @@ def _container_name(class_name): obtained by calling `_container_name_plural("Segment")`. """ name_map = { - "ChannelIndex": "channelindexes" + "ChannelIndex": "channel_indexes" } return name_map.get(class_name, _reference_name(class_name) + 's') diff --git a/neo/core/block.py b/neo/core/block.py index 9d14adf0e..10c2c17f4 100644 --- a/neo/core/block.py +++ b/neo/core/block.py @@ -41,11 +41,11 @@ class Block(Container): >>> for ind in range(2): ... rcg = ChannelIndex(name='Array probe %d' % ind, ... channel_indexes=np.arange(64)) - ... blk.channelindexes.append(rcg) + ... blk.channel_indexes.append(rcg) ... >>> # Populate the Block with AnalogSignal objects ... for seg in blk.segments: - ... for rcg in blk.channelindexes: + ... for rcg in blk.channel_indexes: ... a = AnalogSignal(np.random.randn(10000, 64)*nA, ... sampling_rate=10*kHz) ... rcg.analogsignals.append(a) diff --git a/neo/core/irregularlysampledsignal.py b/neo/core/irregularlysampledsignal.py index 2117146d1..3fd73b387 100644 --- a/neo/core/irregularlysampledsignal.py +++ b/neo/core/irregularlysampledsignal.py @@ -148,7 +148,7 @@ def __new__(cls, times, signal, units=None, time_units=None, dtype=None, obj.times = pq.Quantity(times, units=time_units, dtype=float, copy=copy) obj.segment = None - obj.channelindex = None + obj.channel_index = None return obj diff --git a/neo/core/recordingchannelgroup.py b/neo/core/recordingchannelgroup.py index b919075ee..a9899d9bd 100644 --- a/neo/core/recordingchannelgroup.py +++ b/neo/core/recordingchannelgroup.py @@ -44,11 +44,11 @@ class ChannelIndex(Container): >>> for ind in range(2): ... rcg = ChannelIndex(name='Array probe %d' % ind, ... channel_indexes=np.arange(64)) - ... blk.channelindexes.append(rcg) + ... blk.channel_indexes.append(rcg) ... >>> # Populate the Block with AnalogSignal objects ... for seg in blk.segments: - ... for rcg in blk.channelindexes: + ... for rcg in blk.channel_indexes: ... a = AnalogSignal(np.random.randn(10000, 64)*nA, ... sampling_rate=10*kHz) ... rcg.analogsignals.append(a) @@ -71,7 +71,7 @@ class ChannelIndex(Container): ... rcg = ChannelIndex(channel_names=np.array(['ch1', 'ch4', 'ch6']), ... channel_indexes = np.array([0, 3, 5]) >>> rcg.analogsignals.append(sig) - >>> blk.channelindexes.append(rcg) + >>> blk.channel_indexes.append(rcg) *Usage 3* dealing with :class:`Unit` objects:: @@ -82,7 +82,7 @@ class ChannelIndex(Container): >>> >>> # Create a new ChannelIndex and add it to the Block >>> rcg = ChannelIndex(name='octotrode A') - >>> blk.channelindexes.append(rcg) + >>> blk.channel_indexes.append(rcg) >>> >>> # create several Unit objects and add them to the >>> # ChannelIndex diff --git a/neo/core/segment.py b/neo/core/segment.py index cde2cda77..131cfe928 100644 --- a/neo/core/segment.py +++ b/neo/core/segment.py @@ -185,7 +185,7 @@ def construct_subsegment_by_unit(self, unit_list=None): >>> >>> blk = Block() >>> rcg = ChannelIndex(name='group0') - >>> blk.channelindexes = [rcg] + >>> blk.channel_indexes = [rcg] >>> >>> for ind in range(5): ... unit = Unit(name='Unit #%s' % ind, channel_index=ind) diff --git a/neo/core/unit.py b/neo/core/unit.py index c77164e1f..e5ee9b1a1 100644 --- a/neo/core/unit.py +++ b/neo/core/unit.py @@ -70,12 +70,12 @@ def __init__(self, name=None, description=None, file_origin=None, ''' super(Unit, self).__init__(name=name, description=description, file_origin=file_origin, **annotations) - self.channelindex = None + self.channel_index = None def get_channel_indexes(self): """ """ - if self.channelindex: - return self.channelindex.channel_indexes + if self.channel_index: + return self.channel_index.channel_indexes else: return None diff --git a/neo/io/blackrockio.py b/neo/io/blackrockio.py index 53476a8b6..37b164974 100644 --- a/neo/io/blackrockio.py +++ b/neo/io/blackrockio.py @@ -93,8 +93,8 @@ def read_block(self, lazy=False, cascade=True, load_waveforms = False): channel_id = st.annotations['channel_id'] index = None for sig in seg.analogsignals: - if channel_id in sig.channelindex.channel_ids: - i = np.where(sig.channelindex.channel_ids==channel_id)[0][0] + if channel_id in sig.channel_index.channel_ids: + i = np.where(sig.channel_index.channel_ids==channel_id)[0][0] index = sig.get_channel_index()[i] break if index is not None: @@ -104,7 +104,7 @@ def read_block(self, lazy=False, cascade=True, load_waveforms = False): unit = Unit(name=st.name) unit.spiketrains.append(st) rcg.units.append(unit) - bl.channelindexes.append(rcg) + bl.channel_indexes.append(rcg) bl.create_many_to_one_relationship() @@ -426,7 +426,7 @@ def read_nsx(self, filename_nsx, seg, lazy, cascade): name=name, file_origin=filename_nsx) rcg.analogsignals.append(anasig) - anasig.channelindex = rcg + anasig.channel_index = rcg seg.analogsignals.append(anasig) def read_sif(self, filename_sif, seg, ): diff --git a/neo/io/blackrockio_deprecated.py b/neo/io/blackrockio_deprecated.py index c8503ccd0..a95bdcc4e 100644 --- a/neo/io/blackrockio_deprecated.py +++ b/neo/io/blackrockio_deprecated.py @@ -114,7 +114,7 @@ def read_block(self, lazy=False, cascade=True, #~ # Add channel hierarchy #~ rcg = ChannelIndex(name='allchannels', #~ description='group of all channels', file_origin=self.filename) - #~ block.channelindexes.append(rcg) + #~ block.channel_indexes.append(rcg) #~ self.channel_number_to_recording_channel = {} #~ # Add each channel at a time to hierarchy @@ -277,7 +277,7 @@ def channel_indexes_in_segment(seg): channel_indices.append(sig.recordingchannel.index) for asa in seg.analogsignals: - channel_indices.append(asa.channelindex.channel_indexes) + channel_indices.append(asa.channel_index.channel_indexes) return channel_indices diff --git a/neo/io/brainwaredamio.py b/neo/io/brainwaredamio.py index 3a143458a..4d8ba72e8 100644 --- a/neo/io/brainwaredamio.py +++ b/neo/io/brainwaredamio.py @@ -147,7 +147,7 @@ def read_block(self, lazy=False, cascade=True, **kargs): channel_names=np.array(['Chan1'], dtype='S')) # load objects into their containers - block.channelindexes.append(rcg) + block.channel_indexes.append(rcg) # open the file with open(self._path, 'rb') as fobject: @@ -159,7 +159,7 @@ def read_block(self, lazy=False, cascade=True, **kargs): break # store the segment and signals - seg.analogsignals[0].channelindex = rcg + seg.analogsignals[0].channel_index = rcg block.segments.append(seg) # remove the file object diff --git a/neo/io/brainwaref32io.py b/neo/io/brainwaref32io.py index b50486b32..a505792b2 100644 --- a/neo/io/brainwaref32io.py +++ b/neo/io/brainwaref32io.py @@ -163,7 +163,7 @@ def read_block(self, lazy=False, cascade=True, **kargs): self.__unit = Unit(file_origin=self._filename) # load objects into their containers - block.channelindexes.append(rcg) + block.channel_indexes.append(rcg) rcg.units.append(self.__unit) # initialize values diff --git a/neo/io/brainwaresrcio.py b/neo/io/brainwaresrcio.py index 6c5a1922d..51ef0c024 100755 --- a/neo/io/brainwaresrcio.py +++ b/neo/io/brainwaresrcio.py @@ -164,7 +164,7 @@ def __init__(self, filename=None): self._blk = None # This stores the current ChannelIndex for easy access - # It is equivalent to self._blk.channelindexes[0] + # It is equivalent to self._blk.channel_indexes[0] self._rcg = None # This stores the current Segment for easy access @@ -296,7 +296,7 @@ def read_next_block(self, cascade=True, lazy=False, **kargs): file_origin=self._file_origin, elliptic=[], boundaries=[], timestamp=[], max_valid=[]) - self._blk.channelindexes.append(self._rcg) + self._blk.channel_indexes.append(self._rcg) self._rcg.units.append(self._unit0) self._blk.segments.append(self._seg0) diff --git a/neo/io/elphyio.py b/neo/io/elphyio.py index 22db75f66..032fb40db 100644 --- a/neo/io/elphyio.py +++ b/neo/io/elphyio.py @@ -4203,7 +4203,7 @@ def read_channelindex( self, episode ): ) for spk in range(0, n_spikes) : channel = self.read_channelindex(episode, spk) - group.channelindexes.append(channel) + group.channel_indexes.append(channel) return group diff --git a/neo/io/hdf5io.py b/neo/io/hdf5io.py index c05216873..541626541 100755 --- a/neo/io/hdf5io.py +++ b/neo/io/hdf5io.py @@ -534,7 +534,7 @@ def _get_parent(self, path, ref, parent_type): if parent_type.lower() in ('recordingchannel', 'unit'): # We need to search all recording channels - path = block_path + '/channelindexes' + path = block_path + '/channel_indexes' for n in self._data.iterNodes(path): if not '_type' in n._v_attrs: continue @@ -547,9 +547,9 @@ def _get_parent(self, path, ref, parent_type): if parent_type.lower() == 'segment': path = block_path + '/segments' - elif parent_type.lower() in ('channelindex', - 'channelindexes'): - path = block_path + '/channelindexes' + elif parent_type.lower() in ('channel_index', + 'channel_indexes'): + path = block_path + '/channel_indexes' else: return '' @@ -561,7 +561,7 @@ def _get_rcgs(self, path, ref): parts = path.split('/') object_folder = parts[-2] block_path = '/'.join(parts[:-4]) - path = block_path + '/channelindexes' + path = block_path + '/channel_indexes' return self._search_parent(path, object_folder, ref, True) def _search_parent(self, path, object_folder, ref, multi=False): @@ -616,9 +616,9 @@ def load_lazy_cascade(self, path, lazy): ppaths.append(None) self.parent_paths[path] = ppaths elif t == 'RecordingChannel': - if 'channelindexes' in node._v_attrs: + if 'channel_indexes' in node._v_attrs: self.parent_paths[path] = node._f_getAttr( - 'channelindexes') + 'channel_indexes') # Set parent objects if path in self.parent_paths: @@ -626,7 +626,7 @@ def load_lazy_cascade(self, path, lazy): if t == 'RecordingChannel': # Set list of parnet channel groups for rcg in self.parent_paths[path]: - o.channelindexes.append( + o.channel_indexes.append( self.get(rcg, cascade='lazy', lazy=lazy)) else: # Set parents: Segment and another parent if paths[0] is None: @@ -650,7 +650,7 @@ def load_lazy_cascade(self, path, lazy): if t == 'RecordingChannel': rcg_paths = self._get_rcgs(path, ref) for rcg in rcg_paths: - o.channelindexes.append(self.get( + o.channel_indexes.append(self.get( rcg, cascade='lazy', lazy=lazy)) self.parent_paths[path] = rcg_paths else: @@ -812,7 +812,7 @@ def get_lazy_shape(obj, node): # create at least One-to-Many if obj_type == 'ChannelIndex' and not object_ref: for r in relatives: - r.channelindexes = [obj] + r.channel_indexes = [obj] # special processor for RC -> RCG if obj_type == 'RecordingChannel': if hasattr(node, '_v_parent'): @@ -820,7 +820,7 @@ def get_lazy_shape(obj, node): if hasattr(parent, '_v_parent'): parent = parent._v_parent if 'object_ref' in parent._v_attrs: - obj.channelindexes.append(self.get( + obj.channel_indexes.append(self.get( parent._v_pathname, lazy=lazy)) return obj diff --git a/neo/io/kwikio.py b/neo/io/kwikio.py index d5069147f..f476a7ae5 100644 --- a/neo/io/kwikio.py +++ b/neo/io/kwikio.py @@ -142,12 +142,12 @@ def read_block(self, rcg = ChannelIndex(name='all channels', channel_indexes=channel_index) - blk.channelindexes.append(rcg) + blk.channel_indexes.append(rcg) ana = self.read_analogsignal(channel_index=channel_index, lazy=lazy, cascade=cascade) - ana.channelindex = rcg + ana.channel_index = rcg seg.duration = (self._attrs['shape'][0] / self._attrs['kwik']['sample_rate']) * pq.s diff --git a/neo/io/neuroscopeio.py b/neo/io/neuroscopeio.py index 7e8c9d529..3ba40cbf1 100644 --- a/neo/io/neuroscopeio.py +++ b/neo/io/neuroscopeio.py @@ -104,7 +104,7 @@ def read_block(self, channel_indexes=np.arange(n_channels, dtype = int)) rcg.channel_ids = np.array([int(xml_rc.text) for xml_rc in xml_rcg]) rcg.channel_names = np.array(['Channel{0}'.format(id) for id in rcg.channel_ids], dtype = 'S') - bl.channelindexes.append(rcg) + bl.channel_indexes.append(rcg) # AnalogSignals reader = RawBinarySignalIO(filename = self.filename.replace('.xml', '.dat')) diff --git a/neo/io/tools.py b/neo/io/tools.py index 293127c4c..52907b358 100644 --- a/neo/io/tools.py +++ b/neo/io/tools.py @@ -22,7 +22,7 @@ # Special case this tricky many-to-many relationship # we still need links from recordingchannel to analogsignal -# for rcg in block.channelindexes: +# for rcg in block.channel_indexes: # for rc in rcg.recordingchannels: # rc.create_many_to_one_relationship() @@ -65,11 +65,11 @@ # rcg = ChannelIndex(name='all channels', # channel_indexes=indexes, # channel_names=names) -# bl.channelindexes.append(rcg) +# bl.channel_indexes.append(rcg) # for ind in indexes: # # many to many relationship # rcg.recordingchannels.append(recordingchannels[ind]) -# recordingchannels[ind].channelindexes.append(rcg) +# recordingchannels[ind].channel_indexes.append(rcg) def iteritems(D): diff --git a/neo/test/coretest/test_analogsignalarray.py b/neo/test/coretest/test_analogsignalarray.py index 3f782218e..54eb0e565 100644 --- a/neo/test/coretest/test_analogsignalarray.py +++ b/neo/test/coretest/test_analogsignalarray.py @@ -206,13 +206,13 @@ def test__children(self): self.assertEqual(signal._multi_parent_objects, ()) self.assertEqual(signal._single_parent_containers, - ('segment', 'channelindex')) + ('segment', 'channel_index')) self.assertEqual(signal._multi_parent_containers, ()) self.assertEqual(signal._parent_objects, ('Segment', 'ChannelIndex')) self.assertEqual(signal._parent_containers, - ('segment', 'channelindex')) + ('segment', 'channel_index')) self.assertEqual(len(signal.parents), 2) self.assertEqual(signal.parents[0].name, 'seg1') diff --git a/neo/test/coretest/test_block.py b/neo/test/coretest/test_block.py index 4705de29d..0be5ee200 100644 --- a/neo/test/coretest/test_block.py +++ b/neo/test/coretest/test_block.py @@ -84,8 +84,8 @@ def test__fake_neo__cascade(self): seg = res.segments[0] self.assertEqual(seg.annotations, self.annotations) - self.assertEqual(len(res.channelindexes), 1) - rcg = res.channelindexes[0] + self.assertEqual(len(res.channel_indexes), 1) + rcg = res.channel_indexes[0] self.assertEqual(rcg.annotations, self.annotations) self.assertEqual(len(seg.analogsignals), 1) @@ -130,7 +130,7 @@ def test__fake_neo__nocascade(self): self.assertEqual(res.annotations, self.annotations) self.assertEqual(len(res.segments), 0) - self.assertEqual(len(res.channelindexes), 0) + self.assertEqual(len(res.channel_indexes), 0) class TestBlock(unittest.TestCase): @@ -144,8 +144,8 @@ def setUp(self): self.segs1 = self.blk1.segments self.segs2 = self.blk2.segments - self.rcgs1 = self.blk1.channelindexes - self.rcgs2 = self.blk2.channelindexes + self.rcgs1 = self.blk1.channel_indexes + self.rcgs2 = self.blk2.channel_indexes self.units1 = [[unit for unit in rcg.units] for rcg in self.rcgs1] self.units2 = [[unit for unit in rcg.units] for rcg in self.rcgs2] @@ -223,10 +223,10 @@ def check_creation(self, blk): targ6['seed'] = seed self.assertEqual(blk.annotations, targ6) - self.assertTrue(hasattr(blk, 'channelindexes')) + self.assertTrue(hasattr(blk, 'channel_indexes')) self.assertTrue(hasattr(blk, 'segments')) - self.assertEqual(len(blk.channelindexes), self.nchildren) + self.assertEqual(len(blk.channel_indexes), self.nchildren) self.assertEqual(len(blk.segments), self.nchildren) def test__creation(self): @@ -245,7 +245,7 @@ def test__merge(self): rcgs1a = clone_object(self.rcgs1) assert_same_sub_schema(rcgs1a + self.rcgs2, - blk1a.channelindexes) + blk1a.channel_indexes) assert_same_sub_schema(segs1a + self.segs2, blk1a.segments) @@ -266,10 +266,10 @@ def test__children(self): ('Segment', 'ChannelIndex')) self.assertEqual(self.blk1._container_child_containers, - ('segments', 'channelindexes')) + ('segments', 'channel_indexes')) self.assertEqual(self.blk1._data_child_containers, ()) self.assertEqual(self.blk1._single_child_containers, - ('segments', 'channelindexes')) + ('segments', 'channel_indexes')) self.assertEqual(self.blk1._single_parent_containers, ()) self.assertEqual(self.blk1._multi_child_containers, ()) self.assertEqual(self.blk1._multi_parent_containers, ()) @@ -277,7 +277,7 @@ def test__children(self): self.assertEqual(self.blk1._child_objects, ('Segment', 'ChannelIndex')) self.assertEqual(self.blk1._child_containers, - ('segments', 'channelindexes')) + ('segments', 'channel_indexes')) self.assertEqual(self.blk1._parent_objects, ()) self.assertEqual(self.blk1._parent_containers, ()) @@ -335,7 +335,7 @@ def test__children(self): def test__size(self): targ = {'segments': self.nchildren, - 'channelindexes': self.nchildren} + 'channel_indexes': self.nchildren} self.assertEqual(self.targobj.size, targ) def test__filter_none(self): @@ -718,7 +718,7 @@ def test__filterdata_multi_partres_annotation_annotation(self): # seg1 = seg1.replace('\n', '\n ') # # targ = ("Block with " + - # ("%s segments, %s channelindexes\n" % + # ("%s segments, %s channel_indexes\n" % # (len(self.segs1), len(self.rcgs1))) + # ("name: '%s'\ndescription: '%s'\n" % (self.blk1.name, # self.blk1.description)) + diff --git a/neo/test/coretest/test_recordingchannelgroup.py b/neo/test/coretest/test_recordingchannelgroup.py index 29ac097a1..70323dce3 100644 --- a/neo/test/coretest/test_recordingchannelgroup.py +++ b/neo/test/coretest/test_recordingchannelgroup.py @@ -219,7 +219,7 @@ def test__merge(self): def test__children(self): blk = Block(name='block1') - blk.channelindexes = [self.chx1] + blk.channel_indexes = [self.chx1] blk.create_many_to_one_relationship() self.assertEqual(self.chx1._container_child_objects, ('Unit',)) diff --git a/neo/test/coretest/test_segment.py b/neo/test/coretest/test_segment.py index 2f6fac2f7..9eb6ad1ae 100644 --- a/neo/test/coretest/test_segment.py +++ b/neo/test/coretest/test_segment.py @@ -698,7 +698,7 @@ def test__construct_subsegment_by_unit(self): all_unit.append(un) blk = Block() - blk.channelindexes = rcgs + blk.channel_indexes = rcgs for s in range(nb_seg): seg = Segment(name='Simulation %s' % s) for j in range(nb_unit): diff --git a/neo/test/coretest/test_unit.py b/neo/test/coretest/test_unit.py index 2bdcf09fc..9c645f114 100644 --- a/neo/test/coretest/test_unit.py +++ b/neo/test/coretest/test_unit.py @@ -163,7 +163,7 @@ def test__children(self): self.assertEqual(self.unit1._data_child_containers, ('spiketrains',)) self.assertEqual(self.unit1._single_child_containers, ('spiketrains',)) self.assertEqual(self.unit1._single_parent_containers, - ('channelindex',)) + ('channel_index',)) self.assertEqual(self.unit1._multi_child_containers, ()) self.assertEqual(self.unit1._multi_parent_containers, ()) @@ -172,7 +172,7 @@ def test__children(self): self.assertEqual(self.unit1._parent_objects, ('ChannelIndex',)) self.assertEqual(self.unit1._parent_containers, - ('channelindex',)) + ('channel_index',)) self.assertEqual(len(self.unit1._single_children), self.nchildren) self.assertEqual(len(self.unit1._multi_children), 0) diff --git a/neo/test/generate_datasets.py b/neo/test/generate_datasets.py index 328632748..62aaf6f66 100644 --- a/neo/test/generate_datasets.py +++ b/neo/test/generate_datasets.py @@ -344,7 +344,7 @@ def fake_neo(obj_type="Block", cascade=True, seed=None, n=1): # need to manually create 'implicit' connections if obj_type == 'Block': # connect data objects to segment - for i, rcg in enumerate(obj.channelindexes): + for i, rcg in enumerate(obj.channel_indexes): for k, sigarr in enumerate(rcg.analogsignals): obj.segments[k].analogsignals.append(sigarr) for k, sigarr in enumerate(rcg.irregularlysampledsignals): diff --git a/neo/test/iotest/test_brainwaredamio.py b/neo/test/iotest/test_brainwaredamio.py index 51589bb45..5ad303152 100644 --- a/neo/test/iotest/test_brainwaredamio.py +++ b/neo/test/iotest/test_brainwaredamio.py @@ -63,7 +63,7 @@ def proc_dam(filename): channel_ids = np.array([1]), channel_names = np.array(['Chan1'], dtype='S')) - block.channelindexes.append(rcg) + block.channel_indexes.append(rcg) params = [res['params'][0, 0].flatten() for res in damfile['stim']] values = [res['values'][0, 0].flatten() for res in damfile['stim']] diff --git a/neo/test/iotest/test_brainwaref32io.py b/neo/test/iotest/test_brainwaref32io.py index 4f2d98cce..1b23be70f 100644 --- a/neo/test/iotest/test_brainwaref32io.py +++ b/neo/test/iotest/test_brainwaref32io.py @@ -57,7 +57,7 @@ def proc_f32(filename): unit = Unit(file_origin=filenameorig) # load objects into their containers - block.channelindexes.append(rcg) + block.channel_indexes.append(rcg) rcg.units.append(unit) try: diff --git a/neo/test/iotest/test_brainwaresrcio.py b/neo/test/iotest/test_brainwaresrcio.py index ee6dfffdd..94cabfc9f 100644 --- a/neo/test/iotest/test_brainwaresrcio.py +++ b/neo/test/iotest/test_brainwaresrcio.py @@ -89,7 +89,7 @@ def proc_src(filename): chan_names = ['Chan{}'.format(i) for i in range(NChannels)] rcg.channel_indexes = chan_nums rcg.channel_names = np.array(chan_names, dtype='string_') - block.channelindexes.append(rcg) + block.channel_indexes.append(rcg) for rep in srcfile['sets'][0, 0].flatten(): proc_src_condition(rep, filename, ADperiod, side, block) @@ -155,7 +155,7 @@ def proc_src_condition(rep, filename, ADperiod, side, block): '''Get the condition in a src file that has been processed by the official matlab function. See proc_src for details''' - rcg = block.channelindexes[0] + rcg = block.channel_indexes[0] stim = rep['stim'].flatten() params = [str(res[0]) for res in stim['paramName'][0].flatten()]