本文整理汇总了Python中neo.core.Segment.analogsignalarrays方法的典型用法代码示例。如果您正苦于以下问题:Python Segment.analogsignalarrays方法的具体用法?Python Segment.analogsignalarrays怎么用?Python Segment.analogsignalarrays使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neo.core.Segment
的用法示例。
在下文中一共展示了Segment.analogsignalarrays方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test__children
# 需要导入模块: from neo.core import Segment [as 别名]
# 或者: from neo.core.Segment import analogsignalarrays [as 别名]
def test__children(self):
signal = self.signals[0]
segment = Segment(name='seg1')
segment.analogsignalarrays = [signal]
segment.create_many_to_one_relationship()
rcg = RecordingChannelGroup(name='rcg1')
rcg.analogsignalarrays = [signal]
rcg.create_many_to_one_relationship()
self.assertEqual(signal._single_parent_objects,
('Segment', 'RecordingChannelGroup'))
self.assertEqual(signal._multi_parent_objects, ())
self.assertEqual(signal._single_parent_containers,
('segment', 'recordingchannelgroup'))
self.assertEqual(signal._multi_parent_containers, ())
self.assertEqual(signal._parent_objects,
('Segment', 'RecordingChannelGroup'))
self.assertEqual(signal._parent_containers,
('segment', 'recordingchannelgroup'))
self.assertEqual(len(signal.parents), 2)
self.assertEqual(signal.parents[0].name, 'seg1')
self.assertEqual(signal.parents[1].name, 'rcg1')
assert_neo_object_is_compliant(signal)