def take_slice_of_analogsignalarray_by_channelindex(self,
channel_indexes=None):
'''
Return slices of the :class:`AnalogSignalArrays` in the
:class:`Segment` that correspond to the :attr:`channel_indexes`
provided.
'''
if channel_indexes is None:
return []
sliced_sigarrays = []
for sigarr in self.analogsignals:
if sigarr.get_channel_index() is not None:
ind = np.in1d(sigarr.get_channel_index(), channel_indexes)
sliced_sigarrays.append(sigarr[:, ind])
return sliced_sigarrays
评论列表
文章目录