本文整理汇总了Python中neo.core.AnalogSignal.segment方法的典型用法代码示例。如果您正苦于以下问题:Python AnalogSignal.segment方法的具体用法?Python AnalogSignal.segment怎么用?Python AnalogSignal.segment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neo.core.AnalogSignal
的用法示例。
在下文中一共展示了AnalogSignal.segment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_analogsignal3
# 需要导入模块: from neo.core import AnalogSignal [as 别名]
# 或者: from neo.core.AnalogSignal import segment [as 别名]
def create_analogsignal3(self, parent=None, name='AnalogSignal3'):
signal = AnalogSignal([[1, 2, 3], [4, 5, 6]], units='mV',
sampling_rate=2 * pq.kHz, t_start=100 * pq.s)
signal.segment = parent
self._assign_basic_attributes(signal, name=name)
return signal
示例2: create_analogsignal2
# 需要导入模块: from neo.core import AnalogSignal [as 别名]
# 或者: from neo.core.AnalogSignal import segment [as 别名]
def create_analogsignal2(self, parent=None, name='AnalogSignal2'):
signal = AnalogSignal([[1], [2], [3], [4], [5]], units='mA',
sampling_period=0.5 * pq.ms)
signal.segment = parent
self._assign_annotations(signal)
return signal
示例3: create_analogsignal
# 需要导入模块: from neo.core import AnalogSignal [as 别名]
# 或者: from neo.core.AnalogSignal import segment [as 别名]
def create_analogsignal(self, parent=None, name='AnalogSignal1'):
signal = AnalogSignal([[1.0, 2.5], [2.2, 3.1], [3.2, 4.4]], units='mV',
sampling_rate=100 * pq.Hz, t_start=2 * pq.min)
signal.segment = parent
self._assign_basic_attributes(signal, name=name)
self._assign_annotations(signal)
return signal
示例4: _read_analogsignalarray
# 需要导入模块: from neo.core import AnalogSignal [as 别名]
# 或者: from neo.core.AnalogSignal import segment [as 别名]
def _read_analogsignalarray(self, node, parent):
attributes = self._get_standard_attributes(node)
# todo: handle channel_index
sampling_rate = self._get_quantity(node["sampling_rate"])
t_start = self._get_quantity(node["t_start"])
signal = AnalogSignal(self._get_quantity(node["signal"]),
sampling_rate=sampling_rate, t_start=t_start,
**attributes)
signal.segment = parent
self.object_refs[node.attrs["object_ref"]] = signal
return signal