本文整理汇总了Python中neo.core.Segment.unmerged_analogsignals方法的典型用法代码示例。如果您正苦于以下问题:Python Segment.unmerged_analogsignals方法的具体用法?Python Segment.unmerged_analogsignals怎么用?Python Segment.unmerged_analogsignals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neo.core.Segment
的用法示例。
在下文中一共展示了Segment.unmerged_analogsignals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _read_segment
# 需要导入模块: from neo.core import Segment [as 别名]
# 或者: from neo.core.Segment import unmerged_analogsignals [as 别名]
def _read_segment(self, node, parent):
attributes = self._get_standard_attributes(node)
segment = Segment(**attributes)
signals = []
for name, child_node in node['analogsignals'].items():
if "AnalogSignal" in name:
signals.append(self._read_analogsignal(child_node, parent=segment))
if signals and self.merge_singles:
segment.unmerged_analogsignals = signals # signals will be merged later
signals = []
for name, child_node in node['analogsignalarrays'].items():
if "AnalogSignalArray" in name:
signals.append(self._read_analogsignalarray(child_node, parent=segment))
segment.analogsignals = signals
irr_signals = []
for name, child_node in node['irregularlysampledsignals'].items():
if "IrregularlySampledSignal" in name:
irr_signals.append(self._read_irregularlysampledsignal(child_node, parent=segment))
if irr_signals and self.merge_singles:
segment.unmerged_irregularlysampledsignals = irr_signals
irr_signals = []
segment.irregularlysampledsignals = irr_signals
epochs = []
for name, child_node in node['epochs'].items():
if "Epoch" in name:
epochs.append(self._read_epoch(child_node, parent=segment))
if self.merge_singles:
epochs = self._merge_data_objects(epochs)
for name, child_node in node['epocharrays'].items():
if "EpochArray" in name:
epochs.append(self._read_epocharray(child_node, parent=segment))
segment.epochs = epochs
events = []
for name, child_node in node['events'].items():
if "Event" in name:
events.append(self._read_event(child_node, parent=segment))
if self.merge_singles:
events = self._merge_data_objects(events)
for name, child_node in node['eventarrays'].items():
if "EventArray" in name:
events.append(self._read_eventarray(child_node, parent=segment))
segment.events = events
spiketrains = []
for name, child_node in node['spikes'].items():
raise NotImplementedError('Spike objects not yet handled.')
for name, child_node in node['spiketrains'].items():
if "SpikeTrain" in name:
spiketrains.append(self._read_spiketrain(child_node, parent=segment))
segment.spiketrains = spiketrains
segment.block = parent
return segment